diff options
author | prep linden <prep@lindenlab.com> | 2010-10-21 13:26:13 -0400 |
---|---|---|
committer | prep linden <prep@lindenlab.com> | 2010-10-21 13:26:13 -0400 |
commit | e12ec78127ce3a52931d1b0fe62ff50cdf238960 (patch) | |
tree | d95f793d91f1143fbc2a2cbb23d58852bb55c219 /indra/newview/llviewerinventory.cpp | |
parent | 993136fe347075b71f649ec70ce1a463afb073f8 (diff) |
secondlife:///app/maptrackavatar/lluid
secondlife:///app/sharewithavatar/lluid
secondlife:///app/socialcallhandler/lluid <-work in progress
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 75a5b14154..cf01792327 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -59,6 +59,7 @@ #include "llcommandhandler.h" #include "llviewermessage.h" #include "llsidepanelappearance.h" +#include "llavataractions.h" ///---------------------------------------------------------------------------- /// Helper class to store special inventory item names and their localized values. @@ -211,6 +212,37 @@ 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 ///---------------------------------------------------------------------------- |