summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client/Client.cpp')
-rw-r--r--Swiften/Client/Client.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp
index c53bcaf..e95e704 100644
--- a/Swiften/Client/Client.cpp
+++ b/Swiften/Client/Client.cpp
@@ -26,6 +26,9 @@
#include <Swiften/TLS/BlindCertificateTrustChecker.h>
#include <Swiften/Client/NickManagerImpl.h>
#include <Swiften/Client/ClientSession.h>
+#include <Swiften/Jingle/JingleSessionManager.h>
+#include <Swiften/Network/NetworkFactories.h>
+#include <Swiften/FileTransfer/FileTransferManagerImpl.h>
namespace Swift {
@@ -59,9 +62,15 @@ Client::Client(const JID& jid, const SafeString& password, NetworkFactories* net
nickResolver = new NickResolver(jid.toBare(), roster, vcardManager, mucRegistry);
blindCertificateTrustChecker = new BlindCertificateTrustChecker();
+
+ jingleSessionManager = new JingleSessionManager(getIQRouter());
+ fileTransferManager = NULL;
}
Client::~Client() {
+ delete fileTransferManager;
+ delete jingleSessionManager;
+
delete blindCertificateTrustChecker;
delete nickResolver;
@@ -98,6 +107,10 @@ void Client::setSoftwareVersion(const std::string& name, const std::string& vers
softwareVersionResponder->setVersion(name, version, os);
}
+void Client::handleConnected() {
+ fileTransferManager = new FileTransferManagerImpl(getJID(), jingleSessionManager, getIQRouter(), getEntityCapsProvider(), presenceOracle, getNetworkFactories()->getConnectionFactory(), getNetworkFactories()->getConnectionServerFactory(), getNetworkFactories()->getTimerFactory(), getNetworkFactories()->getPlatformNATTraversalWorker());
+}
+
void Client::requestRoster() {
// FIXME: We should set this once when the session is finished, but there
// is currently no callback for this
@@ -139,4 +152,8 @@ NickManager* Client::getNickManager() const {
return nickManager;
}
+FileTransferManager* Client::getFileTransferManager() const {
+ return fileTransferManager;
+}
+
}