diff options
Diffstat (limited to 'Swiften/LinkLocal/AppleDNSSDService.h')
| -rw-r--r-- | Swiften/LinkLocal/AppleDNSSDService.h | 16 | 
1 files changed, 15 insertions, 1 deletions
diff --git a/Swiften/LinkLocal/AppleDNSSDService.h b/Swiften/LinkLocal/AppleDNSSDService.h index e6bedf7..3607ce0 100644 --- a/Swiften/LinkLocal/AppleDNSSDService.h +++ b/Swiften/LinkLocal/AppleDNSSDService.h @@ -2,6 +2,8 @@  #include <boost/enable_shared_from_this.hpp>  #include <boost/thread.hpp> +#include <boost/thread/mutex.hpp> +#include <dns_sd.h>  #include "Swiften/LinkLocal/DNSSDService.h"  #include "Swiften/EventLoop/EventOwner.h" @@ -12,15 +14,27 @@ namespace Swift {  			AppleDNSSDService();  			~AppleDNSSDService(); -			virtual void publishService(const std::map<String,String> properties); +			virtual void registerService(const String& name, int port, const std::map<String,String>& properties); +			virtual void unregisterService();  			virtual void start();  			virtual void stop();  		private:  			void doStart(); +			void interruptSelect(); + +			static void handleServiceDiscoveredGlobal(DNSServiceRef, DNSServiceFlags, uint32_t, DNSServiceErrorType, const char *, const char *, const char *, void*); +			void handleServiceDiscovered(DNSServiceRef, DNSServiceFlags, uint32_t, DNSServiceErrorType, const char *, const char *, const char *); +			static void handleServiceRegisteredGlobal(DNSServiceRef, DNSServiceFlags, DNSServiceErrorType, const char *, const char *, const char *, void *); +			void handleServiceRegistered(DNSServiceRef, DNSServiceFlags, DNSServiceErrorType, const char *, const char *, const char *);  		private:  			boost::thread* thread;  			bool stopRequested; +			int interruptSelectReadSocket; +			int interruptSelectWriteSocket; +			boost::mutex sdRefsMutex; +			DNSServiceRef browseSDRef; +			DNSServiceRef registerSDRef;  	};  }  | 
 Swift