diff options
Diffstat (limited to 'Swiften/Network')
-rw-r--r-- | Swiften/Network/BoostNetworkFactories.cpp | 11 | ||||
-rw-r--r-- | Swiften/Network/BoostNetworkFactories.h | 5 | ||||
-rw-r--r-- | Swiften/Network/NetworkFactories.h | 2 |
3 files changed, 14 insertions, 4 deletions
diff --git a/Swiften/Network/BoostNetworkFactories.cpp b/Swiften/Network/BoostNetworkFactories.cpp index 030fd49..2b4c04b 100644 --- a/Swiften/Network/BoostNetworkFactories.cpp +++ b/Swiften/Network/BoostNetworkFactories.cpp @@ -13,6 +13,7 @@ #include <Swiften/Parser/PlatformXMLParserFactory.h> #include <Swiften/Network/NullNATTraverser.h> #include <Swiften/TLS/PlatformTLSFactories.h> +#include <Swiften/Network/PlatformProxyProvider.h> namespace Swift { @@ -28,13 +29,11 @@ BoostNetworkFactories::BoostNetworkFactories(EventLoop* eventLoop) { #endif xmlParserFactory = new PlatformXMLParserFactory(); tlsFactories = new PlatformTLSFactories(); -} - -TLSContextFactory* BoostNetworkFactories::getTLSContextFactory() const { - return tlsFactories->getTLSContextFactory(); + proxyProvider = new PlatformProxyProvider(); } BoostNetworkFactories::~BoostNetworkFactories() { + delete proxyProvider; delete tlsFactories; delete xmlParserFactory; delete natTraverser; @@ -44,4 +43,8 @@ BoostNetworkFactories::~BoostNetworkFactories() { delete timerFactory; } +TLSContextFactory* BoostNetworkFactories::getTLSContextFactory() const { + return tlsFactories->getTLSContextFactory(); +} + } diff --git a/Swiften/Network/BoostNetworkFactories.h b/Swiften/Network/BoostNetworkFactories.h index 8f2b17a..3d268d1 100644 --- a/Swiften/Network/BoostNetworkFactories.h +++ b/Swiften/Network/BoostNetworkFactories.h @@ -49,6 +49,10 @@ namespace Swift { virtual TLSContextFactory* getTLSContextFactory() const; + virtual ProxyProvider* getProxyProvider() const { + return proxyProvider; + } + private: BoostIOServiceThread ioServiceThread; TimerFactory* timerFactory; @@ -58,5 +62,6 @@ namespace Swift { NATTraverser* natTraverser; XMLParserFactory* xmlParserFactory; PlatformTLSFactories* tlsFactories; + ProxyProvider* proxyProvider; }; } diff --git a/Swiften/Network/NetworkFactories.h b/Swiften/Network/NetworkFactories.h index 2404460..6eba2f3 100644 --- a/Swiften/Network/NetworkFactories.h +++ b/Swiften/Network/NetworkFactories.h @@ -15,6 +15,7 @@ namespace Swift { class XMLParserFactory; class TLSContextFactory; class CertificateFactory; + class ProxyProvider; /** * An interface collecting network factories. @@ -30,5 +31,6 @@ namespace Swift { virtual NATTraverser* getNATTraverser() const = 0; virtual XMLParserFactory* getXMLParserFactory() const = 0; virtual TLSContextFactory* getTLSContextFactory() const = 0; + virtual ProxyProvider* getProxyProvider() const = 0; }; } |