diff options
-rw-r--r-- | Swiften/ScreenSharing/ScreenSharing.cpp | 6 | ||||
-rw-r--r-- | Swiften/ScreenSharing/ScreenSharing.h | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/ScreenSharing/ScreenSharing.cpp b/Swiften/ScreenSharing/ScreenSharing.cpp index d5ab921..eede971 100644 --- a/Swiften/ScreenSharing/ScreenSharing.cpp +++ b/Swiften/ScreenSharing/ScreenSharing.cpp @@ -33,6 +33,8 @@ void ScreenSharing::stop() jingleSession->sendTerminate(JinglePayload::Reason::Success); if (rtpSession) rtpSession->stop(); + onStateChange(ScreenSharing::Finished); + onFinished(); } bool ScreenSharing::addBestCandidate(boost::shared_ptr<JingleRawUDPTransportPayload> transport) @@ -83,14 +85,12 @@ void ScreenSharing::handleSessionTerminateReceived(boost::optional<JinglePayload if (reason.is_initialized() && reason.get().type == JinglePayload::Reason::Cancel) { onStateChange(ScreenSharing::Canceled); - //onFinished(FileTransferError(FileTransferError::PeerError)); } else if (reason.is_initialized() && reason.get().type == JinglePayload::Reason::Success) { onStateChange(ScreenSharing::Finished); - //onFinished(boost::optional<FileTransferError>()); } else { onStateChange(ScreenSharing::Failed); - //onFinished(FileTransferError(FileTransferError::PeerError)); } + onFinished(); } } diff --git a/Swiften/ScreenSharing/ScreenSharing.h b/Swiften/ScreenSharing/ScreenSharing.h index 5289d3c..6107ec5 100644 --- a/Swiften/ScreenSharing/ScreenSharing.h +++ b/Swiften/ScreenSharing/ScreenSharing.h @@ -44,6 +44,7 @@ namespace Swift { public: boost::signal<void (SCState)> onStateChange; + boost::signal<void ()> onFinished; protected: bool addBestCandidate(boost::shared_ptr<JingleRawUDPTransportPayload> transport); |