summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-03-18 14:12:22 -0700
committerdolphin <dolphin@lindenlab.com>2014-03-18 14:12:22 -0700
commitb2591ca63c498ab606bf595e0b2e729e76caea24 (patch)
tree1ecbf64ca09c92b69c99b117787073499762f673 /indra/newview
parent2604b3419657cb3bb8bafb90b1d9e5e43f11db4d (diff)
Added a default message handler for experience logs. Currently just forwards the
notification.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt4
-rw-r--r--indra/newview/llexperiencelog.cpp28
-rw-r--r--indra/newview/llexperiencelog.h33
-rw-r--r--indra/newview/llpanelexperiencelog.cpp118
-rw-r--r--indra/newview/llpanelexperiencelog.h48
-rwxr-xr-xindra/newview/llstartup.cpp6
-rwxr-xr-xindra/newview/llstartup.h2
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml20
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml10
9 files changed, 265 insertions, 4 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 868a26f47d..3a18133193 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -190,6 +190,7 @@ set(viewer_SOURCE_FILES
lleventpoll.cpp
llexpandabletextbox.cpp
llexperienceassociationresponder.cpp
+ llexperiencelog.cpp
llexternaleditor.cpp
llface.cpp
llfacebookconnect.cpp
@@ -405,6 +406,7 @@ set(viewer_SOURCE_FILES
llpanelcontents.cpp
llpaneleditwearable.cpp
llpanelexperiencelisteditor.cpp
+ llpanelexperiencelog.cpp
llpanelexperiences.cpp
llpanelface.cpp
llpanelgenerictip.cpp
@@ -785,6 +787,7 @@ set(viewer_HEADER_FILES
lleventpoll.h
llexpandabletextbox.h
llexperienceassociationresponder.h
+ llexperiencelog.h
llexternaleditor.h
llface.h
llfacebookconnect.h
@@ -993,6 +996,7 @@ set(viewer_HEADER_FILES
llpanelcontents.h
llpaneleditwearable.h
llpanelexperiencelisteditor.h
+ llpanelexperiencelog.h
llpanelexperiences.h
llpanelface.h
llpanelgenerictip.h
diff --git a/indra/newview/llexperiencelog.cpp b/indra/newview/llexperiencelog.cpp
new file mode 100644
index 0000000000..9842bdc31c
--- /dev/null
+++ b/indra/newview/llexperiencelog.cpp
@@ -0,0 +1,28 @@
+/**
+ * @file llexperiencelog.cpp
+ * @brief llexperiencelog implementation
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, 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 "llexperiencelog.h"
diff --git a/indra/newview/llexperiencelog.h b/indra/newview/llexperiencelog.h
new file mode 100644
index 0000000000..73d82f4fad
--- /dev/null
+++ b/indra/newview/llexperiencelog.h
@@ -0,0 +1,33 @@
+/**
+ * @file llexperiencelog.h
+ * @brief llexperiencelog and related class definitions
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, 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$
+ */
+
+
+
+#ifndef LL_LLEXPERIENCELOG_H
+#define LL_LLEXPERIENCELOG_H
+
+
+#endif // LL_LLEXPERIENCELOG_H
diff --git a/indra/newview/llpanelexperiencelog.cpp b/indra/newview/llpanelexperiencelog.cpp
new file mode 100644
index 0000000000..009889a59f
--- /dev/null
+++ b/indra/newview/llpanelexperiencelog.cpp
@@ -0,0 +1,118 @@
+/**
+ * @file llpanelexperiencelog.cpp
+ * @brief llpanelexperiencelog
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, 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 "llpanelexperiencelog.h"
+#include "lldispatcher.h"
+#include "llsdserialize.h"
+#include "llviewergenericmessage.h"
+#include "llnotificationsutil.h"
+#include "lltrans.h"
+
+
+class LLExperienceLogDispatchHandler : public LLDispatchHandler
+{
+public:
+ virtual bool operator()(
+ const LLDispatcher* dispatcher,
+ const std::string& key,
+ const LLUUID& invoice,
+ const sparam_t& strings)
+ {
+ LLSD message;
+
+ sparam_t::const_iterator it = strings.begin();
+ if(it != strings.end()){
+ const std::string& llsdRaw = *it++;
+ std::istringstream llsdData(llsdRaw);
+ if (!LLSDSerialize::deserialize(message, llsdData, llsdRaw.length()))
+ {
+ llwarns << "LLExperienceLogDispatchHandler: Attempted to read parameter data into LLSD but failed:" << llsdRaw << llendl;
+ }
+ }
+ message["public_id"] = invoice;
+
+ // Object Name
+ if(it != strings.end())
+ {
+ message["ObjectName"] = *it++;
+ }
+
+ // parcel Name
+ if(it != strings.end())
+ {
+ message["ParcelName"] = *it++;
+ }
+
+ LLExperienceLog::instance().handleExperienceMessage(message);
+ return true;
+ }
+};
+
+static LLExperienceLogDispatchHandler experience_log_dispatch_handler;
+
+void LLExperienceLog::handleExperienceMessage(LLSD& message)
+{
+ std::ostringstream str;
+ if(message.has("Permission"))
+ {
+ str << "ExperiencePermission" << message["Permission"].asInteger();
+ std::string entry;
+ if(LLTrans::findString(entry, str.str()))
+ {
+ str.str(entry);
+ }
+ else
+ {
+ str.str();
+ }
+ }
+
+ if(str.str().empty())
+ {
+ str.str(LLTrans::getString("ExperiencePermissionUnknown", message));
+ }
+
+ message["EventType"] = str.str();
+ if(message.has("IsAttachment") && message["IsAttachment"].asBoolean())
+ {
+ LLNotificationsUtil::add("ExperienceEventAttachment", message);
+ }
+ else
+ {
+ LLNotificationsUtil::add("ExperienceEvent", message);
+ }
+}
+
+LLExperienceLog::LLExperienceLog()
+{
+}
+
+void LLExperienceLog::initialize()
+{
+ gGenericDispatcher.addHandler("ExperienceEvent", &experience_log_dispatch_handler);
+}
diff --git a/indra/newview/llpanelexperiencelog.h b/indra/newview/llpanelexperiencelog.h
new file mode 100644
index 0000000000..7d2a24872a
--- /dev/null
+++ b/indra/newview/llpanelexperiencelog.h
@@ -0,0 +1,48 @@
+/**
+ * @file llpanelexperiencelog.h
+ * @brief llpanelexperiencelog and related class definitions
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, 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$
+ */
+
+
+
+#ifndef LL_LLPANELEXPERIENCELOG_H
+#define LL_LLPANELEXPERIENCELOG_H
+
+#include "llsingleton.h"
+
+
+
+class LLExperienceLog : public LLSingleton<LLExperienceLog>
+{
+ friend class LLSingleton<LLExperienceLog>;
+protected:
+ LLExperienceLog();
+
+public:
+ void initialize();
+ void handleExperienceMessage(LLSD& message);
+};
+
+
+#endif // LL_LLPANELEXPERIENCELOG_H
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index a9ac8d6ea7..b5f976080a 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -198,6 +198,7 @@
#include "llevents.h"
#include "llstartuplistener.h"
#include "lltoolbarview.h"
+#include "llpanelexperiencelog.h"
#if LL_WINDOWS
#include "lldxhardware.h"
@@ -1412,7 +1413,7 @@ bool idle_startup()
LLStartUp::initNameCache();
display_startup();
- LLStartUp::initExperienceCache();
+ LLStartUp::initExperiences();
display_startup();
// update the voice settings *after* gCacheName initialization
@@ -2829,10 +2830,11 @@ void LLStartUp::initNameCache()
}
-void LLStartUp::initExperienceCache()
+void LLStartUp::initExperiences()
{
LLAppViewer::instance()->loadExperienceCache();
LLExperienceCache::initClass();
+ LLExperienceLog::instance().initialize();
}
void LLStartUp::cleanupNameCache()
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 00e03bcda6..94ecbcd333 100755
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -91,7 +91,7 @@ public:
static void fontInit();
static void initNameCache();
- static void initExperienceCache();
+ static void initExperiences();
static void cleanupNameCache();
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index e0cc2229d5..b230e36cc7 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -7069,6 +7069,26 @@ Unable to acquire a new experience:
text="Allowed into a region by an experience"/>
</form>
</notification>
+
+ <notification
+ icon="notify.tga"
+ name="ExperienceEvent"
+ persist="false"
+ type="notify">
+ An object was allowed to [EventType] by the secondlife:///app/experience/[public_id]/profile experience.
+ Owner: secondlife:///app/agent/[OwnerID]/inspect
+ Object Name: [ObjectName]
+ Parcel Name: [ParcelName]
+ </notification>
+
+ <notification
+ icon="notify.tga"
+ name="ExperienceEventAttachment"
+ persist="false"
+ type="notify">
+ An attachment was allowed to [EventType] by the secondlife:///app/experience/[public_id]/profile experience.
+ Owner: secondlife:///app/agent/[OwnerID]/inspect
+ </notification>
<notification
icon="notify.tga"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 5badeff38b..dc9e96e2f2 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3985,7 +3985,15 @@ Try enclosing path to the editor with double quotes.
<string name="Admin_Experiences_Tab">ADMIN</string>
<string name="Recent_Experiences_Tab">RECENT</string>
<string name="Owned_Experiences_Tab">OWNED</string>
-
+ <string name="ExperiencePermission1">take over your controls</string>
+ <string name="ExperiencePermission3">override animations on your avatar</string>
+ <string name="ExperiencePermission4">attach to your avatar</string>
+ <string name="ExperiencePermission9">track your camera</string>
+ <string name="ExperiencePermission10">control your camera</string>
+ <string name="ExperiencePermission11">teleport you</string>
+ <string name="ExperiencePermission12">automatically accept experience permissions</string>
+ <string name="ExperiencePermissionUnknown">perform an unknown operation: [Permission]</string>
+
<!-- Conversation log messages -->
<string name="logging_calls_disabled_log_empty">
Conversations are not being logged. To begin keeping a log, choose "Save: Log only" or "Save: Log and transcripts" under Preferences > Chat.