diff options
author | Siqi <me@siqi.fr> | 2013-07-24 11:16:31 +0200 |
---|---|---|
committer | Siqi LIU <me@siqi.fr> | 2013-07-25 17:28:01 +0200 |
commit | d041980a7aad0e6d111752ca98db42f9853a3c6b (patch) | |
tree | b3a03f624d335baf19d38dd633361d331ae63479 /sd/source/ui/remotecontrol/DiscoveryService.cxx | |
parent | 3b28ec6855e5df0629427752d7dafae1f0a277d4 (diff) |
avahi patch
Change-Id: I782389f00f486158313fd87bd36c0726f56f6ab6
Signed-off-by: Siqi LIU <me@siqi.fr>
Diffstat (limited to 'sd/source/ui/remotecontrol/DiscoveryService.cxx')
-rw-r--r-- | sd/source/ui/remotecontrol/DiscoveryService.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx index cfe769143346..cae88f148270 100644 --- a/sd/source/ui/remotecontrol/DiscoveryService.cxx +++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx @@ -41,6 +41,10 @@ #import "OSXNetworkService.h" #endif +#ifdef LINUX + #include "AvahiNetworkService.hxx" +#endif + using namespace osl; using namespace rtl; using namespace sd; @@ -51,7 +55,12 @@ DiscoveryService::DiscoveryService() OSXNetworkService * service = [[OSXNetworkService alloc] init]; [service publishImpressRemoteServiceOnLocalNetworkWithName: @""]; #endif -// #else + +#ifdef LINUX +// Avahi for Linux + start_avahi_service("HP"); +#endif + mSocket = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); sockaddr_in aAddr; @@ -89,7 +98,10 @@ DiscoveryService::DiscoveryService() DiscoveryService::~DiscoveryService() { -// #ifndef MACOSX + #ifdef LINUX + clean_avahi_service(); + #endif + #ifdef WNT closesocket( mSocket ); #else |