diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2009-11-10 14:26:17 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2009-11-10 14:26:17 -0500 |
commit | d1e3062ae4b9fa182ea4942117fd37579261fc8c (patch) | |
tree | 0c9f737c835d6ee4f8faaf02f026fc4703f08183 /indra/newview/llavataractions.cpp | |
parent | 37806fe4b2c0a83a5e8b1b2e9b7f260da494488e (diff) | |
parent | 033d61ddb312080dc986803f6c1921cbd554c598 (diff) |
Merge
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r-- | indra/newview/llavataractions.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 3fc37aa3d5..dae4296a82 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -186,6 +186,38 @@ void LLAvatarActions::startIM(const LLUUID& id) } // static +void LLAvatarActions::startCall(const LLUUID& id) +{ + if (id.isNull() || isCalling(id)) + { + return; + } + + std::string name; + gCacheName->getFullName(id, name); + LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id); + if (session_id != LLUUID::null) + { + // always open IM window when connecting to voice + LLIMFloater::show(session_id); + gIMMgr->startCall(session_id); + } + make_ui_sound("UISndStartIM"); +} + +// static +bool LLAvatarActions::isCalling(const LLUUID &id) +{ + if (id.isNull()) + { + return false; + } + + LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id); + return (LLIMModel::getInstance()->findIMSession(session_id) != NULL); +} + +// static void LLAvatarActions::startConference(const std::vector<LLUUID>& ids) { // *HACK: Copy into dynamic array |