summaryrefslogtreecommitdiffstats
blob: 321bd96181a92b667893c27e00176ae997582403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include <boost/shared_ptr.hpp>
#include <boost/optional.hpp>

#include "Swiften/LinkLocal/DNSSDService.h"

namespace Swift {
	class HostAddress;

	class LinkLocalRoster {
		public:
			LinkLocalRoster(boost::shared_ptr<DNSSDService> service);

		private:
			void handleStopped(bool);
			void handleServiceRegistered(const DNSSDService::Service& service);
			void handleServiceAdded(const DNSSDService::Service&);
			void handleServiceRemoved(const DNSSDService::Service&);
			void handleServiceResolved(const DNSSDService::Service& service, const DNSSDService::ResolveResult& result);
			void handleHostnameResolved(const String& hostname, const boost::optional<HostAddress>& address);

		private:
			boost::shared_ptr<DNSSDService> dnsSDService;
			boost::optional<DNSSDService::Service> selfService;
	};
}