Added a default message handler for experience logs. Currently just forwards the
notification.meow-7.2.2
parent
2604b34196
commit
b2591ca63c
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public:
|
|||
static void fontInit();
|
||||
|
||||
static void initNameCache();
|
||||
static void initExperienceCache();
|
||||
static void initExperiences();
|
||||
|
||||
static void cleanupNameCache();
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue