summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-11-23 11:55:33 -0500
committerEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-11-23 11:55:33 -0500
commit9eb42546dc28f2a9c54a461b4ad9a02e9bf55d8f (patch)
treeb96dbe6721243a7bf88f6389786bb0094c5f6f07 /indra/newview/llviewerinventory.cpp
parent1b07c1d7fb5b6d3ce15083bc3dbb65a3f0ac8006 (diff)
parent8580f840f323b9acdcbedbfe4ba45cb9c76eddd8 (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 87d256b60a..c6ec25c1cb 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -56,11 +56,43 @@
#include "lltrans.h"
#include "llappearancemgr.h"
#include "llfloatercustomize.h"
+#include "llcommandhandler.h"
+#include "llviewermessage.h"
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
+class LLInventoryHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLInventoryHandler() : LLCommandHandler("inventory", UNTRUSTED_THROTTLE) { }
+
+ bool handle(const LLSD& params, const LLSD& query_map,
+ LLMediaCtrl* web)
+ {
+ if (params.size() < 2) return false;
+ LLUUID inventory_id;
+ if (!inventory_id.set(params[0], FALSE))
+ {
+ return false;
+ }
+
+ const std::string verb = params[1].asString();
+ if (verb == "select")
+ {
+ std::vector<LLUUID> items_to_open;
+ items_to_open.push_back(inventory_id);
+ open_inventory_offer(items_to_open, "");
+ return true;
+ }
+
+ return false;
+ }
+};
+LLInventoryHandler gInventoryHandler;
+
///----------------------------------------------------------------------------
/// Class LLViewerInventoryItem
///----------------------------------------------------------------------------