diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-07-31 18:38:11 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-07-31 18:38:11 (GMT) |
commit | 99b65c4dd72105755a7cf95297c9cf69dcbc6446 (patch) | |
tree | c6c862f6ef33b2260c44c0229b29f65351223e7c /Slimber/CLI/main.cpp | |
parent | fed11bbc3bffd383e097ea63bb92442ce2daf6ed (diff) | |
parent | aa60aa80d2d170a536c246ef6c221f92de7dd8ed (diff) | |
download | swift-99b65c4dd72105755a7cf95297c9cf69dcbc6446.zip swift-99b65c4dd72105755a7cf95297c9cf69dcbc6446.tar.bz2 |
Merge commit 'origin/master' into roster
Diffstat (limited to 'Slimber/CLI/main.cpp')
-rw-r--r-- | Slimber/CLI/main.cpp | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/Slimber/CLI/main.cpp b/Slimber/CLI/main.cpp index 40f41c8..b82ffcd 100644 --- a/Slimber/CLI/main.cpp +++ b/Slimber/CLI/main.cpp @@ -2,14 +2,12 @@ #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 "Slimber/FileVCardCollection.h" -#include "Swiften/LinkLocal/LinkLocalRoster.h" +#include "Swiften/LinkLocal/LinkLocalServiceBrowser.h" +#include "Swiften/LinkLocal/DNSSD/DNSSDBrowseQuery.h" +#include "Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h" +#include "Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.h" #include "Swiften/EventLoop/SimpleEventLoop.h" #include "Swiften/Application/Platform/PlatformApplication.h" @@ -17,21 +15,16 @@ using namespace Swift; int main() { SimpleEventLoop eventLoop; + boost::shared_ptr<BonjourQuerier> querier(new BonjourQuerier()); + querier->start(); + LinkLocalServiceBrowser browser(querier); + browser.start(); - 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 - - boost::shared_ptr<LinkLocalRoster> linkLocalRoster = boost::shared_ptr<LinkLocalRoster>(new LinkLocalRoster(dnsSDService)); - +/* FileVCardCollection vCardCollection(PlatformApplication("Slimber").getSettingsDir()); - Server server(5222, 5562, linkLocalRoster, dnsSDService, &vCardCollection); + */ + eventLoop.run(); return 0; } |