diff options
Diffstat (limited to 'Swiften/Network')
-rw-r--r-- | Swiften/Network/BoostNetworkFactories.cpp | 3 | ||||
-rw-r--r-- | Swiften/Network/BoostNetworkFactories.h | 5 | ||||
-rw-r--r-- | Swiften/Network/NetworkFactories.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/Swiften/Network/BoostNetworkFactories.cpp b/Swiften/Network/BoostNetworkFactories.cpp index 315290c..56be2b7 100644 --- a/Swiften/Network/BoostNetworkFactories.cpp +++ b/Swiften/Network/BoostNetworkFactories.cpp @@ -10,6 +10,7 @@ #include <Swiften/Network/PlatformDomainNameResolver.h> #include <Swiften/Network/BoostConnectionServerFactory.h> #include <Swiften/Network/PlatformNATTraversalWorker.h> +#include <Swiften/Parser/PlatformXMLParserFactory.h> #include <Swiften/Network/NullNATTraverser.h> namespace Swift { @@ -24,9 +25,11 @@ BoostNetworkFactories::BoostNetworkFactories(EventLoop* eventLoop) { #else natTraverser = new NullNATTraverser(eventLoop); #endif + xmlParserFactory = new PlatformXMLParserFactory(); } BoostNetworkFactories::~BoostNetworkFactories() { + delete xmlParserFactory; delete natTraverser; delete connectionServerFactory; delete domainNameResolver; diff --git a/Swiften/Network/BoostNetworkFactories.h b/Swiften/Network/BoostNetworkFactories.h index bc7a963..c9ecb59 100644 --- a/Swiften/Network/BoostNetworkFactories.h +++ b/Swiften/Network/BoostNetworkFactories.h @@ -42,6 +42,10 @@ namespace Swift { return natTraverser; } + virtual XMLParserFactory* getXMLParserFactory() const { + return xmlParserFactory; + } + private: BoostIOServiceThread ioServiceThread; TimerFactory* timerFactory; @@ -49,5 +53,6 @@ namespace Swift { DomainNameResolver* domainNameResolver; ConnectionServerFactory* connectionServerFactory; NATTraverser* natTraverser; + XMLParserFactory* xmlParserFactory; }; } diff --git a/Swiften/Network/NetworkFactories.h b/Swiften/Network/NetworkFactories.h index 05ddfe3..42c9f6a 100644 --- a/Swiften/Network/NetworkFactories.h +++ b/Swiften/Network/NetworkFactories.h @@ -12,6 +12,7 @@ namespace Swift { class DomainNameResolver; class ConnectionServerFactory; class NATTraverser; + class XMLParserFactory; /** * An interface collecting network factories. @@ -25,5 +26,6 @@ namespace Swift { virtual DomainNameResolver* getDomainNameResolver() const = 0; virtual ConnectionServerFactory* getConnectionServerFactory() const = 0; virtual NATTraverser* getNATTraverser() const = 0; + virtual XMLParserFactory* getXMLParserFactory() const = 0; }; } |