summaryrefslogtreecommitdiffstats
blob: 214cad49ad1b2b5547a609e54b8d5ccb7e19db00 (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
28
29
30
31
32
#pragma once

#include <boost/signal.hpp>
#include <map>

#include "Swiften/Base/String.h"

namespace Swift {
	class LinkLocalServiceInfo;

	class DNSSDService {
		public:
			struct Service {
				Service(const String& name, const String& type, const String& domain, int networkInterface) : name(name), type(type), domain(domain), networkInterface(networkInterface) {}
				String name;
				String type;
				String domain;
				int networkInterface;
			};

			virtual ~DNSSDService();

			virtual void registerService(const String& name, int port, const LinkLocalServiceInfo&) = 0;
			virtual void unregisterService() = 0;
			virtual void start() = 0;

			boost::signal<void (const Service&)> onServiceAdded;
			boost::signal<void (const Service&)> onServiceRemoved;
			boost::signal<void (const Service&)> onServiceRegistered;
			boost::signal<void ()> onError;
	};
}