summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/llfloaterworldmap.cpp37
-rw-r--r--indra/newview/llshareavatarhandler.cpp59
-rw-r--r--indra/newview/llviewerinventory.cpp30
-rw-r--r--indra/newview/llvoicecallhandler.cpp61
5 files changed, 123 insertions, 66 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 1f4302d870..26ba35e093 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -399,6 +399,7 @@ set(viewer_SOURCE_FILES
llsecapi.cpp
llsechandler_basic.cpp
llselectmgr.cpp
+ llshareavatarhandler.cpp
llsidepanelappearance.cpp
llsidepanelinventory.cpp
llsidepanelinventorysubpanel.cpp
@@ -537,6 +538,7 @@ set(viewer_SOURCE_FILES
llvoclouds.cpp
llvograss.cpp
llvoground.cpp
+ llvoicecallhandler.cpp
llvoicechannel.cpp
llvoiceclient.cpp
llvoicevisualizer.cpp
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index d5ebcfab4c..7c86d38310 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -72,8 +72,6 @@
#include "llweb.h"
#include "llslider.h"
#include "message.h"
-#include "llviewerobjectlist.h"
-#include "llvoicechannel.h"
#include "llwindow.h" // copyTextToClipboard()
//---------------------------------------------------------------------------
@@ -133,7 +131,6 @@ public:
};
LLWorldMapHandler gWorldMapHandler;
-//prep#
// SocialMap handler secondlife:///app/maptrackavatar/id
class LLMapTrackAvatarHandler : public LLCommandHandler
{
@@ -168,38 +165,6 @@ LLMapTrackAvatarHandler gMapTrackAvatar;
LLFloaterWorldMap* gFloaterWorldMap = NULL;
-//prep# call
-class LLSocialCallHandler : public LLCommandHandler
-{
-public:
- // requires trusted browser to trigger
- LLSocialCallHandler() : LLCommandHandler("socialcallhandler", UNTRUSTED_THROTTLE)
- {
- }
-
- bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
- {
- //Make sure we have some parameters
- if (params.size() == 0)
- {
- return false;
- }
-
- //Get the ID
- LLUUID id;
- if (!id.set( params[0], FALSE ))
- {
- return false;
- }
-
- //instigate call with this avatar
- LLVoiceClient::getInstance()->callUser( id );
-
- return true;
- }
-};
-LLSocialCallHandler gSocialCallHandler;
-
class LLMapInventoryObserver : public LLInventoryObserver
{
public:
@@ -1188,7 +1153,7 @@ void LLFloaterWorldMap::onAvatarComboCommit()
mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
}
}
-//prep#
+
void LLFloaterWorldMap::avatarTrackFromSlapp( const LLUUID& id )
{
trackAvatar( id, "av" );
diff --git a/indra/newview/llshareavatarhandler.cpp b/indra/newview/llshareavatarhandler.cpp
new file mode 100644
index 0000000000..568c77d4b2
--- /dev/null
+++ b/indra/newview/llshareavatarhandler.cpp
@@ -0,0 +1,59 @@
+/**
+ * @file llshareavatarhandler.cpp
+ * @brief slapp to handle avatar to avatar voice call.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llcommandhandler.h"
+#include "llavataractions.h"
+
+class LLShareWithAvatarHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLShareWithAvatarHandler() : LLCommandHandler("sharewithavatar", UNTRUSTED_THROTTLE)
+ {
+ }
+
+ bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
+ {
+ //Make sure we have some parameters
+ if (params.size() == 0)
+ {
+ return false;
+ }
+
+ //Get the ID
+ LLUUID id;
+ if (!id.set( params[0], FALSE ))
+ {
+ return false;
+ }
+
+ //instigate share with this avatar
+ LLAvatarActions::share( id );
+ return true;
+ }
+};
+LLShareWithAvatarHandler gShareWithAvatar;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index cf01792327..1907aaea4e 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -212,36 +212,6 @@ public:
};
LLInventoryHandler gInventoryHandler;
-//prep# share
-class LLShareWithAvatarHandler : public LLCommandHandler
-{
-public:
- // requires trusted browser to trigger
- LLShareWithAvatarHandler() : LLCommandHandler("sharewithavatar", UNTRUSTED_THROTTLE)
- {
- }
-
- bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
- {
- //Make sure we have some parameters
- if (params.size() == 0)
- {
- return false;
- }
-
- //Get the ID
- LLUUID id;
- if (!id.set( params[0], FALSE ))
- {
- return false;
- }
-
- //instigate share with this avatar
- LLAvatarActions::share( id );
- return true;
- }
-};
-LLShareWithAvatarHandler gShareWithAvatar;
///----------------------------------------------------------------------------
/// Class LLViewerInventoryItem
diff --git a/indra/newview/llvoicecallhandler.cpp b/indra/newview/llvoicecallhandler.cpp
new file mode 100644
index 0000000000..724d48b717
--- /dev/null
+++ b/indra/newview/llvoicecallhandler.cpp
@@ -0,0 +1,61 @@
+ /**
+ * @file llvoicecallhandler.cpp
+ * @brief slapp to handle avatar to avatar voice call.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llcommandhandler.h"
+#include "llavataractions.h"
+
+class LLVoiceCallAvatarHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLVoiceCallAvatarHandler() : LLCommandHandler("voicecallavatar", UNTRUSTED_THROTTLE)
+ {
+ }
+
+ bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
+ {
+ //Make sure we have some parameters
+ if (params.size() == 0)
+ {
+ return false;
+ }
+
+ //Get the ID
+ LLUUID id;
+ if (!id.set( params[0], FALSE ))
+ {
+ return false;
+ }
+
+ //instigate call with this avatar
+ LLAvatarActions::startCall( id );
+ return true;
+ }
+};
+
+LLVoiceCallAvatarHandler gVoiceCallAvatarHandler;
+