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 @@ -32,8 +32,10 @@ void ScreenSharing::stop() { jingleSession->sendTerminate(JinglePayload::Reason::Success); if (rtpSession) rtpSession->stop(); + onStateChange(ScreenSharing::Finished); + onFinished(); } bool ScreenSharing::addBestCandidate(boost::shared_ptr<JingleRawUDPTransportPayload> transport) { @@ -82,15 +84,13 @@ void ScreenSharing::handleSessionTerminateReceived(boost::optional<JinglePayload rtpSession->stop(); 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 @@ -43,8 +43,9 @@ namespace Swift { void stop(); public: boost::signal<void (SCState)> onStateChange; + boost::signal<void ()> onFinished; protected: bool addBestCandidate(boost::shared_ptr<JingleRawUDPTransportPayload> transport); void handleSessionTerminateReceived(boost::optional<JinglePayload::Reason> reason); |
Swift