diff options
| author | Eric M. Tulla (BigPapi) <tulla@lindenlab.com> | 2009-11-24 16:12:01 -0500 |
|---|---|---|
| committer | Eric M. Tulla (BigPapi) <tulla@lindenlab.com> | 2009-11-24 16:12:01 -0500 |
| commit | 07a396e3119af7dd3cd56f64e066c70f8aa1b5bd (patch) | |
| tree | 8cc62018c3dbd4ae2984f0982acf39b2111fa307 /indra/newview/llviewerinventory.cpp | |
| parent | f9081220accfe5c197f1c567af8806bde236f946 (diff) | |
| parent | 88a56949d5b121132e3a068c72ab370834d72ceb (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.cpp | 32 |
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 ///---------------------------------------------------------------------------- |
