diff options
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/Client.cpp | 11 | ||||
-rw-r--r-- | Swiften/Client/Client.h | 10 |
2 files changed, 20 insertions, 1 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp index 1a6c64b..c16d3b1 100644 --- a/Swiften/Client/Client.cpp +++ b/Swiften/Client/Client.cpp @@ -30,6 +30,7 @@ #include <Swiften/Network/NetworkFactories.h> #include <Swiften/FileTransfer/FileTransferManagerImpl.h> #include <Swiften/Whiteboard/WhiteboardSessionManager.h> +#include <Swiften/ScreenSharing/ScreenSharingManagerImpl.h> #ifndef SWIFT_EXPERIMENTAL_FT #include <Swiften/FileTransfer/UnitTest/DummyFileTransferManager.h> #endif @@ -69,6 +70,7 @@ Client::Client(const JID& jid, const SafeString& password, NetworkFactories* net jingleSessionManager = new JingleSessionManager(getIQRouter()); fileTransferManager = NULL; + screenSharingManager = NULL; whiteboardSessionManager = NULL; #ifdef SWIFT_EXPERIMENTAL_WB @@ -120,7 +122,9 @@ void Client::setSoftwareVersion(const std::string& name, const std::string& vers void Client::handleConnected() { #ifdef SWIFT_EXPERIMENTAL_FT - fileTransferManager = new FileTransferManagerImpl(getJID(), jingleSessionManager, getIQRouter(), getEntityCapsProvider(), presenceOracle, getNetworkFactories()->getConnectionFactory(), getNetworkFactories()->getConnectionServerFactory(), getNetworkFactories()->getTimerFactory(), getNetworkFactories()->getNATTraverser()); + NetworkFactories *nf = getNetworkFactories(); + fileTransferManager = new FileTransferManagerImpl(getJID(), jingleSessionManager, getIQRouter(), getEntityCapsProvider(), presenceOracle, nf->getConnectionFactory(), nf->getConnectionServerFactory(), nf->getTimerFactory(), nf->getNATTraverser()); + screenSharingManager = new ScreenSharingManagerImpl(getJID(), jingleSessionManager, getIQRouter(), nf->getUDPSocketFactory(), nf->getTimerFactory()); #else fileTransferManager = new DummyFileTransferManager(); #endif @@ -164,6 +168,11 @@ void Client::setAlwaysTrustCertificates() { setCertificateTrustChecker(blindCertificateTrustChecker); } +ScreenSharingManager *Client::getScreenSharingManager() const +{ + return screenSharingManager; +} + NickManager* Client::getNickManager() const { return nickManager; } diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h index 126572a..fde994e 100644 --- a/Swiften/Client/Client.h +++ b/Swiften/Client/Client.h @@ -37,6 +37,7 @@ namespace Swift { class JingleSessionManager; class FileTransferManager; class WhiteboardSessionManager; + class ScreenSharingManager; /** * Provides the core functionality for writing XMPP client software. @@ -153,6 +154,14 @@ namespace Swift { void setAlwaysTrustCertificates(); WhiteboardSessionManager* getWhiteboardSessionManager() const; + + /** + * Returns a ScreenSharingManager for the client. This is only available after the onConnected + * signal has been fired. + * + * WARNING: Screen sharing will only work if Swiften is built in 'experimental' mode. + */ + ScreenSharingManager* getScreenSharingManager() const; public: /** @@ -188,6 +197,7 @@ namespace Swift { JingleSessionManager* jingleSessionManager; FileTransferManager* fileTransferManager; BlindCertificateTrustChecker* blindCertificateTrustChecker; + ScreenSharingManager *screenSharingManager; WhiteboardSessionManager* whiteboardSessionManager; }; } |