summaryrefslogtreecommitdiff
path: root/indra/llmessage/llhttpassetstorage.h
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-03-15 00:54:39 +0000
committerDon Kjer <don@lindenlab.com>2007-03-15 00:54:39 +0000
commit0947e139ed57685d24667a362ad0e13b7df13509 (patch)
treed6a9c7c5f865b247c66fcc20b6df22092d8ffc15 /indra/llmessage/llhttpassetstorage.h
parent00dbacb215da8d6b6739b4bcefebee552de89a9c (diff)
svn merge -r 58433:58660 svn+ssh://svn/svn/linden/branches/upload-queue into release
Diffstat (limited to 'indra/llmessage/llhttpassetstorage.h')
-rw-r--r--indra/llmessage/llhttpassetstorage.h32
1 files changed, 23 insertions, 9 deletions
diff --git a/indra/llmessage/llhttpassetstorage.h b/indra/llmessage/llhttpassetstorage.h
index a6ba5c795c..b1be7431b9 100644
--- a/indra/llmessage/llhttpassetstorage.h
+++ b/indra/llmessage/llhttpassetstorage.h
@@ -13,6 +13,7 @@
#include "curl/curl.h"
class LLVFile;
+class LLHTTPAssetRequest;
typedef void (*progress_callback)(void* userdata);
struct LLTempAssetData;
@@ -56,11 +57,25 @@ public:
bool temp_file,
bool is_priority);
+ virtual LLSD getPendingDetails(ERequestType rt,
+ LLAssetType::EType asset_type,
+ const std::string& detail_prefix) const;
+
+ virtual LLSD getPendingRequest(ERequestType rt,
+ LLAssetType::EType asset_type,
+ const LLUUID& asset_id) const;
+
+ virtual bool deletePendingRequest(ERequestType rt,
+ LLAssetType::EType asset_type,
+ const LLUUID& asset_id);
+
// Hack. One off curl download an URL to a file. Probably should be elsewhere.
// Only used by lldynamicstate. The API is broken, and should be replaced with
// a generic HTTP file fetch - Doug 9/25/06
S32 getURLToFile(const LLUUID& uuid, LLAssetType::EType asset_type, const LLString &url, const char *filename, progress_callback callback, void *userdata);
+ LLAssetRequest* findNextRequest(request_list_t& pending, request_list_t& running);
+
void checkForTimeouts();
static size_t curlDownCallback(void *data, size_t size, size_t nmemb, void *user_data);
@@ -69,12 +84,11 @@ public:
static size_t nullOutputCallback(void *data, size_t size, size_t nmemb, void *user_data);
// Should only be used by the LLHTTPAssetRequest
- void setPendingUpload() { mPendingUpload = TRUE; }
- void setPendingLocalUpload() { mPendingLocalUpload = TRUE; }
- void setPendingDownload() { mPendingDownload = TRUE; }
- void clearPendingUpload() { mPendingUpload = FALSE; }
- void clearPendingLocalUpload() { mPendingLocalUpload = FALSE; }
- void clearPendingDownload() { mPendingDownload = FALSE; }
+ void addRunningRequest(ERequestType rt, LLHTTPAssetRequest* request);
+ void removeRunningRequest(ERequestType rt, LLHTTPAssetRequest* request);
+
+ request_list_t* getRunningList(ERequestType rt);
+ const request_list_t* getRunningList(ERequestType rt) const;
// Temp assets are stored on sim nodes, they have agent ID and location data associated with them.
virtual void addTempAssetData(const LLUUID& asset_id, const LLUUID& agent_id, const std::string& host_name);
@@ -106,9 +120,9 @@ protected:
CURLM *mCurlMultiHandle;
- BOOL mPendingDownload;
- BOOL mPendingUpload;
- BOOL mPendingLocalUpload;
+ request_list_t mRunningDownloads;
+ request_list_t mRunningUploads;
+ request_list_t mRunningLocalUploads;
uuid_tempdata_map mTempAssets;
};