From c2373fb5a6b08b2c32e5f93fa67b25f669e8b47f Mon Sep 17 00:00:00 2001 From: James Cook 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/llmessage/llavatarnamecache.h | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 indra/llmessage/llavatarnamecache.h (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h new file mode 100644 index 0000000000..adf12bbbc6 --- /dev/null +++ b/indra/llmessage/llavatarnamecache.h @@ -0,0 +1,58 @@ +/** + * @file llavatarnamecache.h + * @brief Provides lookup of avatar SLIDs ("bobsmith123") and display names + * ("James Cook") from avatar UUIDs. + * + * $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 LLAVATARNAMECACHE_H +#define LLAVATARNAMECACHE_H + +#include "llavatarname.h" // for convenience + +namespace LLAvatarNameCache +{ + void initClass(); + void cleanupClass(); + + void importFile(std::istream& istr); + void exportFile(std::ostream& ostr); + + void idle(); + + // If name is in cache, returns true and fills in provided LLAvatarName + // otherwise returns false + bool get(const LLUUID& agent_id, LLAvatarName *av_name); + + // Fetches name information and calls callback. + // If name information is in cache, callback will be called immediately. + typedef void (*name_cache_callback_t)(const LLUUID& agent_id, const LLAvatarName& av_name); + void get(const LLUUID& agent_id, name_cache_callback_t callback); +} + +#endif -- cgit v1.2.3 From 55bfb4435e1a2ffc34578bf30877eb24a5edaa29 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 17 Feb 2010 16:55:58 -0800 Subject: Look up display names via a web service Also removed unused LLComboBox globals to reduce llappviewer.cpp include file burden. Review pending --- indra/llmessage/llavatarnamecache.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index adf12bbbc6..a0e6abf303 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -43,6 +43,8 @@ namespace LLAvatarNameCache void importFile(std::istream& istr); void exportFile(std::ostream& ostr); + // Periodically makes a batch request for display names not already in + // cache. Call once per frame. void idle(); // If name is in cache, returns true and fills in provided LLAvatarName -- cgit v1.2.3 From ee81adb01b8619302898471fdbba5c93f716d10b Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 18 Feb 2010 18:46:41 -0800 Subject: Preference to set what fields name tags display, and first attempt at "use display names" menu item which doesn't work yet --- indra/llmessage/llavatarnamecache.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index a0e6abf303..9f0472095d 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -55,6 +55,10 @@ namespace LLAvatarNameCache // If name information is in cache, callback will be called immediately. typedef void (*name_cache_callback_t)(const LLUUID& agent_id, const LLAvatarName& av_name); void get(const LLUUID& agent_id, name_cache_callback_t callback); + + // HACK: turn display names on and off + void toggleDisplayNames(); + bool useDisplayNames(); } #endif -- cgit v1.2.3 From 3791745054546dbebb3373371aaf7a0ddad608a3 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 22 Feb 2010 16:41:56 -0800 Subject: Simple button to change your display name Talks to web service so other people can see the change, but for now they need to relog or toggle display names on/off to clear their cache. --- indra/llmessage/llavatarnamecache.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 9f0472095d..369c8f8fff 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -56,6 +56,9 @@ namespace LLAvatarNameCache typedef void (*name_cache_callback_t)(const LLUUID& agent_id, const LLAvatarName& av_name); void get(const LLUUID& agent_id, name_cache_callback_t callback); + // Sends an update to the server + void setDisplayName(const LLUUID& agent_id, const std::string& display_name); + // HACK: turn display names on and off void toggleDisplayNames(); bool useDisplayNames(); -- cgit v1.2.3 From 4fafec91fb9e687861c520da0a520354a98bd522 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 24 Feb 2010 11:03:27 -0800 Subject: Add asynchronous display name lookup with callback --- indra/llmessage/llavatarnamecache.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 369c8f8fff..e2166b568f 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -35,6 +35,8 @@ #include "llavatarname.h" // for convenience +#include + namespace LLAvatarNameCache { void initClass(); @@ -51,10 +53,14 @@ namespace LLAvatarNameCache // otherwise returns false bool get(const LLUUID& agent_id, LLAvatarName *av_name); + typedef boost::signals2::signal< + void (const LLUUID& agent_id, const LLAvatarName& av_name)> + callback_signal_t; + typedef callback_signal_t::slot_type callback_slot_t; + // Fetches name information and calls callback. // If name information is in cache, callback will be called immediately. - typedef void (*name_cache_callback_t)(const LLUUID& agent_id, const LLAvatarName& av_name); - void get(const LLUUID& agent_id, name_cache_callback_t callback); + void get(const LLUUID& agent_id, callback_slot_t slot); // Sends an update to the server void setDisplayName(const LLUUID& agent_id, const std::string& display_name); -- cgit v1.2.3 From f3e0e9a5264a80d146a1d4d77fd9c4f5d3070278 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 24 Feb 2010 14:31:46 -0800 Subject: Hack to refresh name tags when I change my display name. Also fixes a crash when turning on display names. --- indra/llmessage/llavatarnamecache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index e2166b568f..a09f549877 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -68,6 +68,7 @@ namespace LLAvatarNameCache // HACK: turn display names on and off void toggleDisplayNames(); bool useDisplayNames(); + void erase(const LLUUID& agent_id); } #endif -- cgit v1.2.3 From 639b234762133e4d09d6d7b1bac9d25c5a681926 Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 18 Mar 2010 17:19:57 -0700 Subject: Partial support for Set Name returning error msg from service --- indra/llmessage/llavatarnamecache.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index a09f549877..8fc43860da 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -37,6 +37,9 @@ #include +class LLSD; +class LLUUID; + namespace LLAvatarNameCache { void initClass(); @@ -53,6 +56,7 @@ namespace LLAvatarNameCache // otherwise returns false bool get(const LLUUID& agent_id, LLAvatarName *av_name); + // Callback types for get() below typedef boost::signals2::signal< void (const LLUUID& agent_id, const LLAvatarName& av_name)> callback_signal_t; @@ -61,9 +65,17 @@ namespace LLAvatarNameCache // Fetches name information and calls callback. // If name information is in cache, callback will be called immediately. void get(const LLUUID& agent_id, callback_slot_t slot); - - // Sends an update to the server - void setDisplayName(const LLUUID& agent_id, const std::string& display_name); + + // Callback types for setDisplayName() below + typedef boost::signals2::signal< + void (bool success, const std::string& reason, const LLSD& content)> + set_name_signal_t; + typedef set_name_signal_t::slot_type set_name_slot_t; + + // Sends an update to the server to change a display name + // and calls back the application layer when done + void setDisplayName(const LLUUID& agent_id, const std::string& display_name, + const set_name_slot_t& slot); // HACK: turn display names on and off void toggleDisplayNames(); -- cgit v1.2.3 From d2f9e34598621f1dabad15025417efd6b81dddf0 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 23 Mar 2010 11:41:33 -0700 Subject: Part DEV-47695 route display name changes via sim for rebroadcast to nearby avatars for name tag updates and to update cached display name for LSL nonblocking functions --- indra/llmessage/llavatarnamecache.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 8fc43860da..17990ecab9 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -66,6 +66,9 @@ namespace LLAvatarNameCache // If name information is in cache, callback will be called immediately. void get(const LLUUID& agent_id, callback_slot_t slot); + // JAMESDEBUG TODO: remove code to set display name, handle in + // application layer because it's different for client and server + // Callback types for setDisplayName() below typedef boost::signals2::signal< void (bool success, const std::string& reason, const LLSD& content)> -- cgit v1.2.3 From 0b36c4181203e37d6fc3e59817d5b5abd2d7611e Mon Sep 17 00:00:00 2001 From: James Cook 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/llmessage/llavatarnamecache.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 17990ecab9..a4e101899a 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -42,12 +42,14 @@ class LLUUID; namespace LLAvatarNameCache { - void initClass(); + void initClass(const std::string& name_service_url); void cleanupClass(); void importFile(std::istream& istr); void exportFile(std::ostream& ostr); + void setNameServiceURL(const std::string& name_service_url); + // Periodically makes a batch request for display names not already in // cache. Call once per frame. void idle(); @@ -83,7 +85,14 @@ namespace LLAvatarNameCache // HACK: turn display names on and off void toggleDisplayNames(); bool useDisplayNames(); + void erase(const LLUUID& agent_id); + + // Force a re-fetch of the most recent data, but keep the current + // data in cache + void fetch(const LLUUID& agent_id); + + void insert(const LLUUID& agent_id, const LLAvatarName& av_name); } #endif -- cgit v1.2.3 From 4218819951a5caa1499e79d8bd4f1bf08fe3b3cc Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 15 Apr 2010 16:22:15 -0700 Subject: DEV-47529 Viewer looks up display names via a sim cap Squire asked me to route display name lookups via a simulator capability using HTTP GET. This buys us authentication until the data services team can implement a public-facing authenticating web service for People API. --- indra/llmessage/llavatarnamecache.h | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index a4e101899a..111e56433b 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -42,13 +42,14 @@ class LLUUID; namespace LLAvatarNameCache { - void initClass(const std::string& name_service_url); + void initClass(); void cleanupClass(); void importFile(std::istream& istr); void exportFile(std::ostream& ostr); - void setNameServiceURL(const std::string& name_service_url); + // On the viewer, usually a simulator capabilitity + void setNameLookupURL(const std::string& name_lookup_url); // Periodically makes a batch request for display names not already in // cache. Call once per frame. @@ -68,20 +69,6 @@ namespace LLAvatarNameCache // If name information is in cache, callback will be called immediately. void get(const LLUUID& agent_id, callback_slot_t slot); - // JAMESDEBUG TODO: remove code to set display name, handle in - // application layer because it's different for client and server - - // Callback types for setDisplayName() below - typedef boost::signals2::signal< - void (bool success, const std::string& reason, const LLSD& content)> - set_name_signal_t; - typedef set_name_signal_t::slot_type set_name_slot_t; - - // Sends an update to the server to change a display name - // and calls back the application layer when done - void setDisplayName(const LLUUID& agent_id, const std::string& display_name, - const set_name_slot_t& slot); - // HACK: turn display names on and off void toggleDisplayNames(); bool useDisplayNames(); -- cgit v1.2.3 From d373dc8782e7085e313b3637c168c87c2b5a71ed Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 19 Apr 2010 17:09:37 -0700 Subject: Viewer asks login.cgi if the grid supports display names If not, turns off display names. Cleaned up name cache reset code. Alphabetized login auth param requests for easier merges going forward. --- indra/llmessage/llavatarnamecache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 111e56433b..ad5ecc896e 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -69,8 +69,8 @@ namespace LLAvatarNameCache // If name information is in cache, callback will be called immediately. void get(const LLUUID& agent_id, callback_slot_t slot); - // HACK: turn display names on and off - void toggleDisplayNames(); + // Not all grids support display names + void setUseDisplayNames(bool use); bool useDisplayNames(); void erase(const LLUUID& agent_id); -- cgit v1.2.3 From 61d79980d888a7bbac96df9955582f835b169a97 Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 22 Apr 2010 10:24:17 -0700 Subject: Starting to implement running switch and 503 error handling --- indra/llmessage/llavatarnamecache.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index ad5ecc896e..4aabacd1f3 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -42,7 +42,10 @@ class LLUUID; namespace LLAvatarNameCache { - void initClass(); + // On the viewer, name cache starts in a non-running state until we + // know if we have the name lookup capability for the agent's region. + // In that state it buffers requests for later. + void initClass(bool running); void cleanupClass(); void importFile(std::istream& istr); @@ -51,6 +54,10 @@ namespace LLAvatarNameCache // On the viewer, usually a simulator capabilitity void setNameLookupURL(const std::string& name_lookup_url); + // Once we know if the lookup service is available we can start + // requesting names. + void setRunning(bool running); + // Periodically makes a batch request for display names not already in // cache. Call once per frame. void idle(); @@ -69,7 +76,9 @@ namespace LLAvatarNameCache // If name information is in cache, callback will be called immediately. void get(const LLUUID& agent_id, callback_slot_t slot); - // Not all grids support display names + // JAMESDEBUG TODO: collapse this with setNameLookupUrl? + // Not all grids support display names. If display names are disabled, + // fall back to old name lookup system. void setUseDisplayNames(bool use); bool useDisplayNames(); -- cgit v1.2.3 From 98f5fc5ff006a82cacde47de0cbb564b6e703597 Mon Sep 17 00:00:00 2001 From: James Cook 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/llmessage/llavatarnamecache.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 4aabacd1f3..68a6c28b7b 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -42,21 +42,16 @@ class LLUUID; namespace LLAvatarNameCache { - // On the viewer, name cache starts in a non-running state until we - // know if we have the name lookup capability for the agent's region. - // In that state it buffers requests for later. - void initClass(bool running); + void initClass(); void cleanupClass(); void importFile(std::istream& istr); void exportFile(std::ostream& ostr); // On the viewer, usually a simulator capabilitity + // If empty, name cache will fall back to using legacy name + // lookup system void setNameLookupURL(const std::string& name_lookup_url); - - // Once we know if the lookup service is available we can start - // requesting names. - void setRunning(bool running); // Periodically makes a batch request for display names not already in // cache. Call once per frame. -- cgit v1.2.3 From 56f5a6909d8a665531e3f6ede380cad57e313728 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 27 Apr 2010 13:54:40 -0700 Subject: Menu item to disable display names for testing works again Start up cache in not-running state on viewer. Set cache running when idle() is called. Explicitly refresh name tags when toggled. Reviewed with Simon --- indra/llmessage/llavatarnamecache.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 68a6c28b7b..26cecc5ab5 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -42,7 +42,10 @@ class LLUUID; namespace LLAvatarNameCache { - void initClass(); + // Until the cache is set running, immediate lookups will fail and + // async lookups will be queued. This allows us to block requests + // until we know if the first region supports display names. + void initClass(bool running); void cleanupClass(); void importFile(std::istream& istr); @@ -52,6 +55,10 @@ namespace LLAvatarNameCache // If empty, name cache will fall back to using legacy name // lookup system void setNameLookupURL(const std::string& name_lookup_url); + + // Do we have a valid lookup URL, hence are we trying to use the + // new display name lookup system? + bool hasNameLookupURL(); // Periodically makes a batch request for display names not already in // cache. Call once per frame. @@ -71,9 +78,7 @@ namespace LLAvatarNameCache // If name information is in cache, callback will be called immediately. void get(const LLUUID& agent_id, callback_slot_t slot); - // JAMESDEBUG TODO: collapse this with setNameLookupUrl? - // Not all grids support display names. If display names are disabled, - // fall back to old name lookup system. + // Allow display names to be explicitly disabled for testing. void setUseDisplayNames(bool use); bool useDisplayNames(); -- cgit v1.2.3 From c0257c7fff8dacc83e69d39afcf522b09bdf28e9 Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 6 May 2010 16:29:51 -0700 Subject: DEV-49633 fixed, use Cache-Control max-age for display name expiration We have no C++ libraries for parsing RFC 1123 dates, so parsing "Expires" headers is risky. max-age delta-seconds is easier to parse and equivalent for this use. Also added unit tests for max-age parsing. Pair-programmed with Huseby. --- indra/llmessage/llavatarnamecache.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 26cecc5ab5..0a8b987b05 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -89,6 +89,15 @@ namespace LLAvatarNameCache void fetch(const LLUUID& agent_id); void insert(const LLUUID& agent_id, const LLAvatarName& av_name); + + // Compute name expiration time from HTTP Cache-Control header, + // or return default value, in seconds from epoch. + F64 nameExpirationFromHeaders(LLSD headers); } +// Parse a cache-control header to get the max-age delta-seconds. +// Returns true if header has max-age param and it parses correctly. +// Exported here to ease unit testing. +bool max_age_from_cache_control(const std::string& cache_control, S32 *max_age); + #endif -- cgit v1.2.3 From e45b3c6884bc7d9bc457b9633932c8aad5a28430 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Sat, 4 Sep 2010 19:35:27 +0100 Subject: Correct license on newly exported files to LGPL. --- indra/llmessage/llavatarnamecache.h | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 0a8b987b05..6d199fd09a 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -3,33 +3,28 @@ * @brief Provides lookup of avatar SLIDs ("bobsmith123") and display names * ("James Cook") from avatar UUIDs. * - * $LicenseInfo:firstyear=2010&license=viewergpl$ - * - * Copyright (c) 2010, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ * 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 + * Copyright (C) 2010, Linden Research, Inc. * - * 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 + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * 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. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ + #ifndef LLAVATARNAMECACHE_H #define LLAVATARNAMECACHE_H -- cgit v1.2.3 From a923da7fc78b44cd5368d26652b0204322f064a4 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 13 Sep 2010 14:59:31 -0700 Subject: DEV-52931 Toggling "View Display Names" doesn't take effect right away in the Friends list --- indra/llmessage/llavatarnamecache.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llmessage/llavatarnamecache.h') diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 6d199fd09a..8f21ace96a 100644 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -37,6 +37,9 @@ class LLUUID; namespace LLAvatarNameCache { + + typedef boost::signals2::signal use_display_name_signal_t; + // Until the cache is set running, immediate lookups will fail and // async lookups will be queued. This allows us to block requests // until we know if the first region supports display names. @@ -88,6 +91,8 @@ namespace LLAvatarNameCache // Compute name expiration time from HTTP Cache-Control header, // or return default value, in seconds from epoch. F64 nameExpirationFromHeaders(LLSD headers); + + void addUseDisplayNamesCallback(const use_display_name_signal_t::slot_type& cb); } // Parse a cache-control header to get the max-age delta-seconds. -- cgit v1.2.3