diff options
author | Eugene Kondrashev <ekondrashev@productengine.com> | 2009-11-04 21:33:14 +0200 |
---|---|---|
committer | Eugene Kondrashev <ekondrashev@productengine.com> | 2009-11-04 21:33:14 +0200 |
commit | eb02d77ff5d20b99cc35fe9082cf5a22f634a7e1 (patch) | |
tree | 80d2e9bb12e6633655b9fa50c52f57105cff2bc1 /indra/newview/llvoicechannel.h | |
parent | fbf314cb5593a678e337092186c0e36fed59dbab (diff) |
Implemented major sub-task EXT-2131 - Output monitor contols should only be shown for Group Chat and Adhoc Chat when in a Voice Call. Added onStateChange callback support for voice channel. Added showing/hiding logic of speaking indicator.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llvoicechannel.h')
-rw-r--r-- | indra/newview/llvoicechannel.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 9966bdd5ab..8f1e9ff02d 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -52,6 +52,8 @@ public: STATE_CONNECTED } EState; + typedef boost::function<void(const EState& old_state, const EState& new_state)> state_changed_callback_t; + LLVoiceChannel(const LLUUID& session_id, const std::string& session_name); virtual ~LLVoiceChannel(); @@ -69,6 +71,8 @@ public: virtual BOOL callStarted(); const std::string& getSessionName() const { return mSessionName; } + void setStateChangedCallback(state_changed_callback_t callback) { mStateChangedCallback = callback; } + const LLUUID getSessionID() { return mSessionID; } EState getState() { return mState; } @@ -85,6 +89,10 @@ public: protected: virtual void setState(EState state); + /** + * Use this method if you want mStateChangedCallback to be executed while state is changed + */ + void doSetState(const EState& state); void toggleCallWindowIfNeeded(EState state); void setURI(std::string uri); @@ -106,6 +114,9 @@ protected: static LLVoiceChannel* sCurrentVoiceChannel; static LLVoiceChannel* sSuspendedVoiceChannel; static BOOL sSuspended; + +private: + state_changed_callback_t mStateChangedCallback; }; class LLVoiceChannelGroup : public LLVoiceChannel |