summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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;
+ };
+}