コード例 #1
0
ファイル: WhiteboardManager.cpp プロジェクト: swift/swift
    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);
    }
コード例 #2
0
void WhiteboardSessionManager::handleIncomingSession(IncomingWhiteboardSession::ref session) {
    sessions_[session->getTo()] = session;
    session->onSessionTerminated.connect(boost::bind(&WhiteboardSessionManager::deleteSessionEntry, this, _1));
    onSessionRequest(session);
}