diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-12-15 18:28:43 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-12-15 18:28:43 +0800 |
commit | 91b49c8bfa061f3d3b8601d5398b1889a9e31850 (patch) | |
tree | 98adc151491a2bee51a70cf7dd37de21d4f32bb3 /indra/llcommon/lleventapi.h | |
parent | 0cce0b8149e049161ab17f1c608ded2d6cc12b0e (diff) | |
parent | a80e3fe4191aee87c566937953d52fa6498b7f32 (diff) |
Merge tag '7.1.1-release'
source for viewer 7.1.1.7039128750
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; }; |