summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-07-31 18:38:11 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-07-31 18:38:11 (GMT)
commit99b65c4dd72105755a7cf95297c9cf69dcbc6446 (patch)
treec6c862f6ef33b2260c44c0229b29f65351223e7c /Swiften/LinkLocal/AppleDNSSDService.h
parentfed11bbc3bffd383e097ea63bb92442ce2daf6ed (diff)
parentaa60aa80d2d170a536c246ef6c221f92de7dd8ed (diff)
downloadswift-99b65c4dd72105755a7cf95297c9cf69dcbc6446.zip
swift-99b65c4dd72105755a7cf95297c9cf69dcbc6446.tar.bz2
Merge commit 'origin/master' into roster
Diffstat (limited to 'Swiften/LinkLocal/AppleDNSSDService.h')
-rw-r--r--Swiften/LinkLocal/AppleDNSSDService.h56
1 files changed, 0 insertions, 56 deletions
diff --git a/Swiften/LinkLocal/AppleDNSSDService.h b/Swiften/LinkLocal/AppleDNSSDService.h
deleted file mode 100644
index fe4a648..0000000
--- a/Swiften/LinkLocal/AppleDNSSDService.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#pragma once
-
-#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"
-
-namespace Swift {
- class AppleDNSSDService : public DNSSDService, public EventOwner, public boost::enable_shared_from_this<AppleDNSSDService> {
- public:
- AppleDNSSDService();
- ~AppleDNSSDService();
-
- virtual void start();
- virtual void stop();
-
- virtual void registerService(const String& name, int port, const LinkLocalServiceInfo&);
- virtual void updateService(const LinkLocalServiceInfo&);
- virtual void unregisterService();
-
- virtual void startResolvingService(const Service&);
- virtual void stopResolvingService(const Service&);
-
- virtual void resolveHostname(const String& hostname, int interfaceIndex = 0);
-
- 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 *);
- static void handleServiceResolvedGlobal(DNSServiceRef, DNSServiceFlags, uint32_t, DNSServiceErrorType, const char *, const char *, uint16_t, uint16_t, const unsigned char *, void *);
- void handleServiceResolved(DNSServiceRef, DNSServiceFlags, uint32_t, DNSServiceErrorType, const char *, const char *, uint16_t, uint16_t, const unsigned char *);
- static void handleHostnameResolvedGlobal(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, const char *hostname, const struct sockaddr *address, uint32_t ttl, void *context);
- void handleHostnameResolved(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, const char *hostname, const struct sockaddr *address, uint32_t ttl);
-
- private:
- boost::thread* thread;
- bool stopRequested;
- bool haveError;
- int interruptSelectReadSocket;
- int interruptSelectWriteSocket;
- boost::mutex sdRefsMutex;
- DNSServiceRef browseSDRef;
- DNSServiceRef registerSDRef;
- typedef std::map<Service, DNSServiceRef> ServiceSDRefMap;
- ServiceSDRefMap resolveSDRefs;
- typedef std::vector<DNSServiceRef> HostnameSDRefs;
- HostnameSDRefs hostnameResolveSDRefs;
- };
-}