From ec48cc1a40fc189de379ca3dd198e3b96395ce33 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 3 Dec 2009 15:52:48 +0200 Subject: No ticket. Fixed using LLVoiceChannel::setStateChangedCallback() in IM Panel and IM View. - Added disconnecting signal in destructor. --HG-- branch : product-engine --- indra/newview/llimview.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llimview.h') diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 66f92c83a5..8a0f57deb0 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -72,6 +72,9 @@ public: LLUUID mOtherParticipantID; std::vector mInitialTargetIDs; + // connection to voice channel state change signal + boost::signals2::connection mVoiceChannelStateChangeConnection; + //does NOT include system messages S32 mNumUnread; -- cgit v1.2.3 From 63cebc3ae05c952d538d17e392ebeb98c2e86cfb Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Fri, 4 Dec 2009 15:05:42 +0200 Subject: partial implementation for the following tasks (EXT-2803) Create notifications and dialogs to negotiate P2P voice chat (shown over the Speak button) (EXT-2806) Create notification windows and dialogs to negotiate Group Voice Chat (docked to Speak button's chevron) (EXT-2802) Create notifications and dialogs to negotiate AvaLine calls (shown over Speak button) (EXT-2805) Create notifications and dialogs to negotiate Ad-Hoc calls (shown over Speak button) implemented: invitations, displaying of notifications according to the state of current voice chat session --HG-- branch : product-engine --- indra/newview/llimview.h | 52 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 9 deletions(-) (limited to 'indra/newview/llimview.h') diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 8a0f57deb0..4561d760d4 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -48,6 +48,7 @@ class LLFloaterChatterBox; class LLUUID; class LLFloaterIMPanel; class LLFriendObserver; +class LLCallDialogManager; class LLIMModel : public LLSingleton { @@ -55,12 +56,20 @@ public: struct LLIMSession { + typedef enum e_session_type + { // for now we have 4 predefined types for a session + P2P_SESSION, + GROUP_SESSION, + ADHOC_SESSION, + AVALINE_SESSION, + } SType; + LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector& ids); virtual ~LLIMSession(); void sessionInitReplyReceived(const LLUUID& new_session_id); - + void setSessionType(); //define what type of session was opened void addMessagesFromHistory(const std::list& history); void addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time); void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); @@ -69,8 +78,10 @@ public: LLUUID mSessionID; std::string mName; EInstantMessage mType; + SType mSessionType; LLUUID mOtherParticipantID; std::vector mInitialTargetIDs; + LLCallDialogManager* mCallDialogManager; // connection to voice channel state change signal boost::signals2::connection mVoiceChannelStateChangeConnection; @@ -419,7 +430,36 @@ private: LLSD mPendingAgentListUpdates; }; -class LLIncomingCallDialog : public LLDockableFloater +class LLCallDialogManager : public LLInitClass +{ +public: + LLCallDialogManager(); + ~LLCallDialogManager(); + + static void initClass(); + static void onVoiceChannelChanged(const LLUUID &session_id); + static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); + +protected: + static std::string sPreviousSessionlName; + static std::string sCurrentSessionlName; + static LLIMModel::LLIMSession* sSession; +}; + +class LLCallDialog : public LLDockableFloater +{ +public: + LLCallDialog(const LLSD& payload); + ~LLCallDialog() {} + + virtual void onOpen(const LLSD& key); + +protected: + virtual void getAllowedRect(LLRect& rect); + LLSD mPayload; +}; + +class LLIncomingCallDialog : public LLCallDialog { public: LLIncomingCallDialog(const LLSD& payload); @@ -433,12 +473,9 @@ public: private: void processCallResponse(S32 response); - void getAllowedRect(LLRect& rect); - - LLSD mPayload; }; -class LLOutgoingCallDialog : public LLDockableFloater +class LLOutgoingCallDialog : public LLCallDialog { public: LLOutgoingCallDialog(const LLSD& payload); @@ -449,9 +486,6 @@ public: static void onCancel(void* user_data); private: - void getAllowedRect(LLRect& rect); - - LLSD mPayload; }; // Globals -- cgit v1.2.3