summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-30 19:15:34 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-30 22:08:39 (GMT)
commitc8634883470be42eaa674aab05db61c46b005608 (patch)
treef0c05e8488c6f7845481d9ef27a56336a8912c55 /Swiften/LinkLocal/AvahiDNSSDService.h
parentf1938c7096f2ab77fb438d285f1eadb094010b0a (diff)
downloadswift-c8634883470be42eaa674aab05db61c46b005608.zip
swift-c8634883470be42eaa674aab05db61c46b005608.tar.bz2
Make Slimber use the new LinkLocal framework.
XMPP Server is temporarily out of order.
Diffstat (limited to 'Swiften/LinkLocal/AvahiDNSSDService.h')
-rw-r--r--Swiften/LinkLocal/AvahiDNSSDService.h55
1 files changed, 0 insertions, 55 deletions
diff --git a/Swiften/LinkLocal/AvahiDNSSDService.h b/Swiften/LinkLocal/AvahiDNSSDService.h
deleted file mode 100644
index 7162ade..0000000
--- a/Swiften/LinkLocal/AvahiDNSSDService.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#pragma once
-
-#include <map>
-#include <boost/enable_shared_from_this.hpp>
-#include <avahi-client/client.h>
-#include <avahi-client/lookup.h>
-#include <avahi-common/thread-watch.h>
-#include <avahi-common/watch.h>
-#include <avahi-common/malloc.h>
-#include <avahi-common/error.h>
-
-
-#include "Swiften/EventLoop/EventOwner.h"
-#include "Swiften/LinkLocal/DNSSDService.h"
-
-namespace Swift {
- class AvahiDNSSDService : public DNSSDService, public EventOwner, public boost::enable_shared_from_this<AvahiDNSSDService> {
- public:
- AvahiDNSSDService();
- ~AvahiDNSSDService();
-
- 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 DNSSDServiceID&);
- virtual void stopResolvingService(const DNSSDServiceID&);
-
- virtual void resolveHostname(const String& hostname, int interfaceIndex = 0);
-
- private:
- static void handleServiceDiscoveredGlobal(AvahiServiceBrowser *b, AvahiIfIndex networkInterface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name, const char *type, const char *domain, AvahiLookupResultFlags flags, void* userdata) {
- static_cast<AvahiDNSSDService*>(userdata)->handleServiceDiscovered(b, networkInterface, protocol, event, name, type, domain, flags);
- }
- void handleServiceDiscovered(AvahiServiceBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name, const char *type, const char *domain, AVAHI_GCC_UNUSED AvahiLookupResultFlags flags);
-
- static void handleServiceResolvedGlobal(AvahiServiceResolver *r, AvahiIfIndex interfaceIndex, AvahiProtocol protocol, AvahiResolverEvent event, const char *name, const char *type, const char *domain, const char *hostname, const AvahiAddress *address, uint16_t port, AvahiStringList *txt, AvahiLookupResultFlags flags, void* userdata) {
- static_cast<AvahiDNSSDService*>(userdata)->handleServiceResolved(r, interfaceIndex, protocol, event, name, type, domain, hostname, address, port, txt, flags);
- }
- void handleServiceResolved(AvahiServiceResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const char *name, const char *type, const char *domain, const char *hostname, const AvahiAddress *address, uint16_t port, AvahiStringList *txt, AvahiLookupResultFlags flags);
-
-
- private:
- AvahiClient* client;
- AvahiThreadedPoll* threadedPoll;
- AvahiServiceBrowser* serviceBrowser;
- typedef std::map<DNSSDServiceID, AvahiServiceResolver*> ServiceResolverMap;
- ServiceResolverMap serviceResolvers;
- typedef std::map<String, HostAddress> HostnameAddressMap;
- HostnameAddressMap hostnameAddresses;
- };
-}