From cdbdb1168694bcbfc58208f2941f513b556a0d6e Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 6 Apr 2010 14:47:20 -0400 Subject: EXT-4151 : Immediately check if a fetchObserver filter is done, else add to observer list automatically FetchObservers now take in a list of IDs to check against. Made some naming changes. --- indra/newview/llagentwearables.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 9d3b5763e8..bc8931827e 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -905,8 +905,9 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // Get the UUID of the current outfit folder (will be created if it doesn't exist) const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - - LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(); + uuid_vec_t folders; + folders.push_back(current_outfit_id); + LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(folders); //lldebugs << "processAgentInitialWearablesUpdate()" << llendl; // Add wearables @@ -952,9 +953,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // Get the complete information on the items in the inventory and set up an observer // that will trigger when the complete information is fetched. - uuid_vec_t folders; - folders.push_back(current_outfit_id); - outfit->fetch(folders); + outfit->startFetch(); if(outfit->isEverythingComplete()) { // everything is already here - call done. @@ -2061,16 +2060,16 @@ void LLAgentWearables::populateMyOutfitsFolder(void) { llinfos << "starting outfit population" << llendl; - LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(); + const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); + uuid_vec_t folders; + folders.push_back(my_outfits_id); + LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(folders); + outfits->mMyOutfitsID = my_outfits_id; // Get the complete information on the items in the inventory and // setup an observer that will wait for that to happen. - uuid_vec_t folders; - outfits->mMyOutfitsID = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); - - folders.push_back(outfits->mMyOutfitsID); gInventory.addObserver(outfits); - outfits->fetch(folders); + outfits->startFetch(); if (outfits->isEverythingComplete()) { outfits->done(); -- cgit v1.2.3 From c3d9316dff568d5265d856a708e3909deae09f18 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 6 Apr 2010 17:30:23 -0400 Subject: EXT-6727 : Allow LLInventoryObservers to target a single item (instead of a vector of items) Added new constructors to LLInventoryFetch types to allow passing in a single item. --- indra/newview/llagentwearables.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index bc8931827e..aedea5660f 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -905,9 +905,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // Get the UUID of the current outfit folder (will be created if it doesn't exist) const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - uuid_vec_t folders; - folders.push_back(current_outfit_id); - LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(folders); + LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(current_outfit_id); //lldebugs << "processAgentInitialWearablesUpdate()" << llendl; // Add wearables @@ -2061,9 +2059,7 @@ void LLAgentWearables::populateMyOutfitsFolder(void) llinfos << "starting outfit population" << llendl; const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); - uuid_vec_t folders; - folders.push_back(my_outfits_id); - LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(folders); + LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(my_outfits_id); outfits->mMyOutfitsID = my_outfits_id; // Get the complete information on the items in the inventory and -- cgit v1.2.3 From f096f02278f3b8c8fdd962c85b237492defa93ec Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 6 Apr 2010 18:58:26 -0400 Subject: EXT-6728 : Have LLInventoryFetchItems/DescendentsObserver inherit from a base abstract LLInventoryFetchObserver class Added a new abstract class LLInventoryFetchObserver from which LLInventoryFetchItems and LLInventoryFetchDescendents inherit. Also changed isEverythingComplete to isFinished and made some other minor superficial changes. --- indra/newview/llagentwearables.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index aedea5660f..7f248eee30 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -952,7 +952,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // Get the complete information on the items in the inventory and set up an observer // that will trigger when the complete information is fetched. outfit->startFetch(); - if(outfit->isEverythingComplete()) + if(outfit->isFinished()) { // everything is already here - call done. outfit->done(); @@ -2066,7 +2066,7 @@ void LLAgentWearables::populateMyOutfitsFolder(void) // setup an observer that will wait for that to happen. gInventory.addObserver(outfits); outfits->startFetch(); - if (outfits->isEverythingComplete()) + if (outfits->isFinished()) { outfits->done(); } -- cgit v1.2.3