summaryrefslogtreecommitdiff
path: root/indra/newview/llagentwearables.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-08-05 16:10:15 -0400
committerNat Goodspeed <nat@lindenlab.com>2009-08-05 16:10:15 -0400
commit07129bf928f79246849e66b396fab44a7a228216 (patch)
treee4e19b342540450ff84dad75f90d5acb5b3d6269 /indra/newview/llagentwearables.h
parent03ebc43132331b9a8dcb3c418ec9c319a6beddda (diff)
parentdc62495da6e5c153c0df57fdbce6b0f40c0208f2 (diff)
Merge recent changes
Diffstat (limited to 'indra/newview/llagentwearables.h')
-rw-r--r--indra/newview/llagentwearables.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 31d6e30069..977efd71b4 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -66,32 +66,37 @@ public:
BOOL isWearingItem(const LLUUID& item_id, const BOOL include_linked_items = FALSE) const;
BOOL isWearableModifiable(EWearableType type, U32 index /*= 0*/) const;
BOOL isWearableCopyable(EWearableType type, U32 index /*= 0*/) const;
- BOOL areWearablesLoaded() const { return mWearablesLoaded; }
+ BOOL areWearablesLoaded() const;
+ void updateWearablesLoaded();
+ void checkWearablesLoaded() const;
+
//--------------------------------------------------------------------
// Accessors
//--------------------------------------------------------------------
public:
- const LLUUID& getWearableItem(EWearableType type, U32 index /*= 0*/) const;
- LLWearable* getWearableFromWearableItem(const LLUUID& item_id) const;
+ const LLUUID getWearableItemID(EWearableType type, U32 index /*= 0*/) const;
+ const LLWearable* getWearableFromWearableItem(const LLUUID& item_id) const;
LLInventoryItem* getWearableInventoryItem(EWearableType type, U32 index /*= 0*/);
// MULTI-WEARABLE: assuming one per type.
- static BOOL selfHasWearable(void* userdata); // userdata is EWearableType
+ static BOOL selfHasWearable(EWearableType type);
LLWearable* getWearable(const EWearableType type, U32 index /*= 0*/);
const LLWearable* getWearable(const EWearableType type, U32 index /*= 0*/) const;
U32 getWearableCount(const EWearableType type) const;
+
private:
- struct LLWearableInv;
- LLWearableInv* getWearableInv(const EWearableType type, U32 index /*= 0*/);
- const LLWearableInv* getWearableInv(const EWearableType type, U32 /*index = 0*/) const;
+ // Low-level data structure setter - public access is via setWearableItem, etc.
+ void setWearable(const EWearableType type, U32 index, LLWearable *wearable);
+
//--------------------------------------------------------------------
// Setters
//--------------------------------------------------------------------
public:
- void setWearable(LLInventoryItem* new_item, LLWearable* wearable, bool do_append = false);
+ void setWearableItem(LLInventoryItem* new_item, LLWearable* wearable, bool do_append = false);
void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLWearable* >& wearables, BOOL remove);
void setWearableName(const LLUUID& item_id, const std::string& new_name);
+ void addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index);
protected:
void setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append = false);
static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLWearable* wearable);
@@ -160,16 +165,20 @@ public:
static void userRemoveAllClothes(void* userdata); // userdata is NULL
static void userRemoveAllAttachments(void* userdata); // userdata is NULL
+ BOOL itemUpdatePending(const LLUUID& item_id) const;
+ U32 itemUpdatePendingCount() const;
+
//--------------------------------------------------------------------
// Member variables
//--------------------------------------------------------------------
private:
- typedef std::vector<LLWearableInv*> wearableentry_vec_t; // all wearables of a certain type (EG all shirts)
+ typedef std::vector<LLWearable*> wearableentry_vec_t; // all wearables of a certain type (EG all shirts)
typedef std::map<EWearableType, wearableentry_vec_t> wearableentry_map_t; // wearable "categories" arranged by wearable type
wearableentry_map_t mWearableDatas;
static BOOL mInitialWearablesUpdateReceived;
BOOL mWearablesLoaded;
+ std::set<LLUUID> mItemsAwaitingWearableUpdate;
LLPointer<LLVOAvatarSelf> mAvatarObject; // NULL until avatar object sent down from simulator
//--------------------------------------------------------------------------------
@@ -215,15 +224,6 @@ private:
LLPointer<LLRefCount> mCB;
};
- struct LLWearableInv // Make this subclass of llwearable?
- {
- LLWearableInv() : mItemID(LLUUID::null), mWearable(NULL) {}
- // BOOL exists() const;
- LLUUID mItemID; // ID of the inventory item in the agent's inventory.
- LLWearable* mWearable;
- };
- const static LLWearableInv s_null_wearable;
-
}; // LLAgentWearables
extern LLAgentWearables gAgentWearables;