From bb322a1cccd3fab28951ad4e11b5edcfc4e48140 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 7 Dec 2012 00:10:50 -0800 Subject: CHUI-580 : Fixed : Clean up the use of display name. Allow the use of the legacy protocol in settings.xml --- indra/llcommon/llavatarname.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/llcommon/llavatarname.h') diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index cf9eb27b03..2f8c534974 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -39,20 +39,25 @@ public: bool operator<(const LLAvatarName& rhs) const; + // Conversion to and from LLSD (cache file or server response) LLSD asLLSD() const; - void fromLLSD(const LLSD& sd); // Used only in legacy mode when the display name capability is not provided server side - void fromString(const std::string& full_name, F64 expires = 0.0f); + // or to otherwise create a temporary valid item. + void fromString(const std::string& full_name); + // Set the name object to become invalid in "expires" seconds from now + void setExpires(F64 expires); + + // Set and get the display name flag set by the user in preferences. static void setUseDisplayNames(bool use); static bool useDisplayNames(); - // Name is valid if not temporary and not yet expired + // A name object is valid if not temporary and not yet expired (default is expiration not checked) bool isValidName(F64 max_unrefreshed = 0.0f) const { return !mIsTemporaryName && (mExpires >= max_unrefreshed); } - // + // Return true if the name is made up from legacy or temporary data bool isDisplayNameDefault() const { return mIsDisplayNameDefault; } // For normal names, returns "James Linden (james.linden)" -- cgit v1.2.3