aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/llhttpassetstorage.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/llhttpassetstorage.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 'linden/indra/llmessage/llhttpassetstorage.h')
-rw-r--r--linden/indra/llmessage/llhttpassetstorage.h32
1 files changed, 23 insertions, 9 deletions
diff --git a/linden/indra/llmessage/llhttpassetstorage.h b/linden/indra/llmessage/llhttpassetstorage.h
index d09e2ce..d98af45 100644
--- a/linden/indra/llmessage/llhttpassetstorage.h
+++ b/linden/indra/llmessage/llhttpassetstorage.h
@@ -32,6 +32,7 @@
32#include "curl/curl.h" 32#include "curl/curl.h"
33 33
34class LLVFile; 34class LLVFile;
35class LLHTTPAssetRequest;
35typedef void (*progress_callback)(void* userdata); 36typedef void (*progress_callback)(void* userdata);
36 37
37struct LLTempAssetData; 38struct LLTempAssetData;
@@ -75,11 +76,25 @@ public:
75 bool temp_file, 76 bool temp_file,
76 bool is_priority); 77 bool is_priority);
77 78
79 virtual LLSD getPendingDetails(ERequestType rt,
80 LLAssetType::EType asset_type,
81 const std::string& detail_prefix) const;
82
83 virtual LLSD getPendingRequest(ERequestType rt,
84 LLAssetType::EType asset_type,
85 const LLUUID& asset_id) const;
86
87 virtual bool deletePendingRequest(ERequestType rt,
88 LLAssetType::EType asset_type,
89 const LLUUID& asset_id);
90
78 // Hack. One off curl download an URL to a file. Probably should be elsewhere. 91 // Hack. One off curl download an URL to a file. Probably should be elsewhere.
79 // Only used by lldynamicstate. The API is broken, and should be replaced with 92 // Only used by lldynamicstate. The API is broken, and should be replaced with
80 // a generic HTTP file fetch - Doug 9/25/06 93 // a generic HTTP file fetch - Doug 9/25/06
81 S32 getURLToFile(const LLUUID& uuid, LLAssetType::EType asset_type, const LLString &url, const char *filename, progress_callback callback, void *userdata); 94 S32 getURLToFile(const LLUUID& uuid, LLAssetType::EType asset_type, const LLString &url, const char *filename, progress_callback callback, void *userdata);
82 95
96 LLAssetRequest* findNextRequest(request_list_t& pending, request_list_t& running);
97
83 void checkForTimeouts(); 98 void checkForTimeouts();
84 99
85 static size_t curlDownCallback(void *data, size_t size, size_t nmemb, void *user_data); 100 static size_t curlDownCallback(void *data, size_t size, size_t nmemb, void *user_data);
@@ -88,12 +103,11 @@ public:
88 static size_t nullOutputCallback(void *data, size_t size, size_t nmemb, void *user_data); 103 static size_t nullOutputCallback(void *data, size_t size, size_t nmemb, void *user_data);
89 104
90 // Should only be used by the LLHTTPAssetRequest 105 // Should only be used by the LLHTTPAssetRequest
91 void setPendingUpload() { mPendingUpload = TRUE; } 106 void addRunningRequest(ERequestType rt, LLHTTPAssetRequest* request);
92 void setPendingLocalUpload() { mPendingLocalUpload = TRUE; } 107 void removeRunningRequest(ERequestType rt, LLHTTPAssetRequest* request);
93 void setPendingDownload() { mPendingDownload = TRUE; } 108
94 void clearPendingUpload() { mPendingUpload = FALSE; } 109 request_list_t* getRunningList(ERequestType rt);
95 void clearPendingLocalUpload() { mPendingLocalUpload = FALSE; } 110 const request_list_t* getRunningList(ERequestType rt) const;
96 void clearPendingDownload() { mPendingDownload = FALSE; }
97 111
98 // Temp assets are stored on sim nodes, they have agent ID and location data associated with them. 112 // Temp assets are stored on sim nodes, they have agent ID and location data associated with them.
99 virtual void addTempAssetData(const LLUUID& asset_id, const LLUUID& agent_id, const std::string& host_name); 113 virtual void addTempAssetData(const LLUUID& asset_id, const LLUUID& agent_id, const std::string& host_name);
@@ -125,9 +139,9 @@ protected:
125 139
126 CURLM *mCurlMultiHandle; 140 CURLM *mCurlMultiHandle;
127 141
128 BOOL mPendingDownload; 142 request_list_t mRunningDownloads;
129 BOOL mPendingUpload; 143 request_list_t mRunningUploads;
130 BOOL mPendingLocalUpload; 144 request_list_t mRunningLocalUploads;
131 145
132 uuid_tempdata_map mTempAssets; 146 uuid_tempdata_map mTempAssets;
133}; 147};