summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/Client.cpp9
-rw-r--r--Swiften/Client/Client.h9
2 files changed, 14 insertions, 4 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp
index e95e704..48eddc2 100644
--- a/Swiften/Client/Client.cpp
+++ b/Swiften/Client/Client.cpp
@@ -29,6 +29,9 @@
#include <Swiften/Jingle/JingleSessionManager.h>
#include <Swiften/Network/NetworkFactories.h>
#include <Swiften/FileTransfer/FileTransferManagerImpl.h>
+#ifndef SWIFT_EXPERIMENTAL_FT
+#include <Swiften/FileTransfer/UnitTest/DummyFileTransferManager.h>
+#endif
namespace Swift {
@@ -108,7 +111,11 @@ void Client::setSoftwareVersion(const std::string& name, const std::string& vers
}
void Client::handleConnected() {
- fileTransferManager = new FileTransferManagerImpl(getJID(), jingleSessionManager, getIQRouter(), getEntityCapsProvider(), presenceOracle, getNetworkFactories()->getConnectionFactory(), getNetworkFactories()->getConnectionServerFactory(), getNetworkFactories()->getTimerFactory(), getNetworkFactories()->getPlatformNATTraversalWorker());
+#ifdef SWIFT_EXPERIMENTAL_FT
+ fileTransferManager = new FileTransferManagerImpl(getJID(), jingleSessionManager, getIQRouter(), getEntityCapsProvider(), presenceOracle, getNetworkFactories()->getConnectionFactory(), getNetworkFactories()->getConnectionServerFactory(), getNetworkFactories()->getTimerFactory(), getNetworkFactories()->getNATTraverser());
+#else
+ fileTransferManager = new DummyFileTransferManager();
+#endif
}
void Client::requestRoster() {
diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h
index 7269f10..940a526 100644
--- a/Swiften/Client/Client.h
+++ b/Swiften/Client/Client.h
@@ -35,7 +35,7 @@ namespace Swift {
class NickManager;
class FileTransferManager;
class JingleSessionManager;
- class FileTransferManagerImpl;
+ class FileTransferManager;
/**
* Provides the core functionality for writing XMPP client software.
@@ -136,7 +136,10 @@ namespace Swift {
}
/**
- * Returns a FileTransferManager for the client. This is only available after the onConnected signal has been fired.
+ * Returns a FileTransferManager for the client. This is only available after the onConnected
+ * signal has been fired.
+ *
+ * WARNING: File transfer will only work if Swiften is built in 'experimental' mode.
*/
FileTransferManager* getFileTransferManager() const;
@@ -180,7 +183,7 @@ namespace Swift {
MUCManager* mucManager;
ClientDiscoManager* discoManager;
JingleSessionManager* jingleSessionManager;
- FileTransferManagerImpl* fileTransferManager;
+ FileTransferManager* fileTransferManager;
BlindCertificateTrustChecker* blindCertificateTrustChecker;
};
}