summaryrefslogtreecommitdiff
path: root/indra/newview/llgroupactions.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-21 15:20:41 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-21 15:20:41 -0500
commitd215cd5c244a5448668cb2173b1d95d0d6adf3ae (patch)
tree1ca61d7f58f2cfd063167c235431cf3836416db4 /indra/newview/llgroupactions.cpp
parent37b04c150792bb3e53a5ba02c6631aa1d0f8686f (diff)
parentc72de2edf0a2f7590fd43d86c59e83afcf7e8bcf (diff)
automated merge PE->viewer2.0
Diffstat (limited to 'indra/newview/llgroupactions.cpp')
-rw-r--r--indra/newview/llgroupactions.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index ff75d461df..22658b4d65 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -119,6 +119,36 @@ void LLGroupActions::search()
}
// static
+void LLGroupActions::startCall(const LLUUID& group_id)
+{
+ // create a new group voice session
+ LLGroupData gdata;
+
+ if (!gAgent.getGroupData(group_id, gdata))
+ {
+ llwarns << "Error getting group data" << llendl;
+ return;
+ }
+
+ LLUUID session_id = gIMMgr->addSession(gdata.mName, IM_SESSION_GROUP_START, group_id, true);
+ if (session_id == LLUUID::null)
+ {
+ llwarns << "Error adding session" << llendl;
+ return;
+ }
+
+ // start the call
+ // *TODO: move this to LLIMMgr?
+ LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id);
+ if (session && session->mSessionInitialized)
+ gIMMgr->startCall(session_id);
+ else
+ gIMMgr->autoStartCallOnStartup(session_id);
+
+ make_ui_sound("UISndStartIM");
+}
+
+// static
void LLGroupActions::join(const LLUUID& group_id)
{
LLGroupMgrGroupData* gdatap =