summaryrefslogtreecommitdiff
path: root/indra/llmessage/llareslistener.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-11-11 07:41:50 -0500
committerNat Goodspeed <nat@lindenlab.com>2009-11-11 07:41:50 -0500
commit062d0a13db505636b186084d42c527a49637f380 (patch)
treeb2ae497f8b3f0c0829e739e1cca698f5fa21de4c /indra/llmessage/llareslistener.cpp
parent43ae94ab0f35dafaa0e1787a155290e371e317a1 (diff)
Add LLEventAPI class, formalizing the mechanism by which we wrap a C++ API
with an event API. In addition to the LLEventPump name on which to listen, LLEventAPI accepts a documentation string for event API introspection. Give every LLEventDispatcher::add() overload a new documentation string parameter for event API introspection. Convert every existing event API to new conventions, introducing suitable documentation strings for the API and each of its operations.
Diffstat (limited to 'indra/llmessage/llareslistener.cpp')
-rw-r--r--indra/llmessage/llareslistener.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/llmessage/llareslistener.cpp b/indra/llmessage/llareslistener.cpp
index a8beb8cbde..7db3675b77 100644
--- a/indra/llmessage/llareslistener.cpp
+++ b/indra/llmessage/llareslistener.cpp
@@ -22,13 +22,18 @@
#include "llevents.h"
#include "llsdutil.h"
-LLAresListener::LLAresListener(const std::string& pumpname, LLAres* llares):
- LLDispatchListener(pumpname, "op"),
+LLAresListener::LLAresListener(LLAres* llares):
+ LLEventAPI("LLAres",
+ "LLAres listener to request DNS operations"),
mAres(llares)
{
// add() every method we want to be able to invoke via this event API.
- // Optional third parameter validates expected LLSD request structure.
- add("rewriteURI", &LLAresListener::rewriteURI,
+ // Optional last parameter validates expected LLSD request structure.
+ add("rewriteURI",
+ "Given [\"uri\"], return on [\"reply\"] an array of alternative URIs.\n"
+ "On failure, returns an array containing only the original URI, so\n"
+ "failure case can be processed like success case.",
+ &LLAresListener::rewriteURI,
LLSD().insert("uri", LLSD()).insert("reply", LLSD()));
}