summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-11-10 16:05:53 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-11-10 16:05:53 +0200
commitc3d9aa60a799bb45b32c09870f92d576c9b571ce (patch)
tree2fef4c4b45d63140535d46f61bd104b14ba8c920 /indra/newview/llavataractions.cpp
parent7dabb3c46e6cdf208ce7dc46b89f431a247d6ba6 (diff)
parent93adff4569d66d0a8699615b7a21d789921ca15c (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp32
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