diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-08-08 11:43:56 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-08-08 11:43:56 (GMT) |
commit | 3fa0d466150981d33f535108190f1e9744fb3e09 (patch) | |
tree | 1f41ed407741e3e9719dedce8b8405ea18c4c78d /Swift/Controllers | |
parent | 84cc4e93c5e3f68d055cbddf8072025d91c44a23 (diff) | |
download | swift-contrib-3fa0d466150981d33f535108190f1e9744fb3e09.zip swift-contrib-3fa0d466150981d33f535108190f1e9744fb3e09.tar.bz2 |
Handling of sessions with contacts which become unavailable
Diffstat (limited to 'Swift/Controllers')
-rw-r--r-- | Swift/Controllers/Chat/ChatsManager.cpp | 2 | ||||
-rw-r--r-- | Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp | 2 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/ChatWindow.h | 2 | ||||
-rw-r--r-- | Swift/Controllers/WhiteboardManager.cpp | 6 |
4 files changed, 5 insertions, 7 deletions
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp index 3c87fc6..1435293 100644 --- a/Swift/Controllers/Chat/ChatsManager.cpp +++ b/Swift/Controllers/Chat/ChatsManager.cpp @@ -112,7 +112,7 @@ ChatsManager::ChatsManager( ftOverview_->onNewFileTransferController.connect(boost::bind(&ChatsManager::handleNewFileTransferController, this, _1)); whiteboardManager_->onSessionRequest.connect(boost::bind(&ChatsManager::handleWhiteboardSessionRequest, this, _1, _2)); whiteboardManager_->onRequestAccepted.connect(boost::bind(&ChatsManager::handleWhiteboardStateChange, this, _1, ChatWindow::WhiteboardAccepted)); - whiteboardManager_->onSessionTerminate.connect(boost::bind(&ChatsManager::handleWhiteboardStateChange, this, _1, ChatWindow::WhiteboardCanceled)); + whiteboardManager_->onSessionTerminate.connect(boost::bind(&ChatsManager::handleWhiteboardStateChange, this, _1, ChatWindow::WhiteboardTerminated)); whiteboardManager_->onRequestRejected.connect(boost::bind(&ChatsManager::handleWhiteboardStateChange, this, _1, ChatWindow::WhiteboardRejected)); roster_->onJIDAdded.connect(boost::bind(&ChatsManager::handleJIDAddedToRoster, this, _1)); roster_->onJIDRemoved.connect(boost::bind(&ChatsManager::handleJIDRemovedFromRoster, this, _1)); diff --git a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp index 1ac1e72..2823e83 100644 --- a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp +++ b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp @@ -104,7 +104,7 @@ public: ftManager_ = new DummyFileTransferManager(); ftOverview_ = new FileTransferOverview(ftManager_); avatarManager_ = new NullAvatarManager(); - wbSessionManager_ = new WhiteboardSessionManager(iqRouter_, presenceOracle_, entityCapsManager_); + wbSessionManager_ = new WhiteboardSessionManager(iqRouter_, stanzaChannel_, presenceOracle_, entityCapsManager_); wbManager_ = new WhiteboardManager(whiteboardWindowFactory_, uiEventStream_, nickResolver_, avatarManager_, wbSessionManager_); mocks_->ExpectCall(chatListWindowFactory_, ChatListWindowFactory::createChatListWindow).With(uiEventStream_).Return(chatListWindow_); diff --git a/Swift/Controllers/UIInterfaces/ChatWindow.h b/Swift/Controllers/UIInterfaces/ChatWindow.h index 1c6edd6..7426364 100644 --- a/Swift/Controllers/UIInterfaces/ChatWindow.h +++ b/Swift/Controllers/UIInterfaces/ChatWindow.h @@ -36,7 +36,7 @@ namespace Swift { enum OccupantAction {Kick, Ban, MakeModerator, MakeParticipant, MakeVisitor, AddContact}; enum RoomAction {ChangeSubject, Configure, Affiliations, Destroy, Invite}; enum FileTransferState {WaitingForAccept, Negotiating, Transferring, Canceled, Finished, FTFailed}; - enum WhiteboardSessionState {WhiteboardAccepted, WhiteboardCanceled, WhiteboardTerminated, WhiteboardRejected}; + enum WhiteboardSessionState {WhiteboardAccepted, WhiteboardTerminated, WhiteboardRejected}; ChatWindow() {} virtual ~ChatWindow() {}; diff --git a/Swift/Controllers/WhiteboardManager.cpp b/Swift/Controllers/WhiteboardManager.cpp index 2b6c448..632aef6 100644 --- a/Swift/Controllers/WhiteboardManager.cpp +++ b/Swift/Controllers/WhiteboardManager.cpp @@ -79,8 +79,7 @@ namespace Swift { void WhiteboardManager::requestSession(const JID& contact) { WhiteboardSession::ref session = whiteboardSessionManager_->requestSession(contact); - session->onSessionTerminateReceived.connect(boost::bind(&WhiteboardManager::handleSessionTerminate, this, _1)); - session->onSessionCancelled.connect(boost::bind(&WhiteboardManager::handleSessionCancel, this, _1)); + session->onSessionTerminated.connect(boost::bind(&WhiteboardManager::handleSessionTerminate, this, _1)); session->onRequestAccepted.connect(boost::bind(&WhiteboardManager::handleSessionAccept, this, _1)); session->onRequestRejected.connect(boost::bind(&WhiteboardManager::handleRequestReject, this, _1)); @@ -101,8 +100,7 @@ namespace Swift { } void WhiteboardManager::handleIncomingSession(IncomingWhiteboardSession::ref session) { - session->onSessionTerminateReceived.connect(boost::bind(&WhiteboardManager::handleSessionTerminate, this, _1)); - session->onSessionCancelled.connect(boost::bind(&WhiteboardManager::handleSessionCancel, this, _1)); + session->onSessionTerminated.connect(boost::bind(&WhiteboardManager::handleSessionTerminate, this, _1)); session->onRequestAccepted.connect(boost::bind(&WhiteboardManager::handleSessionAccept, this, _1)); WhiteboardWindow* window = findWhiteboardWindow(session->getTo()); |