diff options
author | Jon Wolk <jwolk@lindenlab.com> | 2008-01-24 21:11:28 +0000 |
---|---|---|
committer | Jon Wolk <jwolk@lindenlab.com> | 2008-01-24 21:11:28 +0000 |
commit | ed517c3b1440145aaf7226c1ac8270f20509f708 (patch) | |
tree | fefc8447366f54b4aa3053561bf6dd899612e6f1 /indra/newview | |
parent | c48ebd889b3baa6adf051e3b114052291ac72603 (diff) |
svn merge -r 77416:78126 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-19-0-Viewer_abandoned -> release
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llimpanel.cpp | 66 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 41 | ||||
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 10 |
3 files changed, 55 insertions, 62 deletions
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index b1fefc4f5d..0c34ef3ebc 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -305,6 +305,7 @@ void LLVoiceCallCapResponder::error(U32 status, const std::string& reason) { if ( 403 == status ) { + //403 == no ability LLNotifyBox::showXml( "VoiceNotAllowed", channelp->getNotifyArgs()); @@ -1403,48 +1404,6 @@ private: LLUUID mSessionID; }; -class LLSessionImmediateInviteResponder : public LLHTTPClient::Responder -{ -public: - LLSessionImmediateInviteResponder( - const LLUUID& session_id, - const std::string& chat_req_url, - const LLSD& post_data) - { - mSessionID = session_id; - mURL = chat_req_url; - mPostData = post_data; - } - - void error(U32 statusNum, const std::string& reason) - { - if ( statusNum == 400 ) - { - //hrm 400 indicates invalid parameters...more - //than likely the method doesn't exist - //so try a soon to be deprecated old school way of doing this - mPostData["method"] = "invite"; - - LLHTTPClient::post( - mURL, - mPostData, - new LLSessionInviteResponder(mSessionID)); - } - else - { - //throw something back to the viewer here? - llinfos << "Error inviting all agents to session" << llendl; - } - } - -private: - LLUUID mSessionID; - LLSD mPostData; - - std::string mURL; -}; - - BOOL LLFloaterIMPanel::inviteToSession(const LLDynamicArray<LLUUID>& ids) { LLViewerRegion* region = gAgent.getRegion(); @@ -1469,16 +1428,13 @@ BOOL LLFloaterIMPanel::inviteToSession(const LLDynamicArray<LLUUID>& ids) data["params"].append(ids.get(i)); } - data["method"] = "immediate invite"; + data["method"] = "invite"; data["session-id"] = mSessionUUID; LLHTTPClient::post( url, data, - new LLSessionImmediateInviteResponder( - mSessionUUID, - url, - data)); - + new LLSessionInviteResponder( + mSessionUUID)); } else { @@ -2155,7 +2111,7 @@ void LLFloaterIMPanel::showSessionStartError( "ChatterBoxSessionStartError", args, onConfirmForceCloseError, - this); + new LLUUID(mSessionUUID)); } void LLFloaterIMPanel::showSessionEventError( @@ -2163,7 +2119,7 @@ void LLFloaterIMPanel::showSessionEventError( const std::string& error_string) { LLString::format_map_t args; - args["[REASON]"] = + args["[REASON]"] = LLFloaterIM::sErrorStringsMap[error_string]; args["[EVENT]"] = LLFloaterIM::sEventStringsMap[event_string]; @@ -2199,9 +2155,15 @@ void LLFloaterIMPanel::onKickSpeaker(void* user_data) void LLFloaterIMPanel::onConfirmForceCloseError(S32 option, void* data) { //only 1 option really - LLFloaterIMPanel* floater = ((LLFloaterIMPanel*) data); + LLUUID session_id = *((LLUUID*) data); - if ( floater ) floater->close(FALSE); + if ( gIMMgr ) + { + LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession( + session_id); + + if ( floaterp ) floaterp->close(FALSE); + } } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index f93f5810c5..2be41f01c5 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -177,6 +177,27 @@ BOOL LLFloaterIM::postBuild() } if ( sErrorStringsMap.end() == + sErrorStringsMap.find("no_ability") ) + { + sErrorStringsMap["no_ability"] = + getFormattedUIString("no_ability_error"); + } + + if ( sErrorStringsMap.end() == + sErrorStringsMap.find("muted") ) + { + sErrorStringsMap["muted"] = + getFormattedUIString("muted_error"); + } + + if ( sErrorStringsMap.end() == + sErrorStringsMap.find("not_a_moderator") ) + { + sErrorStringsMap["not_a_moderator"] = + getFormattedUIString("not_a_mod_error"); + } + + if ( sErrorStringsMap.end() == sErrorStringsMap.find("does not exist") ) { sErrorStringsMap["does not exist"] = @@ -195,6 +216,13 @@ BOOL LLFloaterIM::postBuild() getFormattedUIString("message_session_event"); } + + if ( sEventStringsMap.end() == sEventStringsMap.find("mute") ) + { + sEventStringsMap["mute"] = getFormattedUIString( + "mute_agent_event"); + } + if ( sForceCloseSessionMap.end() == sForceCloseSessionMap.find("removed") ) { @@ -832,8 +860,7 @@ public: } void error(U32 statusNum, const std::string& reason) - { - + { //throw something back to the viewer here? if ( gIMMgr ) { @@ -843,7 +870,7 @@ public: LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(mSessionID); - if (floaterp) + if ( floaterp ) { std::string error_string; @@ -853,7 +880,7 @@ public: } else { - error_string = "generic_request_error"; + error_string = "generic"; } floaterp->showSessionStartError( @@ -1428,8 +1455,6 @@ public: //check for 'text' or 'voice' invitations...bleh if ( input["body"].has("instantmessage") ) { - LLString capability = input["body"]["capabilities"]["call"].asString(); - LLSD message_params = input["body"]["instantmessage"]["message_params"]; @@ -1537,12 +1562,12 @@ public: { LLSD data; data["method"] = "accept invitation"; - data["session-id"] = input["body"]["session_id"]; + data["session-id"] = session_id; LLHTTPClient::post( url, data, new LLViewerChatterBoxInvitationAcceptResponder( - input["body"]["session_id"].asUUID(), + session_id, LLIMMgr::INVITATION_TYPE_INSTANT_MESSAGE)); } } //end if invitation has instant message diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 1cbb1adada..2b151a5902 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -3230,7 +3230,6 @@ void LLVoiceClient::parcelChanged() std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest"); LLSD data; - data["method"] = "call"; LLHTTPClient::post( url, data, @@ -3996,7 +3995,14 @@ void LLVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::EStatusTy { case 20713: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_FULL; break; case 20714: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_LOCKED; break; - case 20715: status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; + case 20715: + //invalid channel, we may be using a set of poorly cached + //info + status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; + break; + case 1009: + //invalid username and password + status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; break; } |