From ff52ac089f9ed67410f80fe66d0b997f0f2dafcc Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Wed, 15 Jul 2009 21:50:42 +0000 Subject: DEV-34822 viewer 1.23 merge DEV-32649 Merge the diamondware/vivox voice code -r124876 -r125220 --- indra/newview/llimview.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index daabf1f717..15e657c866 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -331,13 +331,13 @@ LLIMModel::LLIMSession::~LLIMSession() mSpeakers = NULL; // End the text IM session if necessary - if(gVoiceClient && mOtherParticipantID.notNull()) + if(LLVoiceClient::getInstance() && mOtherParticipantID.notNull()) { switch(mType) { case IM_NOTHING_SPECIAL: case IM_SESSION_P2P_INVITE: - gVoiceClient->endUserIMSession(mOtherParticipantID); + LLVoiceClient::getInstance()->endUserIMSession(mOtherParticipantID); break; default: @@ -857,7 +857,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if((offline == IM_OFFLINE) && (LLVoiceClient::getInstance()->isOnlineSIP(other_participant_id))) { // User is online through the OOW connector, but not with a regular viewer. Try to send the message via SLVoice. - sent = gVoiceClient->sendTextMessage(other_participant_id, utf8_text); + sent = LLVoiceClient::getInstance()->sendTextMessage(other_participant_id, utf8_text); } if(!sent) @@ -1723,7 +1723,11 @@ bool LLIncomingCallDialog::lifetimeHasExpired() void LLIncomingCallDialog::onLifetimeExpired() { // check whether a call is valid or not - if (LLVoiceClient::getInstance()->findSession(mPayload["caller_id"].asUUID())) + LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mPayload["session_id"].asUUID()); + if(channelp && + (channelp->getState() != LLVoiceChannel::STATE_NO_CHANNEL_INFO) && + (channelp->getState() != LLVoiceChannel::STATE_ERROR) && + (channelp->getState() != LLVoiceChannel::STATE_HUNG_UP)) { // restart notification's timer if call is still valid mLifetimeTimer.start(); @@ -1952,10 +1956,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response) { if (type == IM_SESSION_P2P_INVITE) { - if(gVoiceClient) + if(LLVoiceClient::getInstance()) { std::string s = mPayload["session_handle"].asString(); - gVoiceClient->declineInvite(s); + LLVoiceClient::getInstance()->declineInvite(s); } } else @@ -2043,11 +2047,8 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) { if (type == IM_SESSION_P2P_INVITE) { - if(gVoiceClient) - { - std::string s = payload["session_handle"].asString(); - gVoiceClient->declineInvite(s); - } + std::string s = payload["session_handle"].asString(); + LLVoiceClient::getInstance()->declineInvite(s); } else { @@ -3156,7 +3157,7 @@ public: return; } - if(!LLVoiceClient::voiceEnabled()) + if(!LLVoiceClient::getInstance()->voiceEnabled()) { // Don't display voice invites unless the user has voice enabled. return; -- cgit v1.2.3 From 9757cd64e19209484333ff8d07aa86fcccaf22f6 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 10 Mar 2010 14:04:36 +0200 Subject: fixed EXT-4872 'Loading...' message remains in ad-hoc IM floated opened by 'Start IM' button added timing out of session initialization (after 30 seconds) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 77e3012d26..1641e2a0e2 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -80,6 +80,9 @@ const static std::string ADHOC_NAME_SUFFIX(" Conference"); const static std::string NEARBY_P2P_BY_OTHER("nearby_P2P_by_other"); const static std::string NEARBY_P2P_BY_AGENT("nearby_P2P_by_agent"); +/** Timeout of outgoing session initialization (in seconds) */ +const static U32 SESSION_INITIALIZATION_TIMEOUT = 30; + std::string LLCallDialogManager::sPreviousSessionlName = ""; LLIMModel::LLIMSession::SType LLCallDialogManager::sPreviousSessionType = LLIMModel::LLIMSession::P2P_SESSION; std::string LLCallDialogManager::sCurrentSessionlName = ""; @@ -91,6 +94,19 @@ const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-141 // LLIMMgr* gIMMgr = NULL; + +BOOL LLSessionTimeoutTimer::tick() +{ + if (mSessionId.isNull()) return TRUE; + + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId); + if (session && !session->mSessionInitialized) + { + gIMMgr->showSessionStartError("session_initialization_timed_out_error", mSessionId); + } + return TRUE; +} + void toast_callback(const LLSD& msg){ // do not show toast in busy mode or it goes from agent if (gAgent.getBusy() || gAgent.getID() == msg["from_id"]) @@ -214,6 +230,11 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& //so we're already initialized mSessionInitialized = true; } + else + { + //tick returns TRUE - timer will be deleted after the tick + new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT); + } if (IM_NOTHING_SPECIAL == type) { -- cgit v1.2.3 From 3f3c9c7e255e090c7f09dafd08ec20f2d8a09c6d Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 26 Mar 2010 17:08:32 +0200 Subject: Fixed normal bug EXT-5116 (Voice notification should display on top of IM window, not under.) Replaced sending voice notifications to front (in floater view) with adding them to popup view. In this case Voice Notifications are shown on top even IM window has focus. And Resident can continue enter the text when Voice notification is shown. Reviewad by Vadim at https://codereview.productengine.com/secondlife/r/120/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 288895be8c..389917a6f7 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1559,6 +1559,11 @@ LLCallDialog::LLCallDialog(const LLSD& payload) setDocked(true); } +LLCallDialog::~LLCallDialog() +{ + LLUI::removePopup(this); +} + void LLCallDialog::getAllowedRect(LLRect& rect) { rect = gViewerWindow->getWorldViewRectScaled(); @@ -1612,7 +1617,7 @@ void LLCallDialog::onOpen(const LLSD& key) LLDockableFloater::onOpen(key); // it should be over the all floaters. EXT-5116 - gFloaterView->bringToFront(this, FALSE); + LLUI::addPopup(this); } void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) -- cgit v1.2.3 From 114e5ca0839bace7f247a6eadb6e06a28597501d Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 29 Mar 2010 16:33:35 -0400 Subject: EXT-5940 : Typedef all vector's Superficial cleanup to change all typedef std::vector to use a common typedef uuid_vec_t instead. --- indra/newview/llimview.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 7a4febec20..a8d876e8a3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -146,7 +146,7 @@ LLIMModel::LLIMModel() addNewMsgCallback(toast_callback); } -LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector& ids, bool voice) +LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice) : mSessionID(session_id), mName(name), mType(type), @@ -423,7 +423,7 @@ LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const } //*TODO consider switching to using std::set instead of std::list for holding LLUUIDs across the whole code -LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const std::vector& ids) +LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const uuid_vec_t& ids) { S32 num = ids.size(); if (!num) return NULL; @@ -440,7 +440,7 @@ LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const std::vector& std::list tmp_list(session->mInitialTargetIDs.begin(), session->mInitialTargetIDs.end()); - std::vector::const_iterator iter = ids.begin(); + uuid_vec_t::const_iterator iter = ids.begin(); while (iter != ids.end()) { tmp_list.remove(*iter); @@ -571,7 +571,7 @@ void LLIMModel::testMessages() //session name should not be empty bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, - const LLUUID& other_participant_id, const std::vector& ids, bool voice) + const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice) { if (name.empty()) { @@ -596,7 +596,7 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, bool voice) { - std::vector no_ids; + uuid_vec_t no_ids; return newSession(session_id, name, type, other_participant_id, no_ids, voice); } @@ -1002,7 +1002,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text, } else { - for(std::vector::iterator it = session->mInitialTargetIDs.begin(); + for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); it!=session->mInitialTargetIDs.end();++it) { const LLUUID id = *it; @@ -1134,7 +1134,7 @@ private: bool LLIMModel::sendStartSession( const LLUUID& temp_session_id, const LLUUID& other_participant_id, - const std::vector& ids, + const uuid_vec_t& ids, EInstantMessage dialog) { if ( dialog == IM_SESSION_GROUP_START ) -- cgit v1.2.3 From b0d2cd38f0fe0ba6c63141259062f2552f817145 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 30 Mar 2010 15:21:53 -0400 Subject: EXT-6634 : INFRASTRUCTURE: Generic header file / #include cleanup LLAgent.* cleanup Also took out some constants from llagent.cpp that aren't being used. --- indra/newview/llimview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a8d876e8a3..0099cd114f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -36,6 +36,7 @@ #include "llfloaterreg.h" #include "llfontgl.h" +#include "llgl.h" #include "llrect.h" #include "llerror.h" #include "llbutton.h" -- cgit v1.2.3 From 0bb3f144c0a6712a269246975635962b3b5f48d0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 7 Apr 2010 10:37:07 +0100 Subject: Backed out changeset 63b699f90efd --- indra/newview/llimview.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 5201f92dbc..e0f155a6a9 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -344,13 +344,13 @@ LLIMModel::LLIMSession::~LLIMSession() mSpeakers = NULL; // End the text IM session if necessary - if(LLVoiceClient::getInstance() && mOtherParticipantID.notNull()) + if(gVoiceClient && mOtherParticipantID.notNull()) { switch(mType) { case IM_NOTHING_SPECIAL: case IM_SESSION_P2P_INVITE: - LLVoiceClient::getInstance()->endUserIMSession(mOtherParticipantID); + gVoiceClient->endUserIMSession(mOtherParticipantID); break; default: @@ -925,7 +925,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if((offline == IM_OFFLINE) && (LLVoiceClient::getInstance()->isOnlineSIP(other_participant_id))) { // User is online through the OOW connector, but not with a regular viewer. Try to send the message via SLVoice. - sent = LLVoiceClient::getInstance()->sendTextMessage(other_participant_id, utf8_text); + sent = gVoiceClient->sendTextMessage(other_participant_id, utf8_text); } if(!sent) @@ -1717,7 +1717,7 @@ void LLOutgoingCallDialog::show(const LLSD& key) // skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice, // so no reconnection to nearby chat happens (EXT-4397) - bool voice_works = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); + bool voice_works = LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); std::string reconnect_nearby = voice_works ? LLTrans::getString("reconnect_nearby") : std::string(); childSetTextArg("nearby", "[RECONNECT_NEARBY]", reconnect_nearby); @@ -1843,11 +1843,7 @@ LLCallDialog(payload) void LLIncomingCallDialog::onLifetimeExpired() { // check whether a call is valid or not - LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mPayload["session_id"].asUUID()); - if(channelp && - (channelp->getState() != LLVoiceChannel::STATE_NO_CHANNEL_INFO) && - (channelp->getState() != LLVoiceChannel::STATE_ERROR) && - (channelp->getState() != LLVoiceChannel::STATE_HUNG_UP)) + if (LLVoiceClient::getInstance()->findSession(mPayload["caller_id"].asUUID())) { // restart notification's timer if call is still valid mLifetimeTimer.start(); @@ -2081,10 +2077,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response) { if (type == IM_SESSION_P2P_INVITE) { - if(LLVoiceClient::getInstance()) + if(gVoiceClient) { std::string s = mPayload["session_handle"].asString(); - LLVoiceClient::getInstance()->declineInvite(s); + gVoiceClient->declineInvite(s); } } else @@ -2172,8 +2168,11 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) { if (type == IM_SESSION_P2P_INVITE) { - std::string s = payload["session_handle"].asString(); - LLVoiceClient::getInstance()->declineInvite(s); + if(gVoiceClient) + { + std::string s = payload["session_handle"].asString(); + gVoiceClient->declineInvite(s); + } } else { @@ -3079,7 +3078,7 @@ public: return; } - if(!LLVoiceClient::getInstance()->voiceEnabled()) + if(!LLVoiceClient::voiceEnabled()) { // Don't display voice invites unless the user has voice enabled. return; -- cgit v1.2.3