diff options
Diffstat (limited to 'indra/newview/llinventoryobserver.cpp')
-rw-r--r-- | indra/newview/llinventoryobserver.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 9913be2e88..83e1bbd5a0 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -108,6 +108,10 @@ void LLInventoryCompletionObserver::watchItem(const LLUUID& id) } } +LLInventoryFetchObserver::LLInventoryFetchObserver(bool retry_if_missing) : + mRetryIfMissing(retry_if_missing) +{ +} void LLInventoryFetchObserver::changed(U32 mask) { @@ -115,7 +119,7 @@ void LLInventoryFetchObserver::changed(U32 mask) // appropriate. if(!mIncomplete.empty()) { - for(item_ref_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); ) + for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); ) { LLViewerInventoryItem* item = gInventory.getItem(*it); if(!item) @@ -219,12 +223,11 @@ void fetch_items_from_llsd(const LLSD& items_llsd) } } -void LLInventoryFetchObserver::fetchItems( - const LLInventoryFetchObserver::item_ref_t& ids) +void LLInventoryFetchObserver::fetch(const uuid_vec_t& ids) { LLUUID owner_id; LLSD items_llsd; - for(item_ref_t::const_iterator it = ids.begin(); it < ids.end(); ++it) + for(uuid_vec_t::const_iterator it = ids.begin(); it < ids.end(); ++it) { LLViewerInventoryItem* item = gInventory.getItem(*it); if(item) @@ -262,30 +265,29 @@ void LLInventoryFetchObserver::fetchItems( // virtual void LLInventoryFetchDescendentsObserver::changed(U32 mask) { - for(uuid_vec_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();) + for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end();) { LLViewerInventoryCategory* cat = gInventory.getCategory(*it); if(!cat) { - it = mIncompleteFolders.erase(it); + it = mIncomplete.erase(it); continue; } if(isComplete(cat)) { - mCompleteFolders.push_back(*it); - it = mIncompleteFolders.erase(it); + mComplete.push_back(*it); + it = mIncomplete.erase(it); continue; } ++it; } - if(mIncompleteFolders.empty()) + if(mIncomplete.empty()) { done(); } } -void LLInventoryFetchDescendentsObserver::fetchDescendents( - const uuid_vec_t& ids) +void LLInventoryFetchDescendentsObserver::fetch(const uuid_vec_t& ids) { for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { @@ -293,19 +295,19 @@ void LLInventoryFetchDescendentsObserver::fetchDescendents( if(!cat) continue; if(!isComplete(cat)) { - cat->fetchDescendents(); //blindly fetch it without seeing if anything else is fetching it. - mIncompleteFolders.push_back(*it); //Add to list of things being downloaded for this observer. + cat->fetch(); //blindly fetch it without seeing if anything else is fetching it. + mIncomplete.push_back(*it); //Add to list of things being downloaded for this observer. } else { - mCompleteFolders.push_back(*it); + mComplete.push_back(*it); } } } bool LLInventoryFetchDescendentsObserver::isEverythingComplete() const { - return mIncompleteFolders.empty(); + return mIncomplete.empty(); } bool LLInventoryFetchDescendentsObserver::isComplete(LLViewerInventoryCategory* cat) @@ -409,7 +411,7 @@ void LLInventoryFetchComboObserver::fetch( if(!cat) continue; if(!gInventory.isCategoryComplete(*fit)) { - cat->fetchDescendents(); + cat->fetch(); lldebugs << "fetching folder " << *fit <<llendl; mIncompleteFolders.push_back(*fit); } @@ -475,7 +477,7 @@ void LLInventoryExistenceObserver::changed(U32 mask) // appropriate. if(!mMIA.empty()) { - for(item_ref_t::iterator it = mMIA.begin(); it < mMIA.end(); ) + for(uuid_vec_t::iterator it = mMIA.begin(); it < mMIA.end(); ) { LLViewerInventoryItem* item = gInventory.getItem(*it); if(!item) |