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/ScreenSharing/OutgoingScreenSharing.h
parent4e0236b08d3914d24af32f45bc99663a73c6d83a (diff)
downloadswift-contrib-1b2d23c160b4c120a364ff9e86b54e2d8caeaaa4.zip
swift-contrib-1b2d23c160b4c120a364ff9e86b54e2d8caeaaa4.tar.bz2
Screen sharing managing
Diffstat (limited to 'Swiften/ScreenSharing/OutgoingScreenSharing.h')
-rw-r--r--Swiften/ScreenSharing/OutgoingScreenSharing.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/Swiften/ScreenSharing/OutgoingScreenSharing.h b/Swiften/ScreenSharing/OutgoingScreenSharing.h
new file mode 100644
index 0000000..d93b476
--- /dev/null
+++ b/Swiften/ScreenSharing/OutgoingScreenSharing.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2012 Yoann Blein
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include <Swiften/ScreenSharing/ScreenSharing.h>
+#include <Swiften/Jingle/JingleContentID.h>
+
+namespace Swift {
+ class ConnectivityManager;
+ class JingleDescription;
+ class JingleTransportPayload;
+ class TimerFactory;
+ class Timer;
+
+ class OutgoingScreenSharing : public ScreenSharing {
+ public:
+ typedef boost::shared_ptr<OutgoingScreenSharing> ref;
+
+ public:
+ OutgoingScreenSharing(boost::shared_ptr<JingleSession> session, UDPSocketFactory* udpSocketFactory, TimerFactory* timerFactory);
+ virtual ~OutgoingScreenSharing();
+
+ virtual void cancel();
+
+ void start();
+
+ private:
+ void handleSocketConnected();
+ void handleSessionAcceptReceived(const JingleContentID& /*id*/, boost::shared_ptr<JingleDescription> /*desc*/, boost::shared_ptr<JingleTransportPayload> /*transport*/);
+ void handleConnectionFailed();
+ void startRTPSession();
+
+ private:
+ JingleContentID contentID;
+ bool canceled;
+ bool sessionAccepted;
+ bool socketConnected;
+
+ TimerFactory* timerFactory;
+ boost::shared_ptr<Timer> connectionTimer;
+ };
+}