diff options
Diffstat (limited to 'indra/newview/llimview.h')
-rw-r--r-- | indra/newview/llimview.h | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index f26889ac91..09f0c9df71 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -65,14 +65,13 @@ public: } SType; LLIMSession(const LLUUID& session_id, const std::string& name, - const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids); + const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice); virtual ~LLIMSession(); void sessionInitReplyReceived(const LLUUID& new_session_id); - void setSessionType(); //define what type of session was opened void addMessagesFromHistory(const std::list<LLSD>& 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); + void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction); static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); LLUUID mSessionID; @@ -105,6 +104,9 @@ public: bool mTextIMPossible; bool mOtherParticipantIsAvatar; bool mStartCallOnInitialize; + + //if IM session is created for a voice call + bool mStartedAsIMCall; }; @@ -144,7 +146,10 @@ public: * @param name session name should not be empty, will return false if empty */ bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, - const std::vector<LLUUID>& ids = std::vector<LLUUID>()); + const std::vector<LLUUID>& ids, bool voice = false); + + bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, + const LLUUID& other_participant_id, bool voice = false); /** * Remove all session data associated with a session specified by session_id @@ -164,6 +169,12 @@ public: bool addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true); /** + * Similar to addMessage(...) above but won't send a signal about a new message added + */ + LLIMModel::LLIMSession* addMessageSilently(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, + const std::string& utf8_text, bool log2file = true); + + /** * Add a system message to an IM Model */ bool proccessOnlineOfflineNotification(const LLUUID& session_id, const std::string& utf8_text); @@ -285,14 +296,14 @@ public: // session. LLUUID addSession(const std::string& name, EInstantMessage dialog, - const LLUUID& other_participant_id); + const LLUUID& other_participant_id, bool voice = false); // Adds a session using a specific group of starting agents // the dialog type is assumed correct. Returns the uuid of the session. LLUUID addSession(const std::string& name, EInstantMessage dialog, const LLUUID& other_participant_id, - const LLDynamicArray<LLUUID>& ids); + const LLDynamicArray<LLUUID>& ids, bool voice = false); /** * Creates a P2P session with the requisite handle for responding to voice calls. @@ -384,7 +395,7 @@ public: * Start call in a session * @return false if voice channel doesn't exist **/ - bool startCall(const LLUUID& session_id); + bool startCall(const LLUUID& session_id, LLVoiceChannel::EDirection direction = LLVoiceChannel::OUTGOING_CALL); /** * End call in a session @@ -392,6 +403,8 @@ public: **/ bool endCall(const LLUUID& session_id); + bool isVoiceCall(const LLUUID& session_id); + private: /** @@ -448,12 +461,13 @@ public: static void initClass(); static void onVoiceChannelChanged(const LLUUID &session_id); - static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); + static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction); protected: static std::string sPreviousSessionlName; static std::string sCurrentSessionlName; static LLIMModel::LLIMSession* sSession; + static LLVoiceChannel::EState sOldState; }; class LLCallDialog : public LLDockableFloater @@ -491,14 +505,18 @@ public: LLOutgoingCallDialog(const LLSD& payload); /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + void show(const LLSD& key); static void onCancel(void* user_data); + static const LLUUID OCD_KEY; // check timer state /*virtual*/ void draw(); private: + + // hide all text boxes + void hideAllText(); // lifetime timer for NO_ANSWER notification LLTimer mLifetimeTimer; // lifetime duration for NO_ANSWER notification |