aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventorymodel.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llinventorymodel.h
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llinventorymodel.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/linden/indra/newview/llinventorymodel.h b/linden/indra/newview/llinventorymodel.h
index 7b57787..8205bf4 100644
--- a/linden/indra/newview/llinventorymodel.h
+++ b/linden/indra/newview/llinventorymodel.h
@@ -91,6 +91,7 @@ class LLViewerInventoryItem;
91class LLViewerInventoryCategory; 91class LLViewerInventoryCategory;
92class LLMessageSystem; 92class LLMessageSystem;
93class LLInventoryCollectFunctor; 93class LLInventoryCollectFunctor;
94class LLAlertDialog;
94 95
95class LLInventoryModel 96class LLInventoryModel
96{ 97{
@@ -105,11 +106,26 @@ public:
105 // These are used a lot... 106 // These are used a lot...
106 typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t; 107 typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t;
107 typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t; 108 typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t;
108
109 // construction & destruction 109 // construction & destruction
110 LLInventoryModel(); 110 LLInventoryModel();
111 ~LLInventoryModel(); 111 ~LLInventoryModel();
112 112
113 class fetchDescendentsResponder: public LLHTTPClient::Responder
114 {
115 public:
116 fetchDescendentsResponder(const LLSD& request_sd) : mRequestSD(request_sd) {};
117 void result(const LLSD& content);
118 void error(U32 status, const std::string& reason);
119 static void onClickRetry(S32 option, void* userdata);
120 static void appendRetryList(LLSD retry_sd);
121 public:
122 typedef std::vector<LLViewerInventoryCategory*> folder_ref_t;
123 protected:
124 LLSD mRequestSD;
125 static LLSD sRetrySD;
126 static LLAlertDialog *sRetryDialog;
127 };
128
113 // 129 //
114 // Accessors 130 // Accessors
115 // 131 //
@@ -263,6 +279,9 @@ public:
263 279
264 // make sure we have the descendents in the structure. 280 // make sure we have the descendents in the structure.
265 void fetchDescendentsOf(const LLUUID& folder_id); 281 void fetchDescendentsOf(const LLUUID& folder_id);
282
283 // Add categories to a list to be fetched in bulk.
284 static void bulkFetch(std::string url);
266 285
267 // call this method to request the inventory. 286 // call this method to request the inventory.
268 //void requestFromServer(const LLUUID& agent_id); 287 //void requestFromServer(const LLUUID& agent_id);
@@ -348,7 +367,7 @@ public:
348 static BOOL backgroundFetchActive(); 367 static BOOL backgroundFetchActive();
349 static bool isEverythingFetched(); 368 static bool isEverythingFetched();
350 static void backgroundFetch(void*); // background fetch idle function 369 static void backgroundFetch(void*); // background fetch idle function
351 370 static void incrBulkFetch(S16 fetching) { sBulkFetchCount+=fetching; if (sBulkFetchCount<0) sBulkFetchCount=0; }
352protected: 371protected:
353 372
354 // Internal methods which add inventory and make sure that all of 373 // Internal methods which add inventory and make sure that all of
@@ -395,7 +414,8 @@ protected:
395 static void processInventoryDescendents(LLMessageSystem* msg, void**); 414 static void processInventoryDescendents(LLMessageSystem* msg, void**);
396 static void processMoveInventoryItem(LLMessageSystem* msg, void**); 415 static void processMoveInventoryItem(LLMessageSystem* msg, void**);
397 static void processFetchInventoryReply(LLMessageSystem* msg, void**); 416 static void processFetchInventoryReply(LLMessageSystem* msg, void**);
398 417 static bool isBulkFetchProcessingComplete();
418
399 bool messageUpdateCore(LLMessageSystem* msg, bool do_accounting); 419 bool messageUpdateCore(LLMessageSystem* msg, bool do_accounting);
400 420
401protected: 421protected:
@@ -419,8 +439,6 @@ protected:
419 mutable LLPointer<LLViewerInventoryItem> mLastItem; 439 mutable LLPointer<LLViewerInventoryItem> mLastItem;
420 440
421 // This last set of indices is used to map parents to children. 441 // This last set of indices is used to map parents to children.
422 //LLPtrSkipMap<const LLUUID, cat_array_t*> mParentChildCategoryTree;
423 //LLPtrSkipMap<const LLUUID, item_array_t*> mParentChildItemTree;
424 typedef std::map<LLUUID, cat_array_t*> parent_cat_map_t; 442 typedef std::map<LLUUID, cat_array_t*> parent_cat_map_t;
425 typedef std::map<LLUUID, item_array_t*> parent_item_map_t; 443 typedef std::map<LLUUID, item_array_t*> parent_item_map_t;
426 parent_cat_map_t mParentChildCategoryTree; 444 parent_cat_map_t mParentChildCategoryTree;
@@ -430,6 +448,7 @@ protected:
430 observer_list_t mObservers; 448 observer_list_t mObservers;
431 449
432 // completing the fetch once per session should be sufficient 450 // completing the fetch once per session should be sufficient
451 static cat_map_t sBulkFetchMap;
433 static BOOL sBackgroundFetchActive; 452 static BOOL sBackgroundFetchActive;
434 static BOOL sTimelyFetchPending; 453 static BOOL sTimelyFetchPending;
435 static BOOL sAllFoldersFetched; 454 static BOOL sAllFoldersFetched;
@@ -438,6 +457,7 @@ protected:
438 static LLFrameTimer sFetchTimer; 457 static LLFrameTimer sFetchTimer;
439 static F32 sMinTimeBetweenFetches; 458 static F32 sMinTimeBetweenFetches;
440 static F32 sMaxTimeBetweenFetches; 459 static F32 sMaxTimeBetweenFetches;
460 static S16 sBulkFetchCount;
441 461
442 // This flag is used to handle an invalid inventory state. 462 // This flag is used to handle an invalid inventory state.
443 bool mIsAgentInvUsable; 463 bool mIsAgentInvUsable;