summaryrefslogtreecommitdiff
path: root/indra/newview/llcommanddispatcherlistener.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-12-21 15:24:32 -0500
committerNat Goodspeed <nat@lindenlab.com>2009-12-21 15:24:32 -0500
commit0e6f0e5ca16f534ff14c57c77c323bed2d6e730c (patch)
treefc286b06bc70e7ac325db51ebb00ccd70eeb0201 /indra/newview/llcommanddispatcherlistener.cpp
parentd215cd5c244a5448668cb2173b1d95d0d6adf3ae (diff)
parent3b2d0e33fdd2c96e295b83ef4a1b4558beeb5db1 (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/newview/llcommanddispatcherlistener.cpp')
-rw-r--r--indra/newview/llcommanddispatcherlistener.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llcommanddispatcherlistener.cpp b/indra/newview/llcommanddispatcherlistener.cpp
index 00a20de30e..91baeaf989 100644
--- a/indra/newview/llcommanddispatcherlistener.cpp
+++ b/indra/newview/llcommanddispatcherlistener.cpp
@@ -31,6 +31,11 @@ LLCommandDispatcherListener::LLCommandDispatcherListener(/* LLCommandDispatcher*
"[\"query\"] map of parameters, as if from ?key1=val&key2=val\n"
"[\"trusted\"] boolean indicating trusted browser [default true]",
&LLCommandDispatcherListener::dispatch);
+ add("enumerate",
+ "Post to [\"reply\"] a map of registered LLCommandHandler instances, containing\n"
+ "name key and (e.g.) untrusted flag",
+ &LLCommandDispatcherListener::enumerate,
+ LLSD().with("reply", LLSD()));
}
void LLCommandDispatcherListener::dispatch(const LLSD& params) const
@@ -45,3 +50,11 @@ void LLCommandDispatcherListener::dispatch(const LLSD& params) const
LLCommandDispatcher::dispatch(params["cmd"], params["params"], params["query"], NULL,
trusted_browser);
}
+
+void LLCommandDispatcherListener::enumerate(const LLSD& params) const
+{
+ LLReqID reqID(params);
+ LLSD response(LLCommandDispatcher::enumerate());
+ reqID.stamp(response);
+ LLEventPumps::instance().obtain(params["reply"]).post(response);
+}