diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-13 12:44:45 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-13 12:44:45 +0100 |
commit | d3418e5e65f7845f89b5ce2019bd635861573ed3 (patch) | |
tree | d56a1e629858cb89775c84c2a34b2282d29b2955 /indra/newview/llinventorymodelbackgroundfetch.h | |
parent | 818e970b3efe65f6e471d071ae5f01603f61da79 (diff) | |
parent | d50a34e6e37c34fb84ad232aad7b3bf2a3b3b408 (diff) |
merge
Diffstat (limited to 'indra/newview/llinventorymodelbackgroundfetch.h')
-rw-r--r-- | indra/newview/llinventorymodelbackgroundfetch.h | 86 |
1 files changed, 30 insertions, 56 deletions
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index c1e37eda8f..04f96586d7 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -33,39 +33,15 @@ #ifndef LL_LLINVENTORYMODELBACKGROUNDFETCH_H #define LL_LLINVENTORYMODELBACKGROUNDFETCH_H -// Seraph clean this up -#include "llassettype.h" -#include "llfoldertype.h" -#include "lldarray.h" -#include "llframetimer.h" -#include "llhttpclient.h" +#include "llsingleton.h" #include "lluuid.h" -#include "llpermissionsflags.h" -#include "llstring.h" -#include <map> -#include <set> -#include <string> -#include <vector> - -// Seraph clean this up -class LLInventoryObserver; -class LLInventoryObject; -class LLInventoryItem; -class LLInventoryCategory; -class LLViewerInventoryItem; -class LLViewerInventoryCategory; -class LLViewerInventoryItem; -class LLViewerInventoryCategory; -class LLMessageSystem; -class LLInventoryCollectFunctor; - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryModelBackgroundFetch // -// This class handles background fetch. +// This class handles background fetches, which are fetches of +// inventory folder. Fetches can be recursive or not. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackgroundFetch> { friend class LLInventoryModelFetchDescendentsResponder; @@ -75,48 +51,37 @@ public: ~LLInventoryModelBackgroundFetch(); // Start and stop background breadth-first fetching of inventory contents. - // This gets triggered when performing a filter-search + // This gets triggered when performing a filter-search. void start(const LLUUID& cat_id = LLUUID::null, BOOL recursive = TRUE); - BOOL backgroundFetchActive(); - bool isEverythingFetched(); - void incrBulkFetch(S16 fetching); - void stopBackgroundFetch(); // stop fetch process - bool isBulkFetchProcessingComplete(); - // Add categories to a list to be fetched in bulk. - void bulkFetch(std::string url); + BOOL backgroundFetchActive() const; + bool isEverythingFetched() const; // completing the fetch once per session should be sufficient - bool libraryFetchStarted(); - bool libraryFetchCompleted(); - bool libraryFetchInProgress(); + bool libraryFetchStarted() const; + bool libraryFetchCompleted() const; + bool libraryFetchInProgress() const; - bool inventoryFetchStarted(); - bool inventoryFetchCompleted(); - bool inventoryFetchInProgress(); - void findLostItems(); + bool inventoryFetchStarted() const; + bool inventoryFetchCompleted() const; + bool inventoryFetchInProgress() const; - void setAllFoldersFetched(); + void findLostItems(); +protected: + void incrBulkFetch(S16 fetching); + bool isBulkFetchProcessingComplete() const; + void bulkFetch(std::string url); - static void backgroundFetchCB(void*); // background fetch idle function void backgroundFetch(); - - struct FetchQueueInfo - { - FetchQueueInfo(const LLUUID& id, BOOL recursive) : - mCatUUID(id), mRecursive(recursive) - { - } - LLUUID mCatUUID; - BOOL mRecursive; - }; -protected: + static void backgroundFetchCB(void*); // background fetch idle function + void stopBackgroundFetch(); // stop fetch process + + void setAllFoldersFetched(); bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const; private: BOOL mRecursiveInventoryFetchStarted; BOOL mRecursiveLibraryFetchStarted; BOOL mAllFoldersFetched; - // completing the fetch once per session should be sufficient BOOL mBackgroundFetchActive; S16 mBulkFetchCount; BOOL mTimelyFetchPending; @@ -126,6 +91,15 @@ private: F32 mMinTimeBetweenFetches; F32 mMaxTimeBetweenFetches; + struct FetchQueueInfo + { + FetchQueueInfo(const LLUUID& id, BOOL recursive) : + mCatUUID(id), mRecursive(recursive) + { + } + LLUUID mCatUUID; + BOOL mRecursive; + }; typedef std::deque<FetchQueueInfo> fetch_queue_t; fetch_queue_t mFetchQueue; }; |