summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordknn <yoann.blein@free.fr>2012-07-08 20:27:27 (GMT)
committerdknn <yoann.blein@free.fr>2012-09-22 09:00:01 (GMT)
commit1b2d23c160b4c120a364ff9e86b54e2d8caeaaa4 (patch)
tree94c9884d7746786568d0da2d6e122dd0f0b5ca9c /Swiften/Client
parent4e0236b08d3914d24af32f45bc99663a73c6d83a (diff)
downloadswift-contrib-1b2d23c160b4c120a364ff9e86b54e2d8caeaaa4.zip
swift-contrib-1b2d23c160b4c120a364ff9e86b54e2d8caeaaa4.tar.bz2
Screen sharing managing
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/Client.cpp11
-rw-r--r--Swiften/Client/Client.h10
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;
};
}