diff options
author | Brad Linden <brad@lindenlab.com> | 2023-12-14 12:07:45 -0800 |
---|---|---|
committer | Brad Linden <brad@lindenlab.com> | 2023-12-14 12:07:45 -0800 |
commit | 32de0cb67d824498d0fc9d489ce19731ebfddfdf (patch) | |
tree | 9fd52f420543a5c4dc45215d7ed49faf94f386fe /indra/llcommon/lleventapi.h | |
parent | 7bfe590a3669a005d4269cdcf378891080264dce (diff) | |
parent | 4c791e098d3abafa406e0e269038c40aae67f66c (diff) |
Merge branch 'DRTVWR-596' into DRTVWR-601
Diffstat (limited to 'indra/llcommon/lleventapi.h')
-rw-r--r-- | indra/llcommon/lleventapi.h | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/indra/llcommon/lleventapi.h b/indra/llcommon/lleventapi.h index 5991fe8fd5..25f6becd8b 100644 --- a/indra/llcommon/lleventapi.h +++ b/indra/llcommon/lleventapi.h @@ -35,6 +35,11 @@ #include "llinstancetracker.h" #include <string> +namespace LL +{ + class LazyEventAPIParams; +} + /** * LLEventAPI not only provides operation dispatch functionality, inherited * from LLDispatchListener -- it also gives us event API introspection. @@ -65,19 +70,6 @@ public: std::string getDesc() const { return mDesc; } /** - * Publish only selected add() methods from LLEventDispatcher. - * Every LLEventAPI add() @em must have a description string. - */ - template <typename CALLABLE> - void add(const std::string& name, - const std::string& desc, - CALLABLE callable, - const LLSD& required=LLSD()) - { - LLEventDispatcher::add(name, desc, callable, required); - } - - /** * Instantiate a Response object in any LLEventAPI subclass method that * wants to guarantee a reply (if requested) will be sent on exit from the * method. The reply will be sent if request.has(@a replyKey), default @@ -150,16 +142,20 @@ public: * @endcode */ LLSD& operator[](const LLSD::String& key) { return mResp[key]; } - - /** - * set the response to the given data - */ - void setResponse(LLSD const & response){ mResp = response; } + + /** + * set the response to the given data + */ + void setResponse(LLSD const & response){ mResp = response; } LLSD mResp, mReq; LLSD::String mKey; }; +protected: + // constructor used only by subclasses registered by LazyEventAPI + LLEventAPI(const LL::LazyEventAPIParams&); + private: std::string mDesc; }; |