summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/ScreenSharing/ScreenSharingController.h')
-rw-r--r--Swift/Controllers/ScreenSharing/ScreenSharingController.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/Swift/Controllers/ScreenSharing/ScreenSharingController.h b/Swift/Controllers/ScreenSharing/ScreenSharingController.h
new file mode 100644
index 0000000..6bae132
--- /dev/null
+++ b/Swift/Controllers/ScreenSharing/ScreenSharingController.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2012 Yoann Blein
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Base/boost_bsignals.h>
+
+#include <boost/shared_ptr.hpp>
+
+namespace Swift {
+ class ScreenSharingManager;
+ class IncomingScreenSharing;
+ class OutgoingScreenSharing;
+ class Timer;
+ class TimerFactory;
+ class DesktopScreenGrabber;
+ class RemoteScreenWindowFactory;
+ class RemoteScreenWindow;
+ class JID;
+
+ class ScreenSharingController {
+ public:
+ ScreenSharingController(ScreenSharingManager* screenSharingManager, RemoteScreenWindowFactory* remoteScreenWindowFactory, TimerFactory* timerFactory);
+ ~ScreenSharingController();
+
+ boost::shared_ptr<OutgoingScreenSharing> createOugoingScreenSharing(const JID& to);
+
+ public:
+ boost::signal<void (boost::shared_ptr<IncomingScreenSharing>)> onNewIncomingScreenSharing;
+
+ private:
+ void handleIncomingScreenSharing(boost::shared_ptr<IncomingScreenSharing> incomingScreenSharing);
+ void handleGrabTimerTick();
+ void handleOssReady();
+ void handleIncomingFinished();
+ void handleOutgoingFinished();
+
+ private:
+ ScreenSharingManager* screenSharingManager;
+ RemoteScreenWindowFactory* remoteScreenWindowFactory;
+
+ RemoteScreenWindow* remoteScreenWindow;
+ boost::shared_ptr<Timer> grabTimer;
+ DesktopScreenGrabber* screenGrabber;
+ boost::shared_ptr<IncomingScreenSharing> iss;
+ boost::shared_ptr<OutgoingScreenSharing> oss;
+ };
+}