/* * Copyright (c) 2012 Yoann Blein * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #pragma once #include #include 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 createOugoingScreenSharing(const JID& to); public: boost::signal)> onNewIncomingScreenSharing; private: void handleIncomingScreenSharing(boost::shared_ptr incomingScreenSharing); void handleGrabTimerTick(); void handleOssReady(); void handleIncomingFinished(); void handleOutgoingFinished(); private: ScreenSharingManager* screenSharingManager; RemoteScreenWindowFactory* remoteScreenWindowFactory; RemoteScreenWindow* remoteScreenWindow; boost::shared_ptr grabTimer; DesktopScreenGrabber* screenGrabber; boost::shared_ptr iss; boost::shared_ptr oss; }; }