bool SessionManager::shiftSession( std::string addr, SessionType fromType ) { lockSessions(); if ( fromType != VIDEOSESSION && fromType != AVAILABLEVIDEOSESSION ) { gravUtil::logError( "SessionManager::shiftSession: invalid SessionType " "input\n" ); unlockSessions(); return false; } SessionEntry* entry = findSessionByAddress( addr, fromType ); if ( entry == NULL ) { gravUtil::logError( "SessionManager::shiftSession: address %s not " "found\n", addr.c_str() ); unlockSessions(); return false; } bool ret = shiftSession( entry ); unlockSessions(); return true; }
void SessionTreeControl::shiftEvent( wxCommandEvent& evt ) { std::string selectedAddress = std::string( GetItemText( GetSelection() ).char_str() ); shiftSession( selectedAddress, false ); }