From 96e459256410cd18f1506f7e0b2118955ea65b81 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Sat, 14 Oct 2023 01:24:39 +0200 Subject: SL-20163 Delete LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate --- indra/newview/llavatarpropertiesprocessor.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 10cde35f9c..f4e4252e61 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -87,7 +87,6 @@ struct LLAvatarData std::string caption_text; std::string customer_type; U32 flags; - BOOL allow_publish; }; struct LLAvatarPicks @@ -222,8 +221,6 @@ public: void sendClassifiedInfoRequest(const LLUUID& classified_id); - void sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props); - void sendPickInfoUpdate(const LLPickData* new_pick); void sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data); -- cgit v1.2.3 From 70956fb2dbc42501d27a474e3f80003d591ee646 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Sat, 14 Oct 2023 00:11:06 +0200 Subject: SL-20163 Allow residents to hide exact join date on profiles --- indra/newview/llavatarpropertiesprocessor.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index f4e4252e61..c2347b9e35 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -86,6 +86,7 @@ struct LLAvatarData U8 caption_index; std::string caption_text; std::string customer_type; + bool hide_sl_age; U32 flags; }; -- cgit v1.2.3 From 633865320aee0b2e1c615f2d5a772e5ddc3d9ae2 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 17 Oct 2023 12:01:03 +0200 Subject: SL-20163 Rename hide_sl_age to hide_age --- indra/newview/llavatarpropertiesprocessor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index c2347b9e35..0f8b1dd130 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -85,8 +85,8 @@ struct LLAvatarData std::string profile_url; U8 caption_index; std::string caption_text; - std::string customer_type; - bool hide_sl_age; + std::string customer_type; + bool hide_age; U32 flags; }; -- cgit v1.2.3 From b83b4e08482fc2d1aa635aa20a9ffadf21fa17bc Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 19 Oct 2023 20:58:35 +0200 Subject: SL-20163 Rework hide_age in processAvatarPropertiesReply() --- indra/newview/llavatarpropertiesprocessor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 0f8b1dd130..57e492f810 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -86,8 +86,8 @@ struct LLAvatarData U8 caption_index; std::string caption_text; std::string customer_type; - bool hide_age; U32 flags; + bool hide_age; }; struct LLAvatarPicks -- cgit v1.2.3 From 702e4c7dc1a383f83a0324e97b087efef82e9248 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 19 Oct 2023 18:25:23 +0200 Subject: SL-20163 Rework LLAvatarPropertiesProcessor::sendRequest() --- indra/newview/llavatarpropertiesprocessor.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 57e492f810..0dcda5a748 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -50,7 +50,8 @@ class LLMessageSystem; enum EAvatarProcessorType { - APT_PROPERTIES, + APT_PROPERTIES_LEGACY, // APT_PROPERTIES via udp request + APT_PROPERTIES, // APT_PROPERTIES via http request APT_NOTES, APT_GROUPS, APT_PICKS, @@ -210,7 +211,7 @@ public: // Request various types of avatar data. Duplicate requests will be // suppressed while waiting for a response from the network. - void sendAvatarPropertiesRequest(const LLUUID& avatar_id); + void sendAvatarPropertiesRequest(const LLUUID& avatar_id, bool use_cap = false); void sendAvatarPicksRequest(const LLUUID& avatar_id); void sendAvatarNotesRequest(const LLUUID& avatar_id); void sendAvatarGroupsRequest(const LLUUID& avatar_id); @@ -247,7 +248,7 @@ public: static bool hasPaymentInfoOnFile(const LLAvatarData* avatar_data); - static void requestAvatarPropertiesCoro(std::string cap_url, LLUUID agent_id); + static void requestAvatarPropertiesCoro(std::string cap_url, LLUUID agent_id, EAvatarProcessorType type); static void processAvatarPropertiesReply(LLMessageSystem* msg, void**); @@ -267,10 +268,10 @@ public: protected: - void sendRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string &method); + void sendRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string &method); void sendGenericRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string &method); void sendAvatarPropertiesRequestMessage(const LLUUID& avatar_id); - void initAgentProfileCapRequest(const LLUUID& avatar_id, const std::string& cap_url); + void initAgentProfileCapRequest(const LLUUID& avatar_id, const std::string& cap_url, EAvatarProcessorType type); void notifyObservers(const LLUUID& id,void* data, EAvatarProcessorType type); -- cgit v1.2.3 From 2be809d98ddb3f54e91faefbc9593804184273e4 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 23 Oct 2023 16:13:10 +0200 Subject: Fill agent_id fields in LLAvatarData correctly when using capability for avatar properties request --- indra/newview/llavatarpropertiesprocessor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 0dcda5a748..330a5591b5 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -248,7 +248,7 @@ public: static bool hasPaymentInfoOnFile(const LLAvatarData* avatar_data); - static void requestAvatarPropertiesCoro(std::string cap_url, LLUUID agent_id, EAvatarProcessorType type); + static void requestAvatarPropertiesCoro(std::string cap_url, LLUUID avatar_id, EAvatarProcessorType type); static void processAvatarPropertiesReply(LLMessageSystem* msg, void**); -- cgit v1.2.3 From d4087fce7b36625259576d5964c5a8dd8e93d707 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 21 Oct 2023 00:07:40 +0300 Subject: SL-20513 Cleanup LLAvatarPropertiesProcessor #1 --- indra/newview/llavatarpropertiesprocessor.h | 120 ++++++++++++---------------- 1 file changed, 51 insertions(+), 69 deletions(-) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 330a5591b5..2bf8e879bd 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -50,45 +50,68 @@ class LLMessageSystem; enum EAvatarProcessorType { - APT_PROPERTIES_LEGACY, // APT_PROPERTIES via udp request + APT_PROPERTIES_LEGACY, // APT_PROPERTIES via udp request (Truncates data!!!) APT_PROPERTIES, // APT_PROPERTIES via http request - APT_NOTES, - APT_GROUPS, APT_PICKS, APT_PICK_INFO, APT_TEXTURES, - APT_INTERESTS_INFO, APT_CLASSIFIEDS, APT_CLASSIFIED_INFO }; -struct LLInterestsData +// legacy data is supposed to match AvatarPropertiesReply, +// but it is obsolete, fields like about_text will truncate +// data, if you need them, use AgenProfile cap. +// Todo: remove it once once icon ids get moved elsewhere, +// since AgentProfile is too large for bulk icon requests +struct LLAvatarLegacyData { - LLUUID agent_id; - LLUUID avatar_id; //target id - U32 want_to_mask; - std::string want_to_text; - U32 skills_mask; - std::string skills_text; - std::string languages_text; + LLUUID agent_id; + LLUUID avatar_id; //target id + LLUUID image_id; + LLUUID fl_image_id; + LLUUID partner_id; + std::string about_text; + std::string fl_about_text; + LLDate born_on; + std::string profile_url; + U8 caption_index; + std::string caption_text; + std::string customer_type; + U32 flags; }; struct LLAvatarData { - LLUUID agent_id; - LLUUID avatar_id; //target id - LLUUID image_id; - LLUUID fl_image_id; - LLUUID partner_id; - std::string about_text; - std::string fl_about_text; - LLDate born_on; - std::string profile_url; - U8 caption_index; - std::string caption_text; - std::string customer_type; - U32 flags; - bool hide_age; + LLUUID agent_id; + LLUUID avatar_id; //target id + LLUUID image_id; + LLUUID fl_image_id; + LLUUID partner_id; + std::string about_text; + std::string fl_about_text; + LLDate born_on; + std::string profile_url; + U8 caption_index; + std::string caption_text; + std::string customer_type; + U32 flags; + bool hide_age; + std::string notes; + + struct LLGroupData; + typedef std::list group_list_t; + group_list_t group_list; +}; + +struct LLAvatarData::LLGroupData +{ + U64 group_powers; + BOOL accept_notices; + std::string group_title; + LLUUID group_id; + std::string group_name; + LLUUID group_insignia_id; }; struct LLAvatarPicks @@ -122,36 +145,6 @@ struct LLPickData //used only in write (update) requests LLUUID session_id; - -}; - -struct LLAvatarNotes -{ - LLUUID agent_id; - LLUUID target_id; //target id - std::string notes; -}; - -struct LLAvatarGroups -{ - LLUUID agent_id; - LLUUID avatar_id; //target id - BOOL list_in_profile; - - struct LLGroupData; - typedef std::list group_list_t; - - group_list_t group_list; - - struct LLGroupData - { - U64 group_powers; - BOOL accept_notices; - std::string group_title; - LLUUID group_id; - std::string group_name; - LLUUID group_insignia_id; - }; }; struct LLAvatarClassifieds @@ -211,10 +204,9 @@ public: // Request various types of avatar data. Duplicate requests will be // suppressed while waiting for a response from the network. - void sendAvatarPropertiesRequest(const LLUUID& avatar_id, bool use_cap = false); + void sendAvatarPropertiesRequest(const LLUUID& avatar_id); + void sendAvatarLegacyPropertiesRequest(const LLUUID& avatar_id); void sendAvatarPicksRequest(const LLUUID& avatar_id); - void sendAvatarNotesRequest(const LLUUID& avatar_id); - void sendAvatarGroupsRequest(const LLUUID& avatar_id); void sendAvatarTexturesRequest(const LLUUID& avatar_id); void sendAvatarClassifiedsRequest(const LLUUID& avatar_id); @@ -229,14 +221,10 @@ public: void sendFriendRights(const LLUUID& avatar_id, S32 rights); - void sendNotes(const LLUUID& avatar_id, const std::string notes); - void sendPickDelete(const LLUUID& pick_id); void sendClassifiedDelete(const LLUUID& classified_id); - void sendInterestsInfoUpdate(const LLInterestsData* interests_data); - // Returns translated, human readable string for account type, such // as "Resident" or "Linden Employee". Used for profiles, inspectors. static std::string accountType(const LLAvatarData* avatar_data); @@ -252,16 +240,10 @@ public: static void processAvatarPropertiesReply(LLMessageSystem* msg, void**); - static void processAvatarInterestsReply(LLMessageSystem* msg, void**); - static void processAvatarClassifiedsReply(LLMessageSystem* msg, void**); static void processClassifiedInfoReply(LLMessageSystem* msg, void**); - static void processAvatarGroupsReply(LLMessageSystem* msg, void**); - - static void processAvatarNotesReply(LLMessageSystem* msg, void**); - static void processAvatarPicksReply(LLMessageSystem* msg, void**); static void processPickInfoReply(LLMessageSystem* msg, void**); -- cgit v1.2.3 From f54d0329f32081883704cc2694871600f896006b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 24 Oct 2023 00:14:21 +0300 Subject: SL-20513 Cleanup LLAvatarPropertiesProcessor #2 --- indra/newview/llavatarpropertiesprocessor.h | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 2bf8e879bd..1bf07704a9 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -52,7 +52,6 @@ enum EAvatarProcessorType { APT_PROPERTIES_LEGACY, // APT_PROPERTIES via udp request (Truncates data!!!) APT_PROPERTIES, // APT_PROPERTIES via http request - APT_PICKS, APT_PICK_INFO, APT_TEXTURES, APT_CLASSIFIEDS, @@ -102,6 +101,10 @@ struct LLAvatarData struct LLGroupData; typedef std::list group_list_t; group_list_t group_list; + + typedef std::pair pick_data_t; + typedef std::list< pick_data_t> picks_list_t; + picks_list_t picks_list; }; struct LLAvatarData::LLGroupData @@ -114,16 +117,6 @@ struct LLAvatarData::LLGroupData LLUUID group_insignia_id; }; -struct LLAvatarPicks -{ - LLUUID agent_id; - LLUUID target_id; //target id - - typedef std::pair pick_data_t; - typedef std::list< pick_data_t> picks_list_t; - picks_list_t picks_list; -}; - struct LLPickData { LLUUID agent_id; @@ -206,7 +199,6 @@ public: // suppressed while waiting for a response from the network. void sendAvatarPropertiesRequest(const LLUUID& avatar_id); void sendAvatarLegacyPropertiesRequest(const LLUUID& avatar_id); - void sendAvatarPicksRequest(const LLUUID& avatar_id); void sendAvatarTexturesRequest(const LLUUID& avatar_id); void sendAvatarClassifiedsRequest(const LLUUID& avatar_id); @@ -238,14 +230,13 @@ public: static void requestAvatarPropertiesCoro(std::string cap_url, LLUUID avatar_id, EAvatarProcessorType type); - static void processAvatarPropertiesReply(LLMessageSystem* msg, void**); + // Processing of UDP variant of properties, truncates certain fields! + static void processAvatarLegacyPropertiesReply(LLMessageSystem* msg, void**); static void processAvatarClassifiedsReply(LLMessageSystem* msg, void**); static void processClassifiedInfoReply(LLMessageSystem* msg, void**); - static void processAvatarPicksReply(LLMessageSystem* msg, void**); - static void processPickInfoReply(LLMessageSystem* msg, void**); protected: -- cgit v1.2.3 From 85c4ea76b9a3193dd338bca5c571b84bebf6b38c Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 6 Nov 2023 17:13:51 +0100 Subject: SL-20163 Allow residents to hide exact join date on profiles (check server support) --- indra/newview/llavatarpropertiesprocessor.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 1bf07704a9..99ed110487 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -217,6 +217,8 @@ public: void sendClassifiedDelete(const LLUUID& classified_id); + bool isHideAgeSupportedByServer() { return mIsHideAgeSupportedByServer; } + // Returns translated, human readable string for account type, such // as "Resident" or "Linden Employee". Used for profiles, inspectors. static std::string accountType(const LLAvatarData* avatar_data); @@ -274,6 +276,9 @@ protected: // Map avatar_id+request_type -> U32 timestamp in seconds typedef std::map< std::pair, U32> timestamp_map_t; timestamp_map_t mRequestTimestamps; + + // Is returned by isHideAgeSupportedByServer() + bool mIsHideAgeSupportedByServer { false }; }; #endif // LL_LLAVATARPROPERTIESPROCESSOR_H -- cgit v1.2.3 From bc29431ab2f500ba588edaeee34ba2328db199aa Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 24 Apr 2024 21:18:14 +0300 Subject: viewer#1309 Handle deprecated avatar properties messages since server still sends those in some cases --- indra/newview/llavatarpropertiesprocessor.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 99ed110487..ab9d8251c0 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -235,10 +235,18 @@ public: // Processing of UDP variant of properties, truncates certain fields! static void processAvatarLegacyPropertiesReply(LLMessageSystem* msg, void**); + static void processAvatarInterestsReply(LLMessageSystem* msg, void**); + static void processAvatarClassifiedsReply(LLMessageSystem* msg, void**); static void processClassifiedInfoReply(LLMessageSystem* msg, void**); + static void processAvatarGroupsReply(LLMessageSystem* msg, void**); + + static void processAvatarNotesReply(LLMessageSystem* msg, void**); + + static void processAvatarPicksReply(LLMessageSystem* msg, void**); + static void processPickInfoReply(LLMessageSystem* msg, void**); protected: -- cgit v1.2.3 From 1b68f71348ecf3983b76b40d7940da8377f049b7 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Mon, 29 Apr 2024 07:43:28 +0300 Subject: #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed --- indra/newview/llavatarpropertiesprocessor.h | 338 ++++++++++++++-------------- 1 file changed, 169 insertions(+), 169 deletions(-) (limited to 'indra/newview/llavatarpropertiesprocessor.h') diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 10cde35f9c..77bf5fd51e 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -1,25 +1,25 @@ -/** +/** * @file llavatarpropertiesprocessor.h * @brief LLAvatatIconCtrl base class * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. - * + * * 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. - * + * * 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. - * + * * 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$ */ @@ -29,17 +29,17 @@ #include "lluuid.h" #include "llsingleton.h" -#include "v3dmath.h" // LLVector3d +#include "v3dmath.h" // LLVector3d #include #include // For Flags in AvatarPropertiesReply -const U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not -const U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature" -const U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info -const U32 AVATAR_TRANSACTED = 0x1 << 3; // whether avatar has actively used payment info -const U32 AVATAR_ONLINE = 0x1 << 4; // the online status of this avatar, if known. -const U32 AVATAR_AGEVERIFIED = 0x1 << 5; // whether avatar has been age-verified +const U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not +const U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature" +const U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info +const U32 AVATAR_TRANSACTED = 0x1 << 3; // whether avatar has actively used payment info +const U32 AVATAR_ONLINE = 0x1 << 4; // the online status of this avatar, if known. +const U32 AVATAR_AGEVERIFIED = 0x1 << 5; // whether avatar has been age-verified /* *TODO Vadim: This needs some refactoring: @@ -50,15 +50,15 @@ class LLMessageSystem; enum EAvatarProcessorType { - APT_PROPERTIES, - APT_NOTES, - APT_GROUPS, - APT_PICKS, - APT_PICK_INFO, - APT_TEXTURES, + APT_PROPERTIES, + APT_NOTES, + APT_GROUPS, + APT_PICKS, + APT_PICK_INFO, + APT_TEXTURES, APT_INTERESTS_INFO, - APT_CLASSIFIEDS, - APT_CLASSIFIED_INFO + APT_CLASSIFIEDS, + APT_CLASSIFIED_INFO }; struct LLInterestsData @@ -74,234 +74,234 @@ struct LLInterestsData struct LLAvatarData { - LLUUID agent_id; - LLUUID avatar_id; //target id - LLUUID image_id; - LLUUID fl_image_id; - LLUUID partner_id; - std::string about_text; - std::string fl_about_text; - LLDate born_on; - std::string profile_url; - U8 caption_index; - std::string caption_text; - std::string customer_type; - U32 flags; - BOOL allow_publish; + LLUUID agent_id; + LLUUID avatar_id; //target id + LLUUID image_id; + LLUUID fl_image_id; + LLUUID partner_id; + std::string about_text; + std::string fl_about_text; + LLDate born_on; + std::string profile_url; + U8 caption_index; + std::string caption_text; + std::string customer_type; + U32 flags; + BOOL allow_publish; }; struct LLAvatarPicks { - LLUUID agent_id; - LLUUID target_id; //target id + LLUUID agent_id; + LLUUID target_id; //target id - typedef std::pair pick_data_t; - typedef std::list< pick_data_t> picks_list_t; - picks_list_t picks_list; + typedef std::pair pick_data_t; + typedef std::list< pick_data_t> picks_list_t; + picks_list_t picks_list; }; struct LLPickData { - LLUUID agent_id; - LLUUID pick_id; - LLUUID creator_id; - BOOL top_pick; - LLUUID parcel_id; - std::string name; - std::string desc; - LLUUID snapshot_id; - LLVector3d pos_global; - S32 sort_order; - BOOL enabled; - - //used only in read requests - std::string user_name; - std::string original_name; - std::string sim_name; - - //used only in write (update) requests - LLUUID session_id; + LLUUID agent_id; + LLUUID pick_id; + LLUUID creator_id; + BOOL top_pick; + LLUUID parcel_id; + std::string name; + std::string desc; + LLUUID snapshot_id; + LLVector3d pos_global; + S32 sort_order; + BOOL enabled; + + //used only in read requests + std::string user_name; + std::string original_name; + std::string sim_name; + + //used only in write (update) requests + LLUUID session_id; }; struct LLAvatarNotes { - LLUUID agent_id; - LLUUID target_id; //target id - std::string notes; + LLUUID agent_id; + LLUUID target_id; //target id + std::string notes; }; struct LLAvatarGroups { - LLUUID agent_id; - LLUUID avatar_id; //target id - BOOL list_in_profile; - - struct LLGroupData; - typedef std::list group_list_t; - - group_list_t group_list; - - struct LLGroupData - { - U64 group_powers; - BOOL accept_notices; - std::string group_title; - LLUUID group_id; - std::string group_name; - LLUUID group_insignia_id; - }; + LLUUID agent_id; + LLUUID avatar_id; //target id + BOOL list_in_profile; + + struct LLGroupData; + typedef std::list group_list_t; + + group_list_t group_list; + + struct LLGroupData + { + U64 group_powers; + BOOL accept_notices; + std::string group_title; + LLUUID group_id; + std::string group_name; + LLUUID group_insignia_id; + }; }; struct LLAvatarClassifieds { - LLUUID agent_id; - LLUUID target_id; + LLUUID agent_id; + LLUUID target_id; - struct classified_data; - typedef std::list classifieds_list_t; + struct classified_data; + typedef std::list classifieds_list_t; - classifieds_list_t classifieds_list; + classifieds_list_t classifieds_list; - struct classified_data - { - LLUUID classified_id; - std::string name; - }; + struct classified_data + { + LLUUID classified_id; + std::string name; + }; }; struct LLAvatarClassifiedInfo { - LLUUID agent_id; - LLUUID classified_id; - LLUUID creator_id; - U32 creation_date; - U32 expiration_date; - U32 category; - std::string name; - std::string description; - LLUUID parcel_id; - U32 parent_estate; - LLUUID snapshot_id; - std::string sim_name; - LLVector3d pos_global; - std::string parcel_name; - U8 flags; - S32 price_for_listing; + LLUUID agent_id; + LLUUID classified_id; + LLUUID creator_id; + U32 creation_date; + U32 expiration_date; + U32 category; + std::string name; + std::string description; + LLUUID parcel_id; + U32 parent_estate; + LLUUID snapshot_id; + std::string sim_name; + LLVector3d pos_global; + std::string parcel_name; + U8 flags; + S32 price_for_listing; }; class LLAvatarPropertiesObserver { public: - virtual ~LLAvatarPropertiesObserver() {} - virtual void processProperties(void* data, EAvatarProcessorType type) = 0; + virtual ~LLAvatarPropertiesObserver() {} + virtual void processProperties(void* data, EAvatarProcessorType type) = 0; }; class LLAvatarPropertiesProcessor - : public LLSingleton + : public LLSingleton { - LLSINGLETON(LLAvatarPropertiesProcessor); - virtual ~LLAvatarPropertiesProcessor(); + LLSINGLETON(LLAvatarPropertiesProcessor); + virtual ~LLAvatarPropertiesProcessor(); public: - void addObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer); + void addObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer); - void removeObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer); + void removeObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer); - // Request various types of avatar data. Duplicate requests will be - // suppressed while waiting for a response from the network. - void sendAvatarPropertiesRequest(const LLUUID& avatar_id); - void sendAvatarPicksRequest(const LLUUID& avatar_id); - void sendAvatarNotesRequest(const LLUUID& avatar_id); - void sendAvatarGroupsRequest(const LLUUID& avatar_id); - void sendAvatarTexturesRequest(const LLUUID& avatar_id); - void sendAvatarClassifiedsRequest(const LLUUID& avatar_id); + // Request various types of avatar data. Duplicate requests will be + // suppressed while waiting for a response from the network. + void sendAvatarPropertiesRequest(const LLUUID& avatar_id); + void sendAvatarPicksRequest(const LLUUID& avatar_id); + void sendAvatarNotesRequest(const LLUUID& avatar_id); + void sendAvatarGroupsRequest(const LLUUID& avatar_id); + void sendAvatarTexturesRequest(const LLUUID& avatar_id); + void sendAvatarClassifiedsRequest(const LLUUID& avatar_id); - // Duplicate pick info requests are not suppressed. - void sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id); + // Duplicate pick info requests are not suppressed. + void sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id); - void sendClassifiedInfoRequest(const LLUUID& classified_id); + void sendClassifiedInfoRequest(const LLUUID& classified_id); - void sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props); + void sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props); - void sendPickInfoUpdate(const LLPickData* new_pick); + void sendPickInfoUpdate(const LLPickData* new_pick); - void sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data); + void sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data); - void sendFriendRights(const LLUUID& avatar_id, S32 rights); + void sendFriendRights(const LLUUID& avatar_id, S32 rights); - void sendNotes(const LLUUID& avatar_id, const std::string notes); + void sendNotes(const LLUUID& avatar_id, const std::string notes); - void sendPickDelete(const LLUUID& pick_id); + void sendPickDelete(const LLUUID& pick_id); - void sendClassifiedDelete(const LLUUID& classified_id); + void sendClassifiedDelete(const LLUUID& classified_id); void sendInterestsInfoUpdate(const LLInterestsData* interests_data); - // Returns translated, human readable string for account type, such - // as "Resident" or "Linden Employee". Used for profiles, inspectors. - static std::string accountType(const LLAvatarData* avatar_data); + // Returns translated, human readable string for account type, such + // as "Resident" or "Linden Employee". Used for profiles, inspectors. + static std::string accountType(const LLAvatarData* avatar_data); - // Returns translated, human readable string for payment info, such - // as "Payment Info on File" or "Payment Info Used". - // Used for profiles, inspectors. - static std::string paymentInfo(const LLAvatarData* avatar_data); + // Returns translated, human readable string for payment info, such + // as "Payment Info on File" or "Payment Info Used". + // Used for profiles, inspectors. + static std::string paymentInfo(const LLAvatarData* avatar_data); - static bool hasPaymentInfoOnFile(const LLAvatarData* avatar_data); + static bool hasPaymentInfoOnFile(const LLAvatarData* avatar_data); static void requestAvatarPropertiesCoro(std::string cap_url, LLUUID agent_id); - static void processAvatarPropertiesReply(LLMessageSystem* msg, void**); + static void processAvatarPropertiesReply(LLMessageSystem* msg, void**); - static void processAvatarInterestsReply(LLMessageSystem* msg, void**); + static void processAvatarInterestsReply(LLMessageSystem* msg, void**); - static void processAvatarClassifiedsReply(LLMessageSystem* msg, void**); + static void processAvatarClassifiedsReply(LLMessageSystem* msg, void**); - static void processClassifiedInfoReply(LLMessageSystem* msg, void**); + static void processClassifiedInfoReply(LLMessageSystem* msg, void**); - static void processAvatarGroupsReply(LLMessageSystem* msg, void**); + static void processAvatarGroupsReply(LLMessageSystem* msg, void**); - static void processAvatarNotesReply(LLMessageSystem* msg, void**); + static void processAvatarNotesReply(LLMessageSystem* msg, void**); - static void processAvatarPicksReply(LLMessageSystem* msg, void**); + static void processAvatarPicksReply(LLMessageSystem* msg, void**); - static void processPickInfoReply(LLMessageSystem* msg, void**); + static void processPickInfoReply(LLMessageSystem* msg, void**); protected: - void sendRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string &method); + void sendRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string &method); void sendGenericRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string &method); void sendAvatarPropertiesRequestMessage(const LLUUID& avatar_id); void initAgentProfileCapRequest(const LLUUID& avatar_id, const std::string& cap_url); - void notifyObservers(const LLUUID& id,void* data, EAvatarProcessorType type); + void notifyObservers(const LLUUID& id,void* data, EAvatarProcessorType type); - // Is there a pending, not timed out, request for this avatar's data? - // Use this to suppress duplicate requests for data when a request is - // pending. - bool isPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type); + // Is there a pending, not timed out, request for this avatar's data? + // Use this to suppress duplicate requests for data when a request is + // pending. + bool isPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type); - // Call this when a request has been sent - void addPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type); + // Call this when a request has been sent + void addPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type); - // Call this when the reply to the request is received - void removePendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type); + // Call this when the reply to the request is received + void removePendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type); - typedef void* (*processor_method_t)(LLMessageSystem*); - static processor_method_t getProcessor(EAvatarProcessorType type); + typedef void* (*processor_method_t)(LLMessageSystem*); + static processor_method_t getProcessor(EAvatarProcessorType type); protected: - - typedef std::multimap observer_multimap_t; - - observer_multimap_t mObservers; - - // Keep track of pending requests for data by avatar id and type. - // Maintain a timestamp for each request so a request that receives no reply - // does not block future requests forever. - // Map avatar_id+request_type -> U32 timestamp in seconds - typedef std::map< std::pair, U32> timestamp_map_t; - timestamp_map_t mRequestTimestamps; + + typedef std::multimap observer_multimap_t; + + observer_multimap_t mObservers; + + // Keep track of pending requests for data by avatar id and type. + // Maintain a timestamp for each request so a request that receives no reply + // does not block future requests forever. + // Map avatar_id+request_type -> U32 timestamp in seconds + typedef std::map< std::pair, U32> timestamp_map_t; + timestamp_map_t mRequestTimestamps; }; #endif // LL_LLAVATARPROPERTIESPROCESSOR_H -- cgit v1.2.3