summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-09-24 18:18:28 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-09-25 17:42:32 (GMT)
commit94f87ffc9769f2782b2267db813854b0fe752678 (patch)
tree56244712ade2be0d4a0a093d7721d18050e74f87 /Swiften/Network/BoostNetworkFactories.cpp
parent4f62e5ec4b42929fe3c1a68667e63cb1b7a35509 (diff)
downloadswift-contrib-94f87ffc9769f2782b2267db813854b0fe752678.zip
swift-contrib-94f87ffc9769f2782b2267db813854b0fe752678.tar.bz2
File transfer changes.
- Introduce 'experimental' flag to conditionally compile FT. - Use LibMiniUPNPC and NATPMP CPPDEFINES only locally in the classes that need them. - Extract abstract interface from NAT traversal classes - Avoid unit test warnings
Diffstat (limited to 'Swiften/Network/BoostNetworkFactories.cpp')
-rw-r--r--Swiften/Network/BoostNetworkFactories.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Swiften/Network/BoostNetworkFactories.cpp b/Swiften/Network/BoostNetworkFactories.cpp
index c13270f..315290c 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/Network/NullNATTraverser.h>
namespace Swift {
@@ -18,11 +19,15 @@ BoostNetworkFactories::BoostNetworkFactories(EventLoop* eventLoop) {
connectionFactory = new BoostConnectionFactory(ioServiceThread.getIOService(), eventLoop);
domainNameResolver = new PlatformDomainNameResolver(eventLoop);
connectionServerFactory = new BoostConnectionServerFactory(ioServiceThread.getIOService(), eventLoop);
- platformNATTraversalWorker = new PlatformNATTraversalWorker(eventLoop);
+#ifdef SWIFT_EXPERIMENTAL_FT
+ natTraverser = new PlatformNATTraversalWorker(eventLoop);
+#else
+ natTraverser = new NullNATTraverser(eventLoop);
+#endif
}
BoostNetworkFactories::~BoostNetworkFactories() {
- delete platformNATTraversalWorker;
+ delete natTraverser;
delete connectionServerFactory;
delete domainNameResolver;
delete connectionFactory;