diff options
Diffstat (limited to 'Swiften/FileTransfer/OutgoingFileTransferManager.cpp')
-rw-r--r-- | Swiften/FileTransfer/OutgoingFileTransferManager.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/Swiften/FileTransfer/OutgoingFileTransferManager.cpp b/Swiften/FileTransfer/OutgoingFileTransferManager.cpp index 0ed2395..c74aefb 100644 --- a/Swiften/FileTransfer/OutgoingFileTransferManager.cpp +++ b/Swiften/FileTransfer/OutgoingFileTransferManager.cpp @@ -5,61 +5,61 @@ */ /* - * Copyright (c) 2013-2015 Isode Limited. + * Copyright (c) 2013-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/FileTransfer/OutgoingFileTransferManager.h> -#include <boost/smart_ptr/make_shared.hpp> +#include <memory> +#include <Swiften/Base/IDGenerator.h> +#include <Swiften/FileTransfer/OutgoingJingleFileTransfer.h> #include <Swiften/JID/JID.h> -#include <Swiften/Jingle/JingleSessionManager.h> -#include <Swiften/Jingle/JingleSessionImpl.h> #include <Swiften/Jingle/JingleContentID.h> -#include <Swiften/FileTransfer/OutgoingJingleFileTransfer.h> -#include <Swiften/Base/IDGenerator.h> +#include <Swiften/Jingle/JingleSessionImpl.h> +#include <Swiften/Jingle/JingleSessionManager.h> namespace Swift { OutgoingFileTransferManager::OutgoingFileTransferManager( - JingleSessionManager* jingleSessionManager, - IQRouter* router, - FileTransferTransporterFactory* transporterFactory, - TimerFactory* timerFactory, - CryptoProvider* crypto) : - jingleSessionManager(jingleSessionManager), - iqRouter(router), - transporterFactory(transporterFactory), - timerFactory(timerFactory), - crypto(crypto) { - idGenerator = new IDGenerator(); + JingleSessionManager* jingleSessionManager, + IQRouter* router, + FileTransferTransporterFactory* transporterFactory, + TimerFactory* timerFactory, + CryptoProvider* crypto) : + jingleSessionManager(jingleSessionManager), + iqRouter(router), + transporterFactory(transporterFactory), + timerFactory(timerFactory), + crypto(crypto) { + idGenerator = new IDGenerator(); } OutgoingFileTransferManager::~OutgoingFileTransferManager() { - delete idGenerator; + delete idGenerator; } -boost::shared_ptr<OutgoingFileTransfer> OutgoingFileTransferManager::createOutgoingFileTransfer( - const JID& from, - const JID& recipient, - boost::shared_ptr<ReadBytestream> readBytestream, - const JingleFileTransferFileInfo& fileInfo, - const FileTransferOptions& config) { - JingleSessionImpl::ref jingleSession = boost::make_shared<JingleSessionImpl>( - from, recipient, idGenerator->generateID(), iqRouter); - jingleSessionManager->registerOutgoingSession(from, jingleSession); - return boost::shared_ptr<OutgoingJingleFileTransfer>(new OutgoingJingleFileTransfer( - recipient, - jingleSession, - readBytestream, - transporterFactory, - timerFactory, - idGenerator, - fileInfo, - config, - crypto)); +std::shared_ptr<OutgoingFileTransfer> OutgoingFileTransferManager::createOutgoingFileTransfer( + const JID& from, + const JID& recipient, + std::shared_ptr<ReadBytestream> readBytestream, + const JingleFileTransferFileInfo& fileInfo, + const FileTransferOptions& config) { + JingleSessionImpl::ref jingleSession = std::make_shared<JingleSessionImpl>( + from, recipient, idGenerator->generateID(), iqRouter); + jingleSessionManager->registerOutgoingSession(from, jingleSession); + return std::shared_ptr<OutgoingJingleFileTransfer>(new OutgoingJingleFileTransfer( + recipient, + jingleSession, + readBytestream, + transporterFactory, + timerFactory, + idGenerator, + fileInfo, + config, + crypto)); } } |