From 894261e4e4aea8a15bef33fdf34807812a1c73bb Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 13 May 2010 16:30:15 -0700 Subject: Fix build errors introduced in last merge --- indra/newview/llvoicevivox.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llvoicevivox.cpp') diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index bcb1a70efb..a457bd1fe6 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -6181,11 +6181,9 @@ void LLVivoxVoiceClient::lookupName(const LLUUID &id) } //static -void LLVivoxVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group) +void LLVivoxVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& name, BOOL is_group) { - std::string name = llformat("%s %s", first.c_str(), last.c_str()); - LLVivoxVoiceClient::getInstance()->avatarNameResolved(id, name); - + LLVivoxVoiceClient::getInstance()->avatarNameResolved(id, name); } void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name) -- cgit v1.2.3 From 118ab8900a7ddc86564a84d836f507d4a1aa86b7 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 17 May 2010 16:33:16 -0700 Subject: DEV-50013 Display name for inbound voice calls (Last commit was actually for outbound). Reviewed with Leyla --- indra/newview/llvoicevivox.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llvoicevivox.cpp') diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index a457bd1fe6..4a0b0f12a4 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -37,6 +37,8 @@ #include "llsdutil.h" +// Linden library includes +#include "llavatarnamecache.h" #include "llvoavatarself.h" #include "llbufferstream.h" #include "llfile.h" @@ -52,6 +54,8 @@ #include "llviewercontrol.h" #include "llkeyboard.h" #include "llappviewer.h" // for gDisconnected, gDisableVoice + +// Viewer includes #include "llmutelist.h" // to check for muted avatars #include "llagent.h" #include "llcachename.h" @@ -6178,6 +6182,11 @@ void LLVivoxVoiceClient::lookupName(const LLUUID &id) { BOOL is_group = FALSE; gCacheName->get(id, is_group, &LLVivoxVoiceClient::onAvatarNameLookup); + + // Peformance boost: We're going to need the display name later when + // we show the call request floater, so get the request going now + LLAvatarName unused; + LLAvatarNameCache::get(id, &unused); } //static -- cgit v1.2.3 From c994a93ed11642fc0fe12c1b743215bf63d852ab Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 20 May 2010 15:30:59 -0700 Subject: DEV-50013 Convert call dialogs to use Display Names Reviewed with Leyla --- indra/newview/llvoicevivox.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'indra/newview/llvoicevivox.cpp') diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 4a0b0f12a4..409e507c16 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -6180,19 +6180,18 @@ void LLVivoxVoiceClient::notifyFriendObservers() void LLVivoxVoiceClient::lookupName(const LLUUID &id) { - BOOL is_group = FALSE; - gCacheName->get(id, is_group, &LLVivoxVoiceClient::onAvatarNameLookup); - - // Peformance boost: We're going to need the display name later when - // we show the call request floater, so get the request going now - LLAvatarName unused; - LLAvatarNameCache::get(id, &unused); + LLAvatarNameCache::get(id, + boost::bind(&LLVivoxVoiceClient::onAvatarNameCache, + this, _1, _2)); } -//static -void LLVivoxVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& name, BOOL is_group) +void LLVivoxVoiceClient::onAvatarNameCache(const LLUUID& agent_id, + const LLAvatarName& av_name) { - LLVivoxVoiceClient::getInstance()->avatarNameResolved(id, name); + // For Vivox, we use the legacy name because I'm uncertain whether or + // not their service can tolerate switching to Username or Display Name + std::string legacy_name = av_name.getLegacyName(); + avatarNameResolved(agent_id, legacy_name); } void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string &name) -- cgit v1.2.3 From 01fa1379931ea41813e33a4228dcb8a156f609e7 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 24 May 2010 15:36:30 -0700 Subject: DEV-50013 Use new cache to get legacy name for Vivox --- indra/newview/llvoicevivox.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvoicevivox.cpp') diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 409e507c16..a9e14e4e89 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -2658,12 +2658,16 @@ void LLVivoxVoiceClient::buildLocalAudioUpdates(std::ostringstream &stream) void LLVivoxVoiceClient::checkFriend(const LLUUID& id) { - std::string name; buddyListEntry *buddy = findBuddy(id); // Make sure we don't add a name before it's been looked up. - if(gCacheName->getFullName(id, name)) + LLAvatarName av_name; + if(LLAvatarNameCache::get(id, &av_name)) { + // *NOTE: For now, we feed legacy names to Vivox because I don't know + // if their service can support a mix of new and old clients with + // different sorts of names. + std::string name = av_name.getLegacyName(); const LLRelationship* relationInfo = LLAvatarTracker::instance().getBuddyInfo(id); bool canSeeMeOnline = false; -- cgit v1.2.3