diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-19 20:41:07 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-19 20:41:07 (GMT) |
commit | a4f3cfa0e9932d123f115de76172128bc69cc255 (patch) | |
tree | 8d75961bb28e358b8f9ebbd1c33f3808cbe507f2 /Nim | |
parent | 2fe12d374a18bf4c96f98d3e02c484e8307c1fe0 (diff) | |
download | swift-a4f3cfa0e9932d123f115de76172128bc69cc255.zip swift-a4f3cfa0e9932d123f115de76172128bc69cc255.tar.bz2 |
Added beginnings of AvahiDNSSDService.
Diffstat (limited to 'Nim')
-rw-r--r-- | Nim/main.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Nim/main.cpp b/Nim/main.cpp index a9e9934..a048312 100644 --- a/Nim/main.cpp +++ b/Nim/main.cpp @@ -2,6 +2,7 @@ #include <boost/bind.hpp> #include <boost/shared_ptr.hpp> +#include "Swiften/Base/Platform.h" #include "Swiften/Session/SessionTracer.h" #include "Swiften/Network/BoostConnectionFactory.h" #include "Swiften/Elements/IQ.h" @@ -23,7 +24,6 @@ #include "Swiften/LinkLocal/OutgoingLinkLocalSession.h" #include "Swiften/LinkLocal/IncomingLinkLocalSession.h" #include "Swiften/LinkLocal/DNSSDService.h" -#include "Swiften/LinkLocal/AppleDNSSDService.h" #include "Swiften/Network/ConnectionServer.h" #include "Swiften/Network/BoostConnection.h" #include "Swiften/Network/BoostIOServiceThread.h" @@ -32,6 +32,12 @@ #include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h" #include "Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h" +#if defined(SWIFTEN_PLATFORM_MACOSX) || defined(SWIFTEN_PLATFORM_WINDOWS) +#include "Swiften/LinkLocal/AppleDNSSDService.h" +#else +#include "Swiften/LinkLocal/AvahiDNSSDService.h" +#endif + using namespace Swift; @@ -66,8 +72,13 @@ class Server { boost::bind(&Server::handleNewLinkLocalConnection, this, _1)); serverFromNetworkConnectionServer_->start(); +#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 dnsSDService_->onServiceRegistered.connect (boost::bind(&Server::handleServiceRegistered, this, _1)); linkLocalRoster_ = boost::shared_ptr<LinkLocalRoster>( @@ -312,7 +323,7 @@ class Server { IDGenerator idGenerator_; BoostIOServiceThread boostIOServiceThread_; DummyUserRegistry userRegistry_; - boost::shared_ptr<AppleDNSSDService> dnsSDService_; + boost::shared_ptr<DNSSDService> dnsSDService_; boost::shared_ptr<LinkLocalRoster> linkLocalRoster_; boost::shared_ptr<BoostConnectionServer> serverFromClientConnectionServer_; boost::shared_ptr<ServerFromClientSession> serverFromClientSession_; |