summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-05-07 13:19:05 -0700
committersimon <none@none>2014-05-07 13:19:05 -0700
commitdc4c184696b308b8f60fa1dd751b35e22bd47d62 (patch)
tree1606d992f1cce6fe19572042c456725eb95d7066 /indra/newview/llimview.cpp
parent883467a3cc421fca68a25589114e0e3f0538ff0e (diff)
parent250db74bf9325acdc1169f6c13d297e7fe44b753 (diff)
Merge downstream version 3.7.8 code
Diffstat (limited to 'indra/newview/llimview.cpp')
-rwxr-xr-xindra/newview/llimview.cpp83
1 files changed, 42 insertions, 41 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index d55922af93..c61688a74b 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -68,6 +68,7 @@
#include "llviewerparcelmgr.h"
#include "llconversationlog.h"
#include "message.h"
+#include "llviewerregion.h"
const static std::string ADHOC_NAME_SUFFIX(" Conference");
@@ -254,7 +255,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
// 0. nothing - exit
if (("noaction" == user_preferences ||
ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status)
- && session_floater->isMessagePaneExpanded())
+ && session_floater->isMessagePaneExpanded())
{
return;
}
@@ -785,7 +786,7 @@ bool LLIMModel::LLIMSession::isOtherParticipantAvaline()
return !mOtherParticipantIsAvatar;
}
-LLUUID LLIMModel::LLIMSession::generateOutgouigAdHocHash() const
+LLUUID LLIMModel::LLIMSession::generateOutgoingAdHocHash() const
{
LLUUID hash = LLUUID::null;
@@ -920,13 +921,13 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co
{
if (name.empty())
{
- llwarns << "Attempt to create a new session with empty name; id = " << session_id << llendl;
+ LL_WARNS() << "Attempt to create a new session with empty name; id = " << session_id << LL_ENDL;
return false;
}
if (findIMSession(session_id))
{
- llwarns << "IM Session " << session_id << " already exists" << llendl;
+ LL_WARNS() << "IM Session " << session_id << " already exists" << LL_ENDL;
return false;
}
@@ -972,7 +973,7 @@ void LLIMModel::getMessagesSilently(const LLUUID& session_id, std::list<LLSD>& m
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return;
}
@@ -994,7 +995,7 @@ void LLIMModel::sendNoUnreadMessages(const LLUUID& session_id)
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return;
}
@@ -1014,7 +1015,7 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from,
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return false;
}
@@ -1089,7 +1090,7 @@ LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id,
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return NULL;
}
@@ -1126,7 +1127,7 @@ const std::string LLIMModel::getName(const LLUUID& session_id) const
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return LLTrans::getString("no_session_message");
}
@@ -1138,7 +1139,7 @@ const S32 LLIMModel::getNumUnread(const LLUUID& session_id) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return -1;
}
@@ -1150,7 +1151,7 @@ const LLUUID& LLIMModel::getOtherParticipantID(const LLUUID& session_id) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << " does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << " does not exist " << LL_ENDL;
return LLUUID::null;
}
@@ -1162,7 +1163,7 @@ EInstantMessage LLIMModel::getType(const LLUUID& session_id) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return IM_COUNT;
}
@@ -1174,7 +1175,7 @@ LLVoiceChannel* LLIMModel::getVoiceChannel( const LLUUID& session_id ) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << "does not exist " << LL_ENDL;
return NULL;
}
@@ -1186,7 +1187,7 @@ LLIMSpeakerMgr* LLIMModel::getSpeakerManager( const LLUUID& session_id ) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << " does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << " does not exist " << LL_ENDL;
return NULL;
}
@@ -1198,7 +1199,7 @@ const std::string& LLIMModel::getHistoryFileName(const LLUUID& session_id) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << " does not exist " << llendl;
+ LL_WARNS() << "session " << session_id << " does not exist " << LL_ENDL;
return LLStringUtil::null;
}
@@ -1485,8 +1486,8 @@ public:
mAgents);
}
- llwarns << "LLStartConferenceChatResponder error [status:"
- << statusNum << "]: " << content << llendl;
+ LL_WARNS() << "LLStartConferenceChatResponder error [status:"
+ << statusNum << "]: " << content << LL_ENDL;
//else throw an error back to the client?
//in theory we should have just have these error strings
@@ -1634,9 +1635,9 @@ public:
}
void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
- {
- llwarns << "LLViewerChatterBoxInvitationAcceptResponder error [status:"
- << statusNum << "]: " << content << llendl;
+ {
+ LL_WARNS() << "LLViewerChatterBoxInvitationAcceptResponder error [status:"
+ << statusNum << "]: " << content << LL_ENDL;
//throw something back to the viewer here?
if ( gIMMgr )
{
@@ -1698,7 +1699,7 @@ LLUUID LLIMMgr::computeSessionID(
if (gAgent.isInGroup(session_id) && (session_id != other_participant_id))
{
- llwarns << "Group session id different from group id: IM type = " << dialog << ", session id = " << session_id << ", group id = " << other_participant_id << llendl;
+ LL_WARNS() << "Group session id different from group id: IM type = " << dialog << ", session id = " << session_id << ", group id = " << other_participant_id << LL_ENDL;
}
return session_id;
}
@@ -2444,7 +2445,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
std::string correct_session_name = session_name;
if (session_name.empty())
{
- llwarns << "Received an empty session name from a server" << llendl;
+ LL_WARNS() << "Received an empty session name from a server" << LL_ENDL;
switch(type){
case IM_SESSION_CONFERENCE_START:
@@ -2466,10 +2467,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload
correct_session_name.append(ADHOC_NAME_SUFFIX);
}
}
- llinfos << "Corrected session name is " << correct_session_name << llendl;
+ LL_INFOS() << "Corrected session name is " << correct_session_name << LL_ENDL;
break;
default:
- llwarning("Received an empty session name from a server and failed to generate a new proper session name", 0);
+ LL_WARNS() << "Received an empty session name from a server and failed to generate a new proper session name" << LL_ENDL;
break;
}
}
@@ -2720,10 +2721,10 @@ void LLIMMgr::addMessage(
// code, but the session has to be established inside the server before it can be left.
if (LLMuteList::getInstance()->isMuted(other_participant_id) && !from_linden)
{
- llwarns << "Leaving IM session from initiating muted resident " << from << llendl;
+ LL_WARNS() << "Leaving IM session from initiating muted resident " << from << LL_ENDL;
if(!gIMMgr->leaveSession(new_session_id))
{
- llinfos << "Session " << new_session_id << " does not exist." << llendl;
+ LL_INFOS() << "Session " << new_session_id << " does not exist." << LL_ENDL;
}
return;
}
@@ -2858,8 +2859,8 @@ LLUUID LLIMMgr::addSession(
EInstantMessage dialog,
const LLUUID& other_participant_id, bool voice)
{
- LLDynamicArray<LLUUID> ids;
- ids.put(other_participant_id);
+ std::vector<LLUUID> ids;
+ ids.push_back(other_participant_id);
LLUUID session_id = addSession(name, dialog, other_participant_id, ids, voice);
return session_id;
}
@@ -2870,17 +2871,17 @@ LLUUID LLIMMgr::addSession(
const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id,
- const LLDynamicArray<LLUUID>& ids, bool voice,
+ const std::vector<LLUUID>& ids, bool voice,
const LLUUID& floater_id)
{
- if (0 == ids.getLength())
+ if (ids.empty())
{
return LLUUID::null;
}
if (name.empty())
{
- llwarning("Session name cannot be null!", 0);
+ LL_WARNS() << "Session name cannot be null!" << LL_ENDL;
return LLUUID::null;
}
@@ -2928,7 +2929,7 @@ LLUUID LLIMMgr::addSession(
//we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions
if (!new_session) return session_id;
- llinfos << "LLIMMgr::addSession, new session added, name = " << name << ", session id = " << session_id << llendl;
+ LL_INFOS() << "LLIMMgr::addSession, new session added, name = " << name << ", session id = " << session_id << LL_ENDL;
//Per Plan's suggestion commented "explicit offline status warning" out to make Dessie happier (see EXT-3609)
//*TODO After February 2010 remove this commented out line if no one will be missing that warning
@@ -2965,7 +2966,7 @@ void LLIMMgr::removeSession(const LLUUID& session_id)
LLIMModel::getInstance()->clearSession(session_id);
- llinfos << "LLIMMgr::removeSession, session removed, session id = " << session_id << llendl;
+ LL_INFOS() << "LLIMMgr::removeSession, session removed, session id = " << session_id << LL_ENDL;
notifyObserverSessionRemoved(session_id);
}
@@ -3030,7 +3031,7 @@ void LLIMMgr::inviteToSession(
{
if (voice_invite && "VoiceInviteQuestionDefault" == question_type)
{
- llinfos << "Rejecting voice call from initiating muted resident " << caller_name << llendl;
+ LL_INFOS() << "Rejecting voice call from initiating muted resident " << caller_name << LL_ENDL;
LLIncomingCallDialog::processCallResponse(1, payload);
}
return;
@@ -3352,9 +3353,9 @@ bool LLIMMgr::isNonFriendSessionNotified(const LLUUID& session_id)
void LLIMMgr::noteOfflineUsers(
const LLUUID& session_id,
- const LLDynamicArray<LLUUID>& ids)
+ const std::vector<LLUUID>& ids)
{
- S32 count = ids.count();
+ S32 count = ids.size();
if(count == 0)
{
const std::string& only_user = LLTrans::getString("only_user_message");
@@ -3367,11 +3368,11 @@ void LLIMMgr::noteOfflineUsers(
LLIMModel& im_model = LLIMModel::instance();
for(S32 i = 0; i < count; ++i)
{
- info = at.getBuddyInfo(ids.get(i));
+ info = at.getBuddyInfo(ids.at(i));
LLAvatarName av_name;
if (info
&& !info->isOnline()
- && LLAvatarNameCache::get(ids.get(i), &av_name))
+ && LLAvatarNameCache::get(ids.at(i), &av_name))
{
LLUIString offline = LLTrans::getString("offline_message");
// Use display name only because this user is your friend
@@ -3383,7 +3384,7 @@ void LLIMMgr::noteOfflineUsers(
}
void LLIMMgr::noteMutedUsers(const LLUUID& session_id,
- const LLDynamicArray<LLUUID>& ids)
+ const std::vector<LLUUID>& ids)
{
// Don't do this if we don't have a mute list.
LLMuteList *ml = LLMuteList::getInstance();
@@ -3392,14 +3393,14 @@ void LLIMMgr::noteMutedUsers(const LLUUID& session_id,
return;
}
- S32 count = ids.count();
+ S32 count = ids.size();
if(count > 0)
{
LLIMModel* im_model = LLIMModel::getInstance();
for(S32 i = 0; i < count; ++i)
{
- if( ml->isMuted(ids.get(i)) )
+ if( ml->isMuted(ids.at(i)) )
{
LLUIString muted = LLTrans::getString("muted_message");