summaryrefslogtreecommitdiffstats
blob: 31ae15a1016736d6f5fb8c7abe14a73387dc7b89 (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
#include <string>
#include <boost/bind.hpp>

#include "Swiften/Base/Platform.h"
#if defined(SWIFTEN_PLATFORM_MACOSX) || defined(SWIFTEN_PLATFORM_WINDOWS)
#include "Swiften/LinkLocal/AppleDNSSDService.h"
#else
#include "Swiften/LinkLocal/AvahiDNSSDService.h"
#endif
#include "Slimber/Server.h"
#include "Swiften/EventLoop/SimpleEventLoop.h"

using namespace Swift;

int main() {
	SimpleEventLoop eventLoop;

	boost::shared_ptr<DNSSDService> dnsSDService;
#if defined(SWIFTEN_PLATFORM_MACOSX) || defined(SWIFTEN_PLATFORM_WINDOWS)
	dnsSDService = boost::shared_ptr<AppleDNSSDService>(
			new AppleDNSSDService());
#else
	dnsSDService = boost::shared_ptr<AvahiDNSSDService>(
			new AvahiDNSSDService());
#endif

	Server server(5222, 5562, dnsSDService);
	eventLoop.run();
	return 0;
}