summaryrefslogtreecommitdiff
path: root/indra/newview/llcommanddispatcherlistener.cpp
diff options
context:
space:
mode:
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);
+}