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); }