summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/ScreenSharing/ScreenSharingController.h')
-rw-r--r--Swift/Controllers/ScreenSharing/ScreenSharingController.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/Swift/Controllers/ScreenSharing/ScreenSharingController.h b/Swift/Controllers/ScreenSharing/ScreenSharingController.h
index 6bae132..11b4504 100644
--- a/Swift/Controllers/ScreenSharing/ScreenSharingController.h
+++ b/Swift/Controllers/ScreenSharing/ScreenSharingController.h
@@ -6,46 +6,53 @@
#pragma once
-#include <Swiften/Base/boost_bsignals.h>
+#include <Swiften/JID/JID.h>
+#include <Swiften/ScreenSharing/ScreenSharing.h>
#include <boost/shared_ptr.hpp>
namespace Swift {
+ class ScreenSharing;
class ScreenSharingManager;
class IncomingScreenSharing;
- class OutgoingScreenSharing;
class Timer;
class TimerFactory;
class DesktopScreenGrabber;
class RemoteScreenWindowFactory;
class RemoteScreenWindow;
- class JID;
+ class ChatWindow;
class ScreenSharingController {
public:
- ScreenSharingController(ScreenSharingManager* screenSharingManager, RemoteScreenWindowFactory* remoteScreenWindowFactory, TimerFactory* timerFactory);
+ ScreenSharingController(ScreenSharingManager* screenSharingManager, TimerFactory* timerFactory, DesktopScreenGrabber* desktopScreenGrabber, const JID& to);
+ ScreenSharingController(boost::shared_ptr<IncomingScreenSharing> screenSharing, RemoteScreenWindowFactory* remoteScreenWindowFactory);
~ScreenSharingController();
- boost::shared_ptr<OutgoingScreenSharing> createOugoingScreenSharing(const JID& to);
+ const JID& getOtherParty() const;
- public:
- boost::signal<void (boost::shared_ptr<IncomingScreenSharing>)> onNewIncomingScreenSharing;
+ std::string setChatWindow(ChatWindow *wnd, std::string nickname);
+
+ void accept();
+ void cancel();
+ void stop();
private:
- void handleIncomingScreenSharing(boost::shared_ptr<IncomingScreenSharing> incomingScreenSharing);
void handleGrabTimerTick();
- void handleOssReady();
- void handleIncomingFinished();
- void handleOutgoingFinished();
+ void handleReady();
+ void handleFinished();
+ void handleStateChange(ScreenSharing::SCState state);
+ void handleWindowStopRequest();
private:
- ScreenSharingManager* screenSharingManager;
+ DesktopScreenGrabber* screenGrabber;
+ boost::shared_ptr<Timer> grabTimer;
RemoteScreenWindowFactory* remoteScreenWindowFactory;
-
RemoteScreenWindow* remoteScreenWindow;
- boost::shared_ptr<Timer> grabTimer;
- DesktopScreenGrabber* screenGrabber;
- boost::shared_ptr<IncomingScreenSharing> iss;
- boost::shared_ptr<OutgoingScreenSharing> oss;
+
+ boost::shared_ptr<ScreenSharing> screenSharing;
+ JID otherParty;
+ bool incoming;
+ std::string uiID;
+ ChatWindow* chatWindow;
};
}