diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-11-06 18:31:52 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-11-06 18:31:52 -0500 |
commit | 9c048d12fdd9fd9c95cc93223fc731ee7b548294 (patch) | |
tree | 4d6e91028b4ab48b6600c34f9cf126610fbce690 /indra/newview/llvoicechannel.h | |
parent | 2aa981ac23bbdf2fd609e04434179be0cfec79ce (diff) | |
parent | f3bbcfb9d41b41f8c4b144ae9a1173fc7719b88c (diff) |
merge
--HG--
branch : avatar-pipeline
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 |