aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/llassetstorage.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/llmessage/llassetstorage.h
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r--linden/indra/llmessage/llassetstorage.h72
1 files changed, 64 insertions, 8 deletions
diff --git a/linden/indra/llmessage/llassetstorage.h b/linden/indra/llmessage/llassetstorage.h
index deccad3..639ab59 100644
--- a/linden/indra/llmessage/llassetstorage.h
+++ b/linden/indra/llmessage/llassetstorage.h
@@ -109,6 +109,19 @@ public:
109 BOOL mDataSentInFirstPacket; 109 BOOL mDataSentInFirstPacket;
110 BOOL mDataIsInVFS; 110 BOOL mDataIsInVFS;
111 LLUUID mRequestingAgentID; // Only valid for uploads from an agent 111 LLUUID mRequestingAgentID; // Only valid for uploads from an agent
112
113 virtual LLSD getTerseDetails() const;
114 virtual LLSD getFullDetails() const;
115};
116
117template <class T>
118struct ll_asset_request_equal : public std::equal_to<T>
119{
120 bool operator()(const T& x, const T& y) const
121 {
122 return ( x->getType() == y->getType()
123 && x->getUUID() == y->getUUID() );
124 }
112}; 125};
113 126
114 127
@@ -184,6 +197,15 @@ public:
184 LLVFS *mVFS; 197 LLVFS *mVFS;
185 typedef void (*LLStoreAssetCallback)(const LLUUID &asset_id, void *user_data, S32 status); 198 typedef void (*LLStoreAssetCallback)(const LLUUID &asset_id, void *user_data, S32 status);
186 199
200 enum ERequestType
201 {
202 RT_INVALID = -1,
203 RT_DOWNLOAD = 0,
204 RT_UPLOAD = 1,
205 RT_LOCALUPLOAD = 2,
206 RT_COUNT = 3
207 };
208
187protected: 209protected:
188 BOOL mShutDown; 210 BOOL mShutDown;
189 LLHost mUpstreamHost; 211 LLHost mUpstreamHost;
@@ -191,9 +213,11 @@ protected:
191 LLMessageSystem *mMessageSys; 213 LLMessageSystem *mMessageSys;
192 LLXferManager *mXferManager; 214 LLXferManager *mXferManager;
193 215
194 std::list<LLAssetRequest*> mPendingDownloads; 216
195 std::list<LLAssetRequest*> mPendingUploads; 217 typedef std::list<LLAssetRequest*> request_list_t;
196 std::list<LLAssetRequest*> mPendingLocalUploads; 218 request_list_t mPendingDownloads;
219 request_list_t mPendingUploads;
220 request_list_t mPendingLocalUploads;
197 221
198public: 222public:
199 LLAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, 223 LLAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
@@ -258,14 +282,48 @@ public:
258 const LLUUID &asset_id, LLAssetType::EType atype, 282 const LLUUID &asset_id, LLAssetType::EType atype,
259 LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE); // Get a particular inventory item. 283 LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE); // Get a particular inventory item.
260 284
285protected:
286 virtual LLSD getPendingDetails(const request_list_t* requests,
287 LLAssetType::EType asset_type,
288 const std::string& detail_prefix) const;
289
290 virtual LLSD getPendingRequest(const request_list_t* requests,
291 LLAssetType::EType asset_type,
292 const LLUUID& asset_id) const;
293
294 virtual bool deletePendingRequest(request_list_t* requests,
295 LLAssetType::EType asset_type,
296 const LLUUID& asset_id);
297
298public:
299 static const LLAssetRequest* findRequest(const request_list_t* requests,
300 LLAssetType::EType asset_type,
301 const LLUUID& asset_id);
302 static LLAssetRequest* findRequest(request_list_t* requests,
303 LLAssetType::EType asset_type,
304 const LLUUID& asset_id);
305
306 request_list_t* getRequestList(ERequestType rt);
307 const request_list_t* getRequestList(ERequestType rt) const;
308 static std::string getRequestName(ERequestType rt);
261 309
262 S32 getNumPendingDownloads() const; 310 S32 getNumPendingDownloads() const;
263 S32 getNumPendingUploads() const; 311 S32 getNumPendingUploads() const;
264 S32 getNumPendingLocalUploads(); 312 S32 getNumPendingLocalUploads();
313 S32 getNumPending(ERequestType rt) const;
314
315 virtual LLSD getPendingDetails(ERequestType rt,
316 LLAssetType::EType asset_type,
317 const std::string& detail_prefix) const;
318
319 virtual LLSD getPendingRequest(ERequestType rt,
320 LLAssetType::EType asset_type,
321 const LLUUID& asset_id) const;
322
323 virtual bool deletePendingRequest(ERequestType rt,
324 LLAssetType::EType asset_type,
325 const LLUUID& asset_id);
265 326
266 // Returns a map from type to num pending, eg 'texture' => 5, 'object' => 10
267 LLSD getPendingDownloadTypes() const;
268 LLSD getPendingUploadTypes() const;
269 327
270 // download process callbacks 328 // download process callbacks
271 static void downloadCompleteCallback( 329 static void downloadCompleteCallback(
@@ -349,8 +407,6 @@ private:
349 LLXferManager *xfer, 407 LLXferManager *xfer,
350 LLVFS *vfs, 408 LLVFS *vfs,
351 const LLHost &upstream_host); 409 const LLHost &upstream_host);
352 LLSD getPendingTypes(const std::list<LLAssetRequest*>& requests) const;
353
354}; 410};
355 411
356//////////////////////////////////////////////////////////////////////// 412////////////////////////////////////////////////////////////////////////