void WhiteboardManager::acceptSession(const JID& from) { IncomingWhiteboardSession::ref session = std::dynamic_pointer_cast<IncomingWhiteboardSession>(whiteboardSessionManager_->getSession(from)); WhiteboardWindow* window = findWhiteboardWindow(from); if (session && window) { session->accept(); window->show(); } }
void WhiteboardManager::handleIncomingSession(IncomingWhiteboardSession::ref session) { session->onSessionTerminated.connect(boost::bind(&WhiteboardManager::handleSessionTerminate, this, _1)); session->onRequestAccepted.connect(boost::bind(&WhiteboardManager::handleSessionAccept, this, _1)); WhiteboardWindow* window = findWhiteboardWindow(session->getTo()); if (window == nullptr) { createNewWhiteboardWindow(session->getTo(), session); } else { window->setSession(session); } onSessionRequest(session->getTo(), false); }
void WhiteboardSessionManager::handleIncomingSession(IncomingWhiteboardSession::ref session) { sessions_[session->getTo()] = session; session->onSessionTerminated.connect(boost::bind(&WhiteboardSessionManager::deleteSessionEntry, this, _1)); onSessionRequest(session); }