diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-11-12 09:23:57 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-12 09:23:57 -0800 |
commit | 3dd79ad226bc8e0aec18dba87223a3f50ecf360b (patch) | |
tree | 2af4f4e5d50d35065dda3101b60b40a3c1c21aee /indra/llmessage | |
parent | 72af8dc3f0a249f69869bc6f52dd7a887702a964 (diff) | |
parent | 7a45dec2d540581ef080386e4a967befd22b6adb (diff) |
merge
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llares.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/llareslistener.cpp | 13 | ||||
-rw-r--r-- | indra/llmessage/llareslistener.h | 9 |
3 files changed, 14 insertions, 10 deletions
diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp index acbf51d75c..104629c157 100644 --- a/indra/llmessage/llares.cpp +++ b/indra/llmessage/llares.cpp @@ -106,7 +106,7 @@ void LLAres::QueryResponder::queryError(int code) LLAres::LLAres() : chan_(NULL), mInitSuccess(false), - mListener(new LLAresListener("LLAres", this)) + mListener(new LLAresListener(this)) { if (ares_init(&chan_) != ARES_SUCCESS) { 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())); } diff --git a/indra/llmessage/llareslistener.h b/indra/llmessage/llareslistener.h index bf093b3d3d..33cef79c09 100644 --- a/indra/llmessage/llareslistener.h +++ b/indra/llmessage/llareslistener.h @@ -14,18 +14,17 @@ #if ! defined(LL_LLARESLISTENER_H) #define LL_LLARESLISTENER_H -#include "lleventdispatcher.h" +#include "lleventapi.h" class LLAres; class LLSD; /// Listen on an LLEventPump with specified name for LLAres request events. -class LLAresListener: public LLDispatchListener +class LLAresListener: public LLEventAPI { public: - /// Specify the pump name on which to listen, and bind the LLAres instance - /// to use (e.g. gAres) - LLAresListener(const std::string& pumpname, LLAres* llares); + /// Bind the LLAres instance to use (e.g. gAres) + LLAresListener(LLAres* llares); private: /// command["op"] == "rewriteURI" |