diff options
author | Nyx Linden <nyx@lindenlab.com> | 2013-06-18 16:15:03 -0400 |
---|---|---|
committer | Nyx Linden <nyx@lindenlab.com> | 2013-06-18 16:15:03 -0400 |
commit | 69b062b90889fe581de0d10d60b979cb7883b4a0 (patch) | |
tree | 6286fc967bc0f551a9e67b8377bdfbc743f090b2 /indra/newview/llappearancemgr.h | |
parent | c67db8e75511de879c69de0faf06a88ac3cc731d (diff) | |
parent | 425ff28e4bc38ba3f7bfeade4a72dce4eba63b54 (diff) |
merge with viewer-release
Diffstat (limited to 'indra/newview/llappearancemgr.h')
-rwxr-xr-x | indra/newview/llappearancemgr.h | 62 |
1 files changed, 47 insertions, 15 deletions
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 46252afbde..9eb26767c4 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -49,7 +49,9 @@ class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr> public: typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t; - void updateAppearanceFromCOF(bool update_base_outfit_ordering = false); + void updateAppearanceFromCOF(bool update_base_outfit_ordering = false, + bool enforce_item_restrictions = true, + bool enforce_ordering = true); bool needToSaveCOF(); void updateCOF(const LLUUID& category, bool append = false); void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append); @@ -65,8 +67,12 @@ public: LLAssetType::EType type, S32 max_items, LLInventoryModel::item_array_t& items_to_kill); - void enforceItemRestrictions(); + void findAllExcessOrDuplicateItems(const LLUUID& cat_id, + LLInventoryModel::item_array_t& items_to_kill); + void enforceCOFItemRestrictions(LLPointer<LLInventoryCallback> cb); + S32 getActiveCopyOperations() const; + // Copy all items and the src category itself. void shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id, LLPointer<LLInventoryCallback> cb); @@ -105,16 +111,19 @@ public: const LLUUID getBaseOutfitUUID(); // Wear/attach an item (from a user's inventory) on the agent - bool wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true, bool replace = false, LLPointer<LLInventoryCallback> cb = NULL); + bool wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update, bool replace = false, + LLPointer<LLInventoryCallback> cb = NULL); // Update the displayed outfit name in UI. void updatePanelOutfitName(const std::string& name); - void purgeBaseOutfitLink(const LLUUID& category); + void purgeBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> cb = NULL); void createBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> link_waiter); void updateAgentWearables(LLWearableHoldingPattern* holder, bool append); + S32 countActiveHoldingPatterns(); + // For debugging - could be moved elsewhere. void dumpCat(const LLUUID& cat_id, const std::string& msg); void dumpItemArray(const LLInventoryModel::item_array_t& items, const std::string& msg); @@ -129,16 +138,20 @@ public: LLInventoryModel::item_array_t& items, LLPointer<LLInventoryCallback> cb); + // And bulk removal. + void removeAll(LLInventoryModel::item_array_t& items, + LLPointer<LLInventoryCallback> cb); + // Add COF link to individual item. - void addCOFItemLink(const LLUUID& item_id, bool do_update = true, LLPointer<LLInventoryCallback> cb = NULL, const std::string description = ""); - void addCOFItemLink(const LLInventoryItem *item, bool do_update = true, LLPointer<LLInventoryCallback> cb = NULL, const std::string description = ""); + void addCOFItemLink(const LLUUID& item_id, LLPointer<LLInventoryCallback> cb = NULL, const std::string description = ""); + void addCOFItemLink(const LLInventoryItem *item, LLPointer<LLInventoryCallback> cb = NULL, const std::string description = ""); // Find COF entries referencing the given item. LLInventoryModel::item_array_t findCOFItemLinks(const LLUUID& item_id); // Remove COF entries - void removeCOFItemLinks(const LLUUID& item_id); - void removeCOFLinksOfType(LLWearableType::EType type); + void removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInventoryCallback> cb = NULL); + void removeCOFLinksOfType(LLWearableType::EType type, LLPointer<LLInventoryCallback> cb = NULL); void removeAllClothesFromAvatar(); void removeAllAttachmentsFromAvatar(); @@ -183,7 +196,9 @@ public: //Check ordering information on wearables stored in links' descriptions and update if it is invalid // COF is processed if cat_id is not specified - void updateClothingOrderingInfo(LLUUID cat_id = LLUUID::null, bool update_base_outfit_ordering = false); + void updateClothingOrderingInfo(LLUUID cat_id = LLUUID::null, + bool update_base_outfit_ordering = false, + LLPointer<LLInventoryCallback> cb = NULL); bool isOutfitLocked() { return mOutfitLocked; } @@ -193,6 +208,8 @@ public: void incrementCofVersion(LLHTTPClient::ResponderPtr responder_ptr = NULL); + U32 getNumAttachmentsInCOF(); + // *HACK Remove this after server side texture baking is deployed on all sims. void incrementCofVersionLegacy(); @@ -213,16 +230,13 @@ private: void getDescendentsOfAssetType(const LLUUID& category, LLInventoryModel::item_array_t& items, - LLAssetType::EType type, - bool follow_folder_links); + LLAssetType::EType type); void getUserDescendents(const LLUUID& category, LLInventoryModel::item_array_t& wear_items, LLInventoryModel::item_array_t& obj_items, - LLInventoryModel::item_array_t& gest_items, - bool follow_folder_links); + LLInventoryModel::item_array_t& gest_items); - void purgeCategory(const LLUUID& category, bool keep_outfit_links, LLInventoryModel::item_array_t* keep_items = NULL); static void onOutfitRename(const LLSD& notification, const LLSD& response); void setOutfitLocked(bool locked); @@ -256,15 +270,33 @@ public: class LLUpdateAppearanceOnDestroy: public LLInventoryCallback { public: - LLUpdateAppearanceOnDestroy(bool update_base_outfit_ordering = false); + LLUpdateAppearanceOnDestroy(bool update_base_outfit_ordering = false, + bool enforce_item_restrictions = true, + bool enforce_ordering = true); virtual ~LLUpdateAppearanceOnDestroy(); /* virtual */ void fire(const LLUUID& inv_item); private: U32 mFireCount; bool mUpdateBaseOrder; + bool mEnforceItemRestrictions; + bool mEnforceOrdering; +}; + +class LLUpdateAppearanceAndEditWearableOnDestroy: public LLInventoryCallback +{ +public: + LLUpdateAppearanceAndEditWearableOnDestroy(const LLUUID& item_id); + + /* virtual */ void fire(const LLUUID& item_id) {} + + ~LLUpdateAppearanceAndEditWearableOnDestroy(); + +private: + LLUUID mItemID; }; +class #define SUPPORT_ENSEMBLES 0 |