summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorSiqi LIU <me@siqi.fr>2013-07-25 17:27:10 +0200
committerSiqi LIU <me@siqi.fr>2013-07-25 17:28:02 +0200
commit65134fb75c3e94b7869fb6d490f88bf4b252760e (patch)
tree1c5813e30c136e2a670c21c861fe23ef23141901 /sd
parentavahi for linux refactored (diff)
downloadcore-65134fb75c3e94b7869fb6d490f88bf4b252760e.tar.gz
core-65134fb75c3e94b7869fb6d490f88bf4b252760e.zip
minor updates for avahi/bonjour refacotration
Change-Id: I89e0115ddbea953de4ee0468c66e949070087a96
Diffstat (limited to 'sd')
-rw-r--r--sd/CppunitTest_sd_uimpress.mk14
-rw-r--r--sd/Library_sd.mk12
-rw-r--r--sd/source/ui/remotecontrol/DiscoveryService.cxx1
-rw-r--r--sd/source/ui/remotecontrol/OSXNetworkService.h2
-rw-r--r--sd/source/ui/remotecontrol/OSXNetworkService.hxx7
-rw-r--r--sd/source/ui/remotecontrol/OSXNetworkService.mm2
-rw-r--r--sd/source/ui/remotecontrol/Receiver.cxx6
-rw-r--r--sd/source/ui/remotecontrol/ZeroconfService.hxx5
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx24
9 files changed, 46 insertions, 27 deletions
diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index 8fa24f522ecc..c1a66ca5f620 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -71,12 +71,20 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sd_uimpress,\
))
endif
+ifeq ($(OS), LINUX)
$(eval $(call gb_CppunitTest_use_externals,sd_uimpress,\
boost_headers \
- gtk \
- dbus \
- avahi \
+ gtk \
+ dbus \
+ avahi \
))
+else
+$(eval $(call gb_CppunitTest_use_externals,sd_uimpress,\
+ boost_headers \
+ gtk \
+ dbus \
+))
+endif
$(eval $(call gb_CppunitTest_add_exception_objects,sd_uimpress,\
sd/qa/unit/uimpress \
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index a6b759092909..9466102eb587 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -94,12 +94,20 @@ $(eval $(call gb_Library_use_libraries,sd,\
$(gb_UWINAPI) \
))
+ifeq ($(OS), LINUX)
$(eval $(call gb_Library_use_externals,sd,\
boost_headers \
libxml2 \
dbus \
avahi \
))
+else
+$(eval $(call gb_Library_use_externals,sd,\
+ boost_headers \
+ libxml2 \
+ dbus \
+))
+endif
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_system_win32_libs,sd,\
@@ -537,10 +545,6 @@ $(eval $(call gb_Library_add_objcxxobjects,sd,\
sd/source/ui/remotecontrol/OSXNetworkService \
))
-$(eval $(call gb_Library_add_exception_objects,sd,\
- sd/source/ui/remotecontrol/OSXNetworkService \
-))
-
else
ifeq ($(OS),LINUX)
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index eba3aa07605c..262c47abc0fb 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -13,7 +13,6 @@
#include <unistd.h>
#include <algorithm>
#include <vector>
-#include <thread>
#include <iostream>
#include <comphelper/processfactory.hxx>
diff --git a/sd/source/ui/remotecontrol/OSXNetworkService.h b/sd/source/ui/remotecontrol/OSXNetworkService.h
index f0af0dac655b..f8f0e9c958b6 100644
--- a/sd/source/ui/remotecontrol/OSXNetworkService.h
+++ b/sd/source/ui/remotecontrol/OSXNetworkService.h
@@ -19,7 +19,7 @@
#import <Foundation/NSRunLoop.h>
#include <postmac.h>
-@interface OSXNetworkService : NSObject<NSNetServiceDelegate>
+@interface OSXBonjourService : NSObject<NSNetServiceDelegate>
{
NSNetService *netService;
}
diff --git a/sd/source/ui/remotecontrol/OSXNetworkService.hxx b/sd/source/ui/remotecontrol/OSXNetworkService.hxx
index 6659d7530182..bbbc0cff03cd 100644
--- a/sd/source/ui/remotecontrol/OSXNetworkService.hxx
+++ b/sd/source/ui/remotecontrol/OSXNetworkService.hxx
@@ -7,7 +7,6 @@
#include <string.h>
#include <algorithm>
#include <vector>
-#include <thread>
#include <iostream>
#include <osl/conditn.hxx> // Include this early to avoid error as check() gets defined by some SDK header to empty
@@ -22,16 +21,16 @@ namespace sd {
class OSXNetworkService : public ZeroconfService
{
private:
- OSXNetworkService osxservice;
+ OSXBonjourService *osxservice;
public:
- OSXNetworkService(const string& aname = "", uint aport = 1599)
+ OSXNetworkService(const std::string& aname = "", unsigned int aport = 1599)
: ZeroconfService(aname, aport){}
void clear() {
[osxservice dealloc];
}
void setup() {
- osxservice = [[OSXNetworkService alloc] init];
+ osxservice = [[OSXBonjourService alloc] init];
[osxservice publishImpressRemoteServiceOnLocalNetworkWithName: @""];
};
};
diff --git a/sd/source/ui/remotecontrol/OSXNetworkService.mm b/sd/source/ui/remotecontrol/OSXNetworkService.mm
index 8e81def93ef4..d7f3ebc3ba0b 100644
--- a/sd/source/ui/remotecontrol/OSXNetworkService.mm
+++ b/sd/source/ui/remotecontrol/OSXNetworkService.mm
@@ -13,7 +13,7 @@
#import "OSXNetworkService.h"
#include <postmac.h>
-@implementation OSXNetworkService
+@implementation OSXBonjourService
- (void) publishImpressRemoteServiceOnLocalNetworkWithName:(NSString *)sName
{
diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx
index 556926d23102..40fc7342a637 100644
--- a/sd/source/ui/remotecontrol/Receiver.cxx
+++ b/sd/source/ui/remotecontrol/Receiver.cxx
@@ -121,12 +121,12 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
}
else if (aCommand[0].equals( "pointer_started" ))
{
- xSlideShowController->setPointerMode(true);
+ // xSlideShowController->setPointerMode(true);
std::cerr << "Pointer started, we display the pointer on screen"<< std::endl;
}
else if (aCommand[0].equals( "pointer_dismissed" ))
{
- xSlideShowController->setPointerMode(false);
+ // xSlideShowController->setPointerMode(false);
std::cerr << "Pointer dismissed, we hide the pointer on screen"<< std::endl;
}
else if (aCommand[0].equals( "pointer_coordination" ))
@@ -136,7 +136,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
std::cerr << "("<<x<<","<<y<<")"<< std::endl;
const ::com::sun::star::geometry::RealPoint2D pos(x,y);
// Same problem here...
- xSlideShowController->setPointerPosition(pos);
+ // xSlideShowController->setPointerPosition(pos);
}
else if ( aCommand[0].equals( "presentation_resume" ) )
{
diff --git a/sd/source/ui/remotecontrol/ZeroconfService.hxx b/sd/source/ui/remotecontrol/ZeroconfService.hxx
index 2952fa4be4f6..a3e92fa279b8 100644
--- a/sd/source/ui/remotecontrol/ZeroconfService.hxx
+++ b/sd/source/ui/remotecontrol/ZeroconfService.hxx
@@ -15,13 +15,12 @@
struct sockaddr_in;
+typedef unsigned int uint;
+
namespace sd{
class ZeroconfService
{
- private:
- int mSocket;
-
protected:
std::string name;
uint port;
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index f7fda9b7ea04..68b9b7766731 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -3065,6 +3065,11 @@ void SAL_CALL SlideshowImpl::setPointerMode( bool bSwitchPointerMode ) throw (cs
makeAny( bSwitchPointerMode ),
beans::PropertyState_DIRECT_VALUE ) );
}
+ catch ( Exception& )
+ {
+ SAL_WARN( "sd.slideshow", "sd::SlideShowImpl::setPointerMode(), "
+ "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ));
+ }
}
// --------------------------------------------------------------------
@@ -3072,13 +3077,18 @@ void SAL_CALL SlideshowImpl::setPointerPosition( const ::com::sun::star::geometr
{
SolarMutexGuard aSolarGuard;
if (mxShow.is()) try
- {
- mxShow->setProperty(
- beans::PropertyValue( "PointerPosition" ,
- -1,
- makeAny( pos ),
- beans::PropertyState_DIRECT_VALUE ) );
- }
+ {
+ mxShow->setProperty(
+ beans::PropertyValue( "PointerPosition" ,
+ -1,
+ makeAny( pos ),
+ beans::PropertyState_DIRECT_VALUE ) );
+ }
+ catch ( Exception& )
+ {
+ SAL_WARN( "sd.slideshow", "sd::SlideShowImpl::setPointerPosition(), "
+ "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ));
+ }
}
// --------------------------------------------------------------------