diff options
Diffstat (limited to 'Swiften/Network')
-rw-r--r-- | Swiften/Network/BoostNetworkFactories.cpp | 5 | ||||
-rw-r--r-- | Swiften/Network/BoostNetworkFactories.h | 5 | ||||
-rw-r--r-- | Swiften/Network/NetworkFactories.h | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/Swiften/Network/BoostNetworkFactories.cpp b/Swiften/Network/BoostNetworkFactories.cpp index fc52b08..b9d5b49 100644 --- a/Swiften/Network/BoostNetworkFactories.cpp +++ b/Swiften/Network/BoostNetworkFactories.cpp @@ -7,15 +7,18 @@ #include "Swiften/Network/BoostNetworkFactories.h" #include "Swiften/Network/BoostTimerFactory.h" #include "Swiften/Network/BoostConnectionFactory.h" +#include <Swiften/Network/PlatformDomainNameResolver.h> namespace Swift { BoostNetworkFactories::BoostNetworkFactories(EventLoop* eventLoop) { timerFactory = new BoostTimerFactory(&ioServiceThread.getIOService(), eventLoop); - connectionFactory = new BoostConnectionFactory(&ioServiceThread.getIOService(), eventLoop); + connectionFactory = new BoostConnectionFactory(&ioServiceThread.getIOService(), eventLoop); + domainNameResolver = new PlatformDomainNameResolver(eventLoop); } BoostNetworkFactories::~BoostNetworkFactories() { + delete domainNameResolver; delete connectionFactory; delete timerFactory; } diff --git a/Swiften/Network/BoostNetworkFactories.h b/Swiften/Network/BoostNetworkFactories.h index 3f8b557..cb7e359 100644 --- a/Swiften/Network/BoostNetworkFactories.h +++ b/Swiften/Network/BoostNetworkFactories.h @@ -29,9 +29,14 @@ namespace Swift { return &ioServiceThread; } + DomainNameResolver* getDomainNameResolver() const { + return domainNameResolver; + } + private: BoostIOServiceThread ioServiceThread; TimerFactory* timerFactory; ConnectionFactory* connectionFactory; + DomainNameResolver* domainNameResolver; }; } diff --git a/Swiften/Network/NetworkFactories.h b/Swiften/Network/NetworkFactories.h index 23e2780..b4400bd 100644 --- a/Swiften/Network/NetworkFactories.h +++ b/Swiften/Network/NetworkFactories.h @@ -9,6 +9,7 @@ namespace Swift { class TimerFactory; class ConnectionFactory; + class DomainNameResolver; /** * An interface collecting network factories. @@ -19,5 +20,6 @@ namespace Swift { virtual TimerFactory* getTimerFactory() const = 0; virtual ConnectionFactory* getConnectionFactory() const = 0; + virtual DomainNameResolver* getDomainNameResolver() const = 0; }; } |