/* * Copyright (c) 2012 Yoann Blein * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #pragma once #include #include #include #include namespace Swift { class JingleSession; class JingleRawUDPTransportPayload; class UDPSocketFactory; class UDPSocket; class RTPSession; class ScreenSharing { public: typedef boost::shared_ptr ref; enum SCState { Canceled, Failed, Finished, Negotiating, Connecting, BroadCasting, Receiving, WaitingForStart, WaitingForAccept, }; public: ScreenSharing(boost::shared_ptr jingleSession, UDPSocketFactory* udpSocketFactory); virtual ~ScreenSharing(); virtual void cancel() = 0; void stop(); public: boost::signal onStateChange; protected: bool addBestCandidate(boost::shared_ptr transport); void handleSessionTerminateReceived(boost::optional reason); protected: IDGenerator idGenerator; boost::shared_ptr serverSocket; boost::shared_ptr clientSocket; RTPSession* rtpSession; boost::shared_ptr jingleSession; UDPSocketFactory* udpSocketFactory; }; }