From c2373fb5a6b08b2c32e5f93fa67b25f669e8b47f Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Thu, 11 Feb 2010 16:39:15 -0800 Subject: Created stub LLAvatarNameCache for display name lookup, as well as LLAvatarName base data object. Reviewed with Kelly. --- indra/llcommon/llavatarname.h | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 indra/llcommon/llavatarname.h (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h new file mode 100644 index 0000000000..4264a8e655 --- /dev/null +++ b/indra/llcommon/llavatarname.h @@ -0,0 +1,53 @@ +/** + * @file llavatarname.h + * @brief Represents name-related data for an avatar, such as the + * username/SLID ("bobsmith123" or "james.linden") and the display + * name ("James Cook") + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ +#ifndef LLAVATARNAME_H +#define LLAVATARNAME_H + +#include <string> + +class LL_COMMON_API LLAvatarName +{ +public: + bool operator<(const LLAvatarName& rhs) const; + + // "bobsmith123" or "james.linden", US-ASCII only + std::string mSLID; + + // "Jose' Sanchez" or "James Linden", UTF-8 encoded Unicode + // Contains data whether or not user has explicitly set + // a display name; may duplicate their SLID. + std::string mDisplayName; +}; + +#endif -- cgit v1.2.3 From c16591c046fa76fc5d13387efa3bcaec3422e593 Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Fri, 12 Feb 2010 16:12:12 -0800 Subject: Per-avatar customizable icons next to name links in text Changed LLUrlEntryAgent callbacks to handle both link label and icon Eliminated legacy LLNameCache file loading Reviewed with Kelly --- indra/llcommon/llavatarname.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 4264a8e655..7205eb4523 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -39,6 +39,8 @@ class LL_COMMON_API LLAvatarName { public: + LLAvatarName(); + bool operator<(const LLAvatarName& rhs) const; // "bobsmith123" or "james.linden", US-ASCII only @@ -48,6 +50,15 @@ public: // Contains data whether or not user has explicitly set // a display name; may duplicate their SLID. std::string mDisplayName; + + // Names can change, so need to keep track of when name was + // last checked. + // Unix time-from-epoch seconds + U32 mLastUpdate; + + // Can be a viewer UI image name ("Person_Check") or a server-side + // image UUID, or empty string. + std::string mBadge; }; #endif -- cgit v1.2.3 From af8f8b4770eb45b4238d98ddd574ba726470f797 Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Fri, 19 Feb 2010 11:11:45 -0800 Subject: Improved support for toggling display names on/off Stop pre-populated name cache because we have a web service now for lookup Added mIsLegacy to LLAvatarName so we can colorize those name tags differently --- indra/llcommon/llavatarname.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 7205eb4523..fb67c16f45 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -51,6 +51,10 @@ public: // a display name; may duplicate their SLID. std::string mDisplayName; + // If true, both display name and SLID were generated from + // a legacy first and last name, like "James Linden (james.linden)" + bool mIsLegacy; + // Names can change, so need to keep track of when name was // last checked. // Unix time-from-epoch seconds -- cgit v1.2.3 From 0b36c4181203e37d6fc3e59817d5b5abd2d7611e Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Thu, 8 Apr 2010 15:43:00 -0700 Subject: DEV-47529 Add expiration to display name cache for viewer Also synchronize LLAvatarNameCache with server version TODO: Get expiration time from web service --- indra/llcommon/llavatarname.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index fb67c16f45..4d50f6e76d 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -58,7 +58,7 @@ public: // Names can change, so need to keep track of when name was // last checked. // Unix time-from-epoch seconds - U32 mLastUpdate; + U32 mExpires; // Can be a viewer UI image name ("Person_Check") or a server-side // image UUID, or empty string. -- cgit v1.2.3 From 65e565e0e1d7b964048a32a92f59a5dd8f74bb0c Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Mon, 12 Apr 2010 16:36:12 -0700 Subject: DEV-47529 Convert viewer to use final People API lookup URL format Reviewed with Simon --- indra/llcommon/llavatarname.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 4d50f6e76d..5a0306c57e 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -53,7 +53,7 @@ public: // If true, both display name and SLID were generated from // a legacy first and last name, like "James Linden (james.linden)" - bool mIsLegacy; + bool mIsDisplayNameDefault; // Names can change, so need to keep track of when name was // last checked. -- cgit v1.2.3 From 69de1f4eb7cdd063bbdd7b4019a6a9799fc5dc5f Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Fri, 16 Apr 2010 19:06:17 -0700 Subject: Accept expires timestamp as UTC datetime in LLSD --- indra/llcommon/llavatarname.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 5a0306c57e..72e2980b5c 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -58,7 +58,7 @@ public: // Names can change, so need to keep track of when name was // last checked. // Unix time-from-epoch seconds - U32 mExpires; + F64 mExpires; // Can be a viewer UI image name ("Person_Check") or a server-side // image UUID, or empty string. -- cgit v1.2.3 From 022a598694cd37bebff3322054324c7d27afd5ff Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Tue, 20 Apr 2010 17:05:49 -0700 Subject: Viewer caches avatar display names between sessions Reviewed with Simon --- indra/llcommon/llavatarname.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 72e2980b5c..11bd5f30b7 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -36,13 +36,19 @@ #include <string> +class LLSD; + class LL_COMMON_API LLAvatarName { public: LLAvatarName(); - + bool operator<(const LLAvatarName& rhs) const; + LLSD asLLSD() const; + + void fromLLSD(const LLSD& sd); + // "bobsmith123" or "james.linden", US-ASCII only std::string mSLID; -- cgit v1.2.3 From 98f5fc5ff006a82cacde47de0cbb564b6e703597 Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Thu, 22 Apr 2010 14:13:45 -0700 Subject: DEV-47529 Turn off display names if no capability from simulator, and Display name update broadcasts entire new name record to nearby viewers Display name update directly inserts new name into sim cache indra.xml has display_names_enabled setting to control cap Synchronized viewer and server versions of avatar name cache Reviewed with Ambroff --- indra/llcommon/llavatarname.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 11bd5f30b7..b30dca6e6e 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -63,7 +63,7 @@ public: // Names can change, so need to keep track of when name was // last checked. - // Unix time-from-epoch seconds + // Unix time-from-epoch seconds for efficiency F64 mExpires; // Can be a viewer UI image name ("Person_Check") or a server-side -- cgit v1.2.3 From e4f2887983dc6f473c6657b8b653437557c638fa Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Mon, 26 Apr 2010 14:19:58 -0700 Subject: Don't save dummy records (from 503 errors) to disk cache --- indra/llcommon/llavatarname.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index b30dca6e6e..3e26887d7a 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -61,6 +61,11 @@ public: // a legacy first and last name, like "James Linden (james.linden)" bool mIsDisplayNameDefault; + // Under error conditions, we may insert "dummy" records with + // names like "???" into caches as placeholders. These can be + // shown in UI, but are not serialized. + bool mIsDummy; + // Names can change, so need to keep track of when name was // last checked. // Unix time-from-epoch seconds for efficiency -- cgit v1.2.3 From 8fae11ee368e5b1dce858cdd698714384430858b Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Wed, 28 Apr 2010 17:02:50 -0700 Subject: Remove prototype support for badges next to avatar names Easy to reimplement if we decide we want to do it. --- indra/llcommon/llavatarname.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 3e26887d7a..d7d91e1c7a 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -70,10 +70,6 @@ public: // last checked. // Unix time-from-epoch seconds for efficiency F64 mExpires; - - // Can be a viewer UI image name ("Person_Check") or a server-side - // image UUID, or empty string. - std::string mBadge; }; #endif -- cgit v1.2.3 From 6b00537c871fb08f760016698c7e83f178c1cf55 Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Wed, 12 May 2010 16:30:57 -0700 Subject: DEV-50013 WIP Added utility to get name and SLID in single string --- indra/llcommon/llavatarname.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index d7d91e1c7a..87750210c6 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -49,6 +49,10 @@ public: void fromLLSD(const LLSD& sd); + // For normal names, returns "James Linden (james.linden)" + // When display names are disabled returns just "James Linden" + std::string getNameAndSLID() const; + // "bobsmith123" or "james.linden", US-ASCII only std::string mSLID; -- cgit v1.2.3 From f4148502e484d516b42c4a88603eee6889d45697 Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Tue, 18 May 2010 16:00:45 -0700 Subject: Rename mSLID to mUsername to match the name of the field in the UI Product made a late-breaking request to change the name of this field. The wire protocol for People API has not yet changed. --- indra/llcommon/llavatarname.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 87750210c6..39071ec4c7 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -54,7 +54,7 @@ public: std::string getNameAndSLID() const; // "bobsmith123" or "james.linden", US-ASCII only - std::string mSLID; + std::string mUsername; // "Jose' Sanchez" or "James Linden", UTF-8 encoded Unicode // Contains data whether or not user has explicitly set -- cgit v1.2.3 From 31220ceffbacdf0f14929b735b0c9e250e1225ca Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Wed, 19 May 2010 11:23:29 -0700 Subject: DEV-50013 Viewer reads legacy first/last name from People API Useful for voice subsystem and muting subsystem. --- indra/llcommon/llavatarname.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 39071ec4c7..fb5cb277a2 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -53,14 +53,31 @@ public: // When display names are disabled returns just "James Linden" std::string getNameAndSLID() const; + // Returns "James Linden" or "bobsmith123 Resident" for backwards + // compatibility with systems like voice and muting + // *TODO: Eliminate this in favor of username only + std::string getLegacyName() const; + // "bobsmith123" or "james.linden", US-ASCII only std::string mUsername; // "Jose' Sanchez" or "James Linden", UTF-8 encoded Unicode // Contains data whether or not user has explicitly set - // a display name; may duplicate their SLID. + // a display name; may duplicate their username. std::string mDisplayName; + // For "James Linden", "James" + // For "bobsmith123", "bobsmith123" + // Used to communicate with legacy systems like voice and muting which + // rely on old-style names. + // *TODO: Eliminate this in favor of username only + std::string mLegacyFirstName; + + // For "James Linden", "Linden" + // For "bobsmith123", "Resident" + // see above for rationale + std::string mLegacyLastName; + // If true, both display name and SLID were generated from // a legacy first and last name, like "James Linden (james.linden)" bool mIsDisplayNameDefault; -- cgit v1.2.3 From d674d11f895b8f3d578cded931cdc1c430379c95 Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Fri, 21 May 2010 17:11:31 -0700 Subject: Rename LLAvatarName::getNameAndSLID() to getCompleteName() Discussed with Leyla/Richard --- indra/llcommon/llavatarname.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index fb5cb277a2..8b74e006c3 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -51,7 +51,7 @@ public: // For normal names, returns "James Linden (james.linden)" // When display names are disabled returns just "James Linden" - std::string getNameAndSLID() const; + std::string getCompleteName() const; // Returns "James Linden" or "bobsmith123 Resident" for backwards // compatibility with systems like voice and muting -- cgit v1.2.3 From c7a6a2e08f34b2cd21816a905c21e8017646001c Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Thu, 27 May 2010 14:56:29 -0700 Subject: DEV-50013 Friendlier info if you can't change name due to time lockout Reviewed with Leyla --- indra/llcommon/llavatarname.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 8b74e006c3..650a09a125 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -91,6 +91,11 @@ public: // last checked. // Unix time-from-epoch seconds for efficiency F64 mExpires; + + // You can only change your name every N hours, so record + // when the next update is allowed + // Unix time-from-epoch seconds + F64 mNextUpdate; }; #endif -- cgit v1.2.3