summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappearancemgr.h')
-rw-r--r--indra/newview/llappearancemgr.h38
1 files changed, 27 insertions, 11 deletions
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 40b8844731..7e35919892 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -75,6 +75,12 @@ public:
const LLViewerInventoryItem *getBaseOutfitLink();
bool getBaseOutfitName(std::string &name);
+ // find the UUID of the currently worn outfit (Base Outfit)
+ 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);
+
// Update the displayed outfit name in UI.
void updatePanelOutfitName(const std::string& name);
@@ -123,6 +129,15 @@ public:
// Create initial outfits from library.
void autopopulateOutfits();
+ void wearBaseOutfit();
+
+ // Overrides the base outfit with the content from COF
+ // @return false if there is no base outfit
+ bool updateBaseOutfit();
+
+ //Remove clothing or detach an object from the agent (a bodypart cannot be removed)
+ void removeItemFromAvatar(const LLUUID& item_id);
+
protected:
LLAppearanceMgr();
~LLAppearanceMgr();
@@ -244,10 +259,12 @@ void doOnIdleRepeating(T callable)
}
template <class T>
-class CallAfterCategoryFetchStage2: public LLInventoryFetchObserver
+class CallAfterCategoryFetchStage2: public LLInventoryFetchItemsObserver
{
public:
- CallAfterCategoryFetchStage2(T callable):
+ CallAfterCategoryFetchStage2(const uuid_vec_t& ids,
+ T callable) :
+ LLInventoryFetchItemsObserver(ids),
mCallable(callable)
{
}
@@ -268,7 +285,8 @@ template <class T>
class CallAfterCategoryFetchStage1: public LLInventoryFetchDescendentsObserver
{
public:
- CallAfterCategoryFetchStage1(T callable):
+ CallAfterCategoryFetchStage1(const LLUUID& cat_id, T callable) :
+ LLInventoryFetchDescendentsObserver(cat_id),
mCallable(callable)
{
}
@@ -297,7 +315,6 @@ public:
return;
}
- CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(mCallable);
uuid_vec_t ids;
for(S32 i = 0; i < count; ++i)
{
@@ -307,8 +324,9 @@ public:
gInventory.removeObserver(this);
// do the fetch
- stage2->fetch(ids);
- if(stage2->isEverythingComplete())
+ CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(ids, mCallable);
+ stage2->startFetch();
+ if(stage2->isFinished())
{
// everything is already here - call done.
stage2->done();
@@ -328,11 +346,9 @@ protected:
template <class T>
void callAfterCategoryFetch(const LLUUID& cat_id, T callable)
{
- CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(callable);
- uuid_vec_t folders;
- folders.push_back(cat_id);
- stage1->fetch(folders);
- if (stage1->isEverythingComplete())
+ CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(cat_id, callable);
+ stage1->startFetch();
+ if (stage1->isFinished())
{
stage1->done();
}