diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llavatariconctrl.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llavatarpropertiesprocessor.cpp | 176 | ||||
-rw-r--r-- | indra/newview/llavatarpropertiesprocessor.h | 120 | ||||
-rw-r--r-- | indra/newview/llfloaterbuycurrency.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llinspectavatar.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 78 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.h | 7 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 9 |
9 files changed, 110 insertions, 292 deletions
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 6145a88743..43d83da5ab 100644 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -245,7 +245,7 @@ void LLAvatarIconCtrl::setValue(const LLSD& value) // messages. People API already hits the user table. LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI); app->addObserver(mAvatarId, this); - app->sendAvatarPropertiesRequest(mAvatarId); + app->sendAvatarLegacyPropertiesRequest(mAvatarId); } } } @@ -296,7 +296,7 @@ void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type) { if (APT_PROPERTIES_LEGACY == type) { - LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data); + LLAvatarLegacyData* avatar_data = static_cast<LLAvatarLegacyData*>(data); if (avatar_data) { if (avatar_data->avatar_id != mAvatarId) diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index 49a4a5b65c..472cf8b8d5 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -115,7 +115,7 @@ void LLAvatarPropertiesProcessor::sendRequest(const LLUUID& avatar_id, EAvatarPr } // Try to send HTTP request if cap_url is available - if (type == APT_PROPERTIES || type == APT_PICKS || type == APT_GROUPS || type == APT_NOTES) + if (type == APT_PROPERTIES || type == APT_PICKS) { if (std::string cap_url(gAgent.getRegionCapability("AgentProfile")); !cap_url.empty()) { @@ -172,24 +172,19 @@ void LLAvatarPropertiesProcessor::initAgentProfileCapRequest(const LLUUID& avata [cap_url, avatar_id, type]() { requestAvatarPropertiesCoro(cap_url, avatar_id, type); }); } -void LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest(const LLUUID& avatar_id, bool use_cap) +void LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest(const LLUUID& avatar_id) { - sendRequest(avatar_id, use_cap ? APT_PROPERTIES : APT_PROPERTIES_LEGACY, "AvatarPropertiesRequest"); + sendRequest(avatar_id, APT_PROPERTIES, "AvatarPropertiesRequest"); } -void LLAvatarPropertiesProcessor::sendAvatarPicksRequest(const LLUUID& avatar_id) -{ - sendGenericRequest(avatar_id, APT_PICKS, "avatarpicksrequest"); -} - -void LLAvatarPropertiesProcessor::sendAvatarNotesRequest(const LLUUID& avatar_id) +void LLAvatarPropertiesProcessor::sendAvatarLegacyPropertiesRequest(const LLUUID& avatar_id) { - sendGenericRequest(avatar_id, APT_NOTES, "avatarnotesrequest"); + sendRequest(avatar_id, APT_PROPERTIES_LEGACY, "AvatarPropertiesRequest"); } -void LLAvatarPropertiesProcessor::sendAvatarGroupsRequest(const LLUUID& avatar_id) +void LLAvatarPropertiesProcessor::sendAvatarPicksRequest(const LLUUID& avatar_id) { - sendGenericRequest(avatar_id, APT_GROUPS, "avatargroupsrequest"); + sendGenericRequest(avatar_id, APT_PICKS, "avatarpicksrequest"); } void LLAvatarPropertiesProcessor::sendAvatarTexturesRequest(const LLUUID& avatar_id) @@ -324,6 +319,7 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur avatar_data.hide_age = !result.has("hide_age") || result["hide_age"].asBoolean(); avatar_data.profile_url = getProfileURL(avatar_id.asString()); avatar_data.customer_type = result["customer_type"].asString(); + avatar_data.notes = result["notes"].asString(); avatar_data.flags = 0; if (result["online"].asBoolean()) @@ -353,6 +349,20 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur avatar_data.caption_text = result["caption"].asString(); } + LLSD groups_array = result["groups"]; + for (LLSD::array_const_iterator it = groups_array.beginArray(); it != groups_array.endArray(); ++it) + { + const LLSD& group_info = *it; + LLAvatarData::LLGroupData group_data; + group_data.group_powers = 0; // Not in use? + group_data.group_title = group_info["name"].asString(); // Missing data, not in use? + group_data.group_id = group_info["id"].asUUID(); + group_data.group_name = group_info["name"].asString(); + group_data.group_insignia_id = group_info["image_id"].asUUID(); + + avatar_data.group_list.push_back(group_data); + } + getInstance()->notifyObservers(avatar_id, &avatar_data, type); } else if (type == APT_PICKS) @@ -371,39 +381,6 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur getInstance()->notifyObservers(avatar_id, &avatar_picks, type); } - else if (type == APT_GROUPS) - { - LLAvatarGroups avatar_groups; - - avatar_groups.agent_id = gAgentID; // Not in use? - avatar_groups.avatar_id = avatar_id; // target_id - - LLSD groups_array = result["groups"]; - for (LLSD::array_const_iterator it = groups_array.beginArray(); it != groups_array.endArray(); ++it) - { - const LLSD& group_info = *it; - LLAvatarGroups::LLGroupData group_data; - group_data.group_powers = 0; // Not in use? - group_data.group_title = group_info["name"].asString(); // Missing data, not in use? - group_data.group_id = group_info["id"].asUUID(); - group_data.group_name = group_info["name"].asString(); - group_data.group_insignia_id = group_info["image_id"].asUUID(); - - avatar_groups.group_list.push_back(group_data); - } - - getInstance()->notifyObservers(avatar_id, &avatar_groups, type); - } - else if (type == APT_NOTES) - { - LLAvatarNotes avatar_notes; - - avatar_notes.agent_id = gAgentID; - avatar_notes.target_id = avatar_id; - avatar_notes.notes = result["notes"].asString(); - - getInstance()->notifyObservers(avatar_id, &avatar_notes, type); - } } void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* msg, void**) @@ -443,33 +420,6 @@ void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* self->notifyObservers(avatar_data.avatar_id, &avatar_data, APT_PROPERTIES_LEGACY); } -void LLAvatarPropertiesProcessor::processAvatarInterestsReply(LLMessageSystem* msg, void**) -{ -/* - AvatarInterestsReply is automatically sent by the server in response to the - AvatarPropertiesRequest sent when the panel is opened (in addition to the AvatarPropertiesReply message). - If the interests panel is no longer part of the design (?) we should just register the message - to a handler function that does nothing. - That will suppress the warnings and be compatible with old server versions. - WARNING: LLTemplateMessageReader::decodeData: Message from 216.82.37.237:13000 with no handler function received: AvatarInterestsReply -*/ - - LLInterestsData interests_data; - - msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AgentID, interests_data.agent_id ); - msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AvatarID, interests_data.avatar_id ); - msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_WantToMask, interests_data.want_to_mask ); - msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_WantToText, interests_data.want_to_text ); - msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_SkillsMask, interests_data.skills_mask ); - msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_SkillsText, interests_data.skills_text ); - msg->getString( _PREHASH_PropertiesData, _PREHASH_LanguagesText, interests_data.languages_text ); - - LLAvatarPropertiesProcessor* self = getInstance(); - // Request processed, no longer pending - self->removePendingRequest(interests_data.avatar_id, APT_INTERESTS_INFO); - self->notifyObservers(interests_data.avatar_id, &interests_data, APT_INTERESTS_INFO); -} - void LLAvatarPropertiesProcessor::processAvatarClassifiedsReply(LLMessageSystem* msg, void**) { LLAvatarClassifieds classifieds; @@ -523,21 +473,6 @@ void LLAvatarPropertiesProcessor::processClassifiedInfoReply(LLMessageSystem* ms self->notifyObservers(c_info.creator_id, &c_info, APT_CLASSIFIED_INFO); } - -void LLAvatarPropertiesProcessor::processAvatarNotesReply(LLMessageSystem* msg, void**) -{ - LLAvatarNotes avatar_notes; - - msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, avatar_notes.agent_id); - msg->getUUID(_PREHASH_Data, _PREHASH_TargetID, avatar_notes.target_id); - msg->getString(_PREHASH_Data, _PREHASH_Notes, avatar_notes.notes); - - LLAvatarPropertiesProcessor* self = getInstance(); - // Request processed, no longer pending - self->removePendingRequest(avatar_notes.target_id, APT_NOTES); - self->notifyObservers(avatar_notes.target_id,&avatar_notes,APT_NOTES); -} - void LLAvatarPropertiesProcessor::processAvatarPicksReply(LLMessageSystem* msg, void**) { LLAvatarPicks avatar_picks; @@ -591,31 +526,6 @@ void LLAvatarPropertiesProcessor::processPickInfoReply(LLMessageSystem* msg, voi self->notifyObservers(pick_data.creator_id, &pick_data, APT_PICK_INFO); } -void LLAvatarPropertiesProcessor::processAvatarGroupsReply(LLMessageSystem* msg, void**) -{ - LLAvatarGroups avatar_groups; - msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, avatar_groups.agent_id ); - msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AvatarID, avatar_groups.avatar_id ); - - S32 group_count = msg->getNumberOfBlocksFast(_PREHASH_GroupData); - for(S32 i = 0; i < group_count; ++i) - { - LLAvatarGroups::LLGroupData group_data; - - msg->getU64( _PREHASH_GroupData, _PREHASH_GroupPowers, group_data.group_powers, i ); - msg->getStringFast(_PREHASH_GroupData, _PREHASH_GroupTitle, group_data.group_title, i ); - msg->getUUIDFast( _PREHASH_GroupData, _PREHASH_GroupID, group_data.group_id, i); - msg->getStringFast(_PREHASH_GroupData, _PREHASH_GroupName, group_data.group_name, i ); - msg->getUUIDFast( _PREHASH_GroupData, _PREHASH_GroupInsigniaID, group_data.group_insignia_id, i ); - - avatar_groups.group_list.emplace_back(group_data); - } - - LLAvatarPropertiesProcessor* self = getInstance(); - self->removePendingRequest(avatar_groups.avatar_id, APT_GROUPS); - self->notifyObservers(avatar_groups.avatar_id,&avatar_groups,APT_GROUPS); -} - void LLAvatarPropertiesProcessor::notifyObservers(const LLUUID& id, void* data, EAvatarProcessorType type) { // Copy the map (because observers may delete themselves when updated?) @@ -652,27 +562,6 @@ void LLAvatarPropertiesProcessor::sendFriendRights(const LLUUID& avatar_id, S32 } } -void LLAvatarPropertiesProcessor::sendNotes(const LLUUID& avatar_id, const std::string notes) -{ - if(!avatar_id.isNull()) - { - LLMessageSystem* msg = gMessageSystem; - - // setup message header - msg->newMessageFast(_PREHASH_AvatarNotesUpdate); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUID(_PREHASH_AgentID, gAgentID); - msg->addUUID(_PREHASH_SessionID, gAgentSessionID); - - msg->nextBlockFast(_PREHASH_Data); - msg->addUUID(_PREHASH_TargetID, avatar_id); - msg->addString(_PREHASH_Notes, notes); - - gAgent.sendReliableMessage(); - } -} - - void LLAvatarPropertiesProcessor::sendPickDelete( const LLUUID& pick_id ) { LLMessageSystem* msg = gMessageSystem; @@ -704,27 +593,6 @@ void LLAvatarPropertiesProcessor::sendClassifiedDelete(const LLUUID& classified_ gAgent.sendReliableMessage(); } -void LLAvatarPropertiesProcessor::sendInterestsInfoUpdate(const LLInterestsData* interests_data) -{ - if(!interests_data) - return; - - LLMessageSystem* msg = gMessageSystem; - - msg->newMessage(_PREHASH_AvatarInterestsUpdate); - msg->nextBlockFast( _PREHASH_AgentData); - msg->addUUIDFast( _PREHASH_AgentID, gAgentID ); - msg->addUUIDFast( _PREHASH_SessionID, gAgentSessionID ); - msg->nextBlockFast( _PREHASH_PropertiesData); - msg->addU32Fast( _PREHASH_WantToMask, interests_data->want_to_mask); - msg->addStringFast( _PREHASH_WantToText, interests_data->want_to_text); - msg->addU32Fast( _PREHASH_SkillsMask, interests_data->skills_mask); - msg->addStringFast( _PREHASH_SkillsText, interests_data->skills_text); - msg->addString( _PREHASH_LanguagesText, interests_data->languages_text); - - gAgent.sendReliableMessage(); -} - void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick) { if (!new_pick) 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<LLGroupData> 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<LLGroupData> 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**); diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index b0e63d5844..0cfac166c7 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -354,7 +354,7 @@ LLFetchAvatarPaymentInfo::~LLFetchAvatarPaymentInfo() void LLFetchAvatarPaymentInfo::processProperties(void* data, EAvatarProcessorType type) { - if (data && type == APT_PROPERTIES_LEGACY) + if (data && type == APT_PROPERTIES) { LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data); LLFloaterBuyCurrency::handleBuyCurrency(LLAvatarPropertiesProcessor::hasPaymentInfoOnFile(avatar_data), mHasTarget, mName, mPrice); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 1f5eb5fdff..ba61668d26 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -332,7 +332,7 @@ void LLFloaterPreference::processProperties( void* pData, EAvatarProcessorType t { if ( APT_PROPERTIES_LEGACY == type ) { - const LLAvatarData* pAvatarData = static_cast<const LLAvatarData*>( pData ); + const LLAvatarLegacyData* pAvatarData = static_cast<const LLAvatarLegacyData*>( pData ); if (pAvatarData && (gAgent.getID() == pAvatarData->avatar_id) && (pAvatarData->avatar_id != LLUUID::null)) { mAllowPublish = (bool)(pAvatarData->flags & AVATAR_ALLOW_PUBLISH); @@ -662,7 +662,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) (gAgent.isMature() || gAgent.isGodlike()); LLComboBox* maturity_combo = getChild<LLComboBox>("maturity_desired_combobox"); - LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest( gAgent.getID() ); + LLAvatarPropertiesProcessor::getInstance()->sendAvatarLegacyPropertiesRequest( gAgent.getID() ); if (can_choose_maturity) { // if they're not adult or a god, they shouldn't see the adult selection, so delete it diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 4d003989fc..ca18dc343d 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -124,7 +124,7 @@ public: processor->addObserver(mAvatarID, this); // send a request (duplicates will be suppressed inside the avatar // properties processor) - processor->sendAvatarPropertiesRequest(mAvatarID, true); + processor->sendAvatarPropertiesRequest(mAvatarID); } ~LLFetchAvatarData() diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index a7a1f05c8a..ba5f6e2e09 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -159,6 +159,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id) avatar_data->born_on = result["member_since"].asDate(); avatar_data->profile_url = getProfileURL(agent_id.asString()); avatar_data->customer_type = result["customer_type"].asString(); + avatar_data->notes = result["notes"].asString(); avatar_data->flags = 0; @@ -195,6 +196,21 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id) result["hide_age"].asBoolean() : // Server option value provided by resident !panel_profile->getSelfProfile(); // Fallback temporary value (to be removed) + // Groups + LLSD groups_array = result["groups"]; + for (LLSD::array_const_iterator it = groups_array.beginArray(); it != groups_array.endArray(); ++it) + { + const LLSD& group_info = *it; + LLAvatarData::LLGroupData group_data; + group_data.group_powers = 0; // Not in use? + group_data.group_title = group_info["name"].asString(); // Missing data, not in use? + group_data.group_id = group_info["id"].asUUID(); + group_data.group_name = group_info["name"].asString(); + group_data.group_insignia_id = group_info["image_id"].asUUID(); + + avatar_data->group_list.push_back(group_data); + } + panel = floater_profile->findChild<LLPanel>(PANEL_SECONDLIFE, TRUE); LLPanelProfileSecondLife *panel_sl = dynamic_cast<LLPanelProfileSecondLife*>(panel); if (panel_sl) @@ -216,6 +232,13 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id) panel_first->processProperties(avatar_data); } + panel = floater_profile->findChild<LLPanel>(PANEL_NOTES, TRUE); + LLPanelProfileNotes* panel_notes = dynamic_cast<LLPanelProfileNotes*>(panel); + if (panel_notes) + { + panel_notes->processProperties(avatar_data); + } + // Picks LLSD picks_array = result["picks"]; LLAvatarPicks avatar_picks; @@ -236,44 +259,6 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id) LLAgentPicksInfo::getInstance()->onServerRespond(&avatar_picks); panel_picks->processProperties(&avatar_picks); } - - // Groups - LLSD groups_array = result["groups"]; - LLAvatarGroups avatar_groups; - avatar_groups.agent_id = agent_id; // Not in use? - avatar_groups.avatar_id = agent_id; // target_id - - for (LLSD::array_const_iterator it = groups_array.beginArray(); it != groups_array.endArray(); ++it) - { - const LLSD& group_info = *it; - LLAvatarGroups::LLGroupData group_data; - group_data.group_powers = 0; // Not in use? - group_data.group_title = group_info["name"].asString(); // Missing data, not in use? - group_data.group_id = group_info["id"].asUUID(); - group_data.group_name = group_info["name"].asString(); - group_data.group_insignia_id = group_info["image_id"].asUUID(); - - avatar_groups.group_list.push_back(group_data); - } - - if (panel_sl) - { - panel_sl->processGroupProperties(&avatar_groups); - } - - // Notes - LLAvatarNotes avatar_notes; - - avatar_notes.agent_id = agent_id; - avatar_notes.target_id = agent_id; - avatar_notes.notes = result["notes"].asString(); - - panel = floater_profile->findChild<LLPanel>(PANEL_NOTES, TRUE); - LLPanelProfileNotes *panel_notes = dynamic_cast<LLPanelProfileNotes*>(panel); - if (panel_notes) - { - panel_notes->processProperties(&avatar_notes); - } } LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::string path_to_image, LLHandle<LLPanel> *handle) @@ -1052,21 +1037,18 @@ void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avat fillAccountStatus(avatar_data); - setLoaded(); -} - -void LLPanelProfileSecondLife::processGroupProperties(const LLAvatarGroups* avatar_groups) -{ - LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin(); - const LLAvatarGroups::group_list_t::const_iterator it_end = avatar_groups->group_list.end(); + LLAvatarData::group_list_t::const_iterator it = avatar_data->group_list.begin(); + const LLAvatarData::group_list_t::const_iterator it_end = avatar_data->group_list.end(); for (; it_end != it; ++it) { - LLAvatarGroups::LLGroupData group_data = *it; + LLAvatarData::LLGroupData group_data = *it; mGroups[group_data.group_name] = group_data.group_id; } mGroupList->setGroups(mGroups); + + setLoaded(); } void LLPanelProfileSecondLife::openGroupProfile() @@ -2483,9 +2465,9 @@ void LLPanelProfileNotes::onDiscardNotesChanges() setNotesText(mCurrentNotes); } -void LLPanelProfileNotes::processProperties(LLAvatarNotes* avatar_notes) +void LLPanelProfileNotes::processProperties(const LLAvatarData* avatar_data) { - setNotesText(avatar_notes->notes); + setNotesText(avatar_data->notes); mNotesEditor->setEnabled(TRUE); setLoaded(); } diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index f4b618eb27..178c413659 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -116,11 +116,6 @@ protected: void processProfileProperties(const LLAvatarData* avatar_data); /** - * Processes group related data received from server. - */ - void processGroupProperties(const LLAvatarGroups* avatar_groups); - - /** * Fills common for Avatar profile and My Profile fields. */ void fillCommonData(const LLAvatarData* avatar_data); @@ -335,7 +330,7 @@ public: BOOL postBuild() override; - void processProperties(LLAvatarNotes* avatar_notes); + void processProperties(const LLAvatarData* avatar_data); void resetData() override; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 228483d42b..cccd16a77e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2657,15 +2657,6 @@ void register_viewer_callbacks(LLMessageSystem* msg) msg->setHandlerFunc("AvatarPropertiesReply", &LLAvatarPropertiesProcessor::processAvatarPropertiesReply); - msg->setHandlerFunc("AvatarInterestsReply", - &LLAvatarPropertiesProcessor::processAvatarInterestsReply); - msg->setHandlerFunc("AvatarGroupsReply", - &LLAvatarPropertiesProcessor::processAvatarGroupsReply); - // ratings deprecated - //msg->setHandlerFuncFast(_PREHASH_AvatarStatisticsReply, - // LLPanelAvatar::processAvatarStatisticsReply); - msg->setHandlerFunc("AvatarNotesReply", - &LLAvatarPropertiesProcessor::processAvatarNotesReply); msg->setHandlerFunc("AvatarPicksReply", &LLAvatarPropertiesProcessor::processAvatarPicksReply); msg->setHandlerFunc("AvatarClassifiedReply", |