summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimview.cpp')
-rwxr-xr-xindra/newview/llimview.cpp81
1 files changed, 41 insertions, 40 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 2e53effcac..f9e004b0d8 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;
}
@@ -919,13 +920,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;
}
@@ -971,7 +972,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;
}
@@ -993,7 +994,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;
}
@@ -1013,7 +1014,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;
}
@@ -1088,7 +1089,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;
}
@@ -1125,7 +1126,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");
}
@@ -1137,7 +1138,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;
}
@@ -1149,7 +1150,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;
}
@@ -1161,7 +1162,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;
}
@@ -1173,7 +1174,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;
}
@@ -1185,7 +1186,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;
}
@@ -1197,7 +1198,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;
}
@@ -1484,8 +1485,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
@@ -1633,9 +1634,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 )
{
@@ -1697,7 +1698,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;
}
@@ -2443,7 +2444,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:
@@ -2465,10 +2466,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;
}
}
@@ -2719,10 +2720,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;
}
@@ -2857,8 +2858,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;
}
@@ -2869,17 +2870,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;
}
@@ -2927,7 +2928,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
@@ -2964,7 +2965,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);
}
@@ -3029,7 +3030,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;
@@ -3319,9 +3320,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");
@@ -3334,11 +3335,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
@@ -3350,7 +3351,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();
@@ -3359,14 +3360,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");