summaryrefslogtreecommitdiff
path: root/indra/newview/rlvhandler.h
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2024-09-03 18:14:06 +0200
committerKitty Barnett <develop@catznip.com>2024-09-03 18:14:22 +0200
commitdb8916454457e3e4856fddcbbafe66b3766e4ffa (patch)
tree359eb0fff468c9b401e8fc6b6e430d4cb77891dd /indra/newview/rlvhandler.h
parent4f7eb9b12e9c7eeb9f3ee0980bd4616df7d678b6 (diff)
Add the RLVa console
Diffstat (limited to 'indra/newview/rlvhandler.h')
-rw-r--r--indra/newview/rlvhandler.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/rlvhandler.h b/indra/newview/rlvhandler.h
index a5e91548ef..7fa4da767a 100644
--- a/indra/newview/rlvhandler.h
+++ b/indra/newview/rlvhandler.h
@@ -13,6 +13,8 @@ class LLViewerObject;
class RlvHandler : public LLSingleton<RlvHandler>
{
+ template<Rlv::EParamType> friend struct Rlv::CommandHandlerBaseImpl;
+
LLSINGLETON_EMPTY_CTOR(RlvHandler);
/*
@@ -25,12 +27,25 @@ public:
protected:
Rlv::ECmdRet processCommand(std::reference_wrapper<const RlvCommand> rlvCmdRef, bool fromObj);
+ /*
+ * Helper functions
+ */
public:
// Initialization (deliberately static so they can safely be called in tight loops)
static bool canEnable();
static bool isEnabled() { return mIsEnabled; }
static bool setEnabled(bool enable);
+ /*
+ * Event handling
+ */
+public:
+ // The command output signal is triggered whenever a command produces channel or debug output
+ using command_output_signal_t = boost::signals2::signal<void (const RlvCommand&, S32, const std::string&)>;
+ boost::signals2::connection setCommandOutputCallback(const command_output_signal_t::slot_type& cb) { return mOnCommandOutput.connect(cb); }
+
+protected:
+ command_output_signal_t mOnCommandOutput;
private:
static bool mIsEnabled;
};