bool LLIMMgr::startCall(const LLUUID& session_id, LLVoiceChannel::EDirection direction) { // Singu TODO: LLIMModel LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(session_id); if (!floater) return false; LLVoiceChannel* voice_channel = floater->getVoiceChannel(); if (!voice_channel) return false; voice_channel->setCallDirection(direction); voice_channel->activate(); return true; }
LLUUID LLIMMgr::addP2PSession(const std::string& name, const LLUUID& other_participant_id, const std::string& voice_session_handle, const std::string& caller_uri) { LLUUID session_id = addSession(name, IM_NOTHING_SPECIAL, other_participant_id); LLFloaterIMPanel* floater = findFloaterBySession(session_id); if(floater) { LLVoiceChannelP2P* voice_channelp = (LLVoiceChannelP2P*)floater->getVoiceChannel(); voice_channelp->setSessionHandle(voice_session_handle, caller_uri); } return session_id; }
bool LLIMMgr::endCall(const LLUUID& session_id) { // Singu TODO: LLIMModel LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(session_id); if (!floater) return false; LLVoiceChannel* voice_channel = floater->getVoiceChannel(); if (!voice_channel) return false; voice_channel->deactivate(); /*LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); if (im_session)*/ { // need to update speakers' state floater->getSpeakerManager()->update(FALSE); } return true; }