summaryrefslogtreecommitdiff
path: root/indra/newview/rlvhandler.h
diff options
context:
space:
mode:
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;
};