diff options
Diffstat (limited to 'indra/llmessage/llcachename.h')
-rw-r--r-- | indra/llmessage/llcachename.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h index 111cc8b650..76865928d3 100644 --- a/indra/llmessage/llcachename.h +++ b/indra/llmessage/llcachename.h @@ -42,13 +42,12 @@ class LLUUID; typedef boost::signals2::signal<void (const LLUUID& id, - const std::string& first_name, - const std::string& last_name, - BOOL is_group)> LLCacheNameSignal; + const std::string& name, + bool is_group)> LLCacheNameSignal; typedef LLCacheNameSignal::slot_type LLCacheNameCallback; // Old callback with user data for compatability -typedef void (*old_callback_t)(const LLUUID&, const std::string&, const std::string&, BOOL, void*); +typedef void (*old_callback_t)(const LLUUID&, const std::string&, bool, void*); // Here's the theory: // If you request a name that isn't in the cache, it returns "waiting" @@ -78,17 +77,24 @@ public: bool importFile(std::istream& istr); void exportFile(std::ostream& ostr); - // If available, copies the first and last name into the strings provided. - // first must be at least DB_FIRST_NAME_BUF_SIZE characters. - // last must be at least DB_LAST_NAME_BUF_SIZE characters. + // If available, copies name ("bobsmith123" or "James Linden") into string // If not available, copies the string "waiting". // Returns TRUE iff available. - BOOL getName(const LLUUID& id, std::string& first, std::string& last); - BOOL getFullName(const LLUUID& id, std::string& fullname); + BOOL getFullName(const LLUUID& id, std::string& full_name); + + // IDEVO temporary code + // If available, copies display name (UTF-8) into string + // If not available, copies empty string + // Returns TRUE iff available + bool getDisplayName(const LLUUID& id, std::string& display_name); // Reverse lookup of UUID from name BOOL getUUID(const std::string& first, const std::string& last, LLUUID& id); BOOL getUUID(const std::string& fullname, LLUUID& id); + + // IDEVO Temporary code + // Clean up new-style "bobsmith123 Resident" names to "bobsmith123" for display + static std::string buildFullName(const std::string& first, const std::string& last); // If available, this method copies the group name into the string // provided. The caller must allocate at least @@ -100,10 +106,10 @@ public: // If the data is currently available, may call the callback immediatly // otherwise, will request the data, and will call the callback when // available. There is no garuntee the callback will ever be called. - boost::signals2::connection get(const LLUUID& id, BOOL is_group, const LLCacheNameCallback& callback); + boost::signals2::connection get(const LLUUID& id, bool is_group, const LLCacheNameCallback& callback); // LEGACY - boost::signals2::connection get(const LLUUID& id, BOOL is_group, old_callback_t callback, void* user_data); + boost::signals2::connection get(const LLUUID& id, bool is_group, old_callback_t callback, void* user_data); // This method needs to be called from time to time to send out // requests. void processPending(); |