summaryrefslogtreecommitdiff
path: root/indra/llmessage/llassetstorage.h
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2017-06-20 13:46:51 -0700
committerGlenn Glazer <coyot@lindenlab.com>2017-06-20 13:46:51 -0700
commit1054ddf1bac314dea994ca307c71c9df826c573b (patch)
tree0cac32f16df50f49e5fb681f400ae4a377c3c853 /indra/llmessage/llassetstorage.h
parent8205eaa6e3275fec2148286f8e831d18a0e6f22f (diff)
parenta3066b7375a13b61861b554519673dfc24322c22 (diff)
pull from v64 gate
Diffstat (limited to 'indra/llmessage/llassetstorage.h')
-rw-r--r--indra/llmessage/llassetstorage.h112
1 files changed, 34 insertions, 78 deletions
diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h
index 0f23754096..33b88473b9 100644
--- a/indra/llmessage/llassetstorage.h
+++ b/indra/llmessage/llassetstorage.h
@@ -138,6 +138,7 @@ public:
BOOL mIsUserWaiting; // We don't want to try forever if a user is waiting for a result.
F64Seconds mTimeout; // Amount of time before timing out.
LLUUID mRequestingAgentID; // Only valid for uploads from an agent
+ F64 mBytesFetched;
virtual LLSD getTerseDetails() const;
virtual LLSD getFullDetails() const;
@@ -186,18 +187,9 @@ typedef std::map<LLUUID,U64,lluuid_less> toxic_asset_map_t;
// we can use bind and remove the userData parameter.
//
typedef void (*LLGetAssetCallback)(LLVFS *vfs, const LLUUID &asset_id,
- LLAssetType::EType asset_type, void *user_data, S32 status, LLExtStat ext_status);
+ LLAssetType::EType asset_type, void *user_data, S32 status, LLExtStat ext_status);
-class LLTempAssetStorage
-{
-public:
- virtual ~LLTempAssetStorage() =0;
- virtual void addTempAssetData(const LLUUID& asset_id,
- const LLUUID& agent_id,
- const std::string& host_name) = 0;
-};
-
-class LLAssetStorage : public LLTempAssetStorage
+class LLAssetStorage
{
public:
// VFS member is public because static child methods need it :(
@@ -240,12 +232,11 @@ public:
void setUpstream(const LLHost &upstream_host);
- virtual BOOL hasLocalAsset(const LLUUID &uuid, LLAssetType::EType type);
+ BOOL hasLocalAsset(const LLUUID &uuid, LLAssetType::EType type);
// public interface methods
// note that your callback may get called BEFORE the function returns
-
- virtual void getAssetData(const LLUUID uuid, LLAssetType::EType atype, LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE);
+ void getAssetData(const LLUUID uuid, LLAssetType::EType atype, LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE);
/*
* TransactionID version
@@ -260,25 +251,11 @@ public:
bool is_priority = false,
bool store_local = false,
bool user_waiting= false,
- F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT);
-
- /*
- * AssetID version
- * Sim needs both store_local and requesting_agent_id.
- */
- virtual void storeAssetData(
- const LLUUID& asset_id,
- LLAssetType::EType asset_type,
- LLStoreAssetCallback callback,
- void* user_data,
- bool temp_file = false,
- bool is_priority = false,
- bool store_local = false,
- const LLUUID& requesting_agent_id = LLUUID::null,
- bool user_waiting= false,
- F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT);
+ F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT) = 0;
- virtual void checkForTimeouts();
+ virtual void logAssetStorageInfo() = 0;
+
+ void checkForTimeouts();
void getEstateAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id,
const LLUUID &asset_id, LLAssetType::EType atype, EstateAssetType etype,
@@ -303,17 +280,17 @@ protected:
bool findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAssetType::EType type,
LLGetAssetCallback callback, void *user_data);
- virtual LLSD getPendingDetailsImpl(const request_list_t* requests,
- LLAssetType::EType asset_type,
- const std::string& detail_prefix) const;
+ LLSD getPendingDetailsImpl(const request_list_t* requests,
+ LLAssetType::EType asset_type,
+ const std::string& detail_prefix) const;
- virtual LLSD getPendingRequestImpl(const request_list_t* requests,
- LLAssetType::EType asset_type,
- const LLUUID& asset_id) const;
+ LLSD getPendingRequestImpl(const request_list_t* requests,
+ LLAssetType::EType asset_type,
+ const LLUUID& asset_id) const;
- virtual bool deletePendingRequestImpl(request_list_t* requests,
- LLAssetType::EType asset_type,
- const LLUUID& asset_id);
+ bool deletePendingRequestImpl(request_list_t* requests,
+ LLAssetType::EType asset_type,
+ const LLUUID& asset_id);
public:
static const LLAssetRequest* findRequest(const request_list_t* requests,
@@ -332,19 +309,23 @@ public:
S32 getNumPendingLocalUploads();
S32 getNumPending(ERequestType rt) const;
- virtual LLSD getPendingDetails(ERequestType rt,
- LLAssetType::EType asset_type,
- const std::string& detail_prefix) const;
+ 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;
+ 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);
+ bool deletePendingRequest(ERequestType rt,
+ LLAssetType::EType asset_type,
+ const LLUUID& asset_id);
+ static void removeAndCallbackPendingDownloads(const LLUUID& file_id, LLAssetType::EType file_type,
+ const LLUUID& callback_id, LLAssetType::EType callback_type,
+ S32 result_code, LLExtStat ext_status);
+
// download process callbacks
static void downloadCompleteCallback(
S32 result,
@@ -370,23 +351,10 @@ public:
static const char* getErrorString( S32 status );
// deprecated file-based methods
+ // Not overriden
void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, BOOL is_priority = FALSE);
/*
- * AssetID version.
- */
- virtual void storeAssetData(
- const std::string& filename,
- const LLUUID& asset_id,
- LLAssetType::EType type,
- LLStoreAssetCallback callback,
- void* user_data,
- bool temp_file = false,
- bool is_priority = false,
- bool user_waiting = false,
- F64Seconds timeout = LL_ASSET_STORAGE_TIMEOUT);
-
- /*
* TransactionID version
*/
virtual void storeAssetData(
@@ -398,23 +366,11 @@ public:
bool temp_file = false,
bool is_priority = false,
bool user_waiting = false,
- F64Seconds timeout = LL_ASSET_STORAGE_TIMEOUT);
+ F64Seconds timeout = LL_ASSET_STORAGE_TIMEOUT) = 0;
static void legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType, void *user_data, S32 status, LLExtStat ext_status);
static void legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status, LLExtStat ext_status);
- // Temp assets are stored on sim nodes, they have agent ID and location data associated with them.
- // This is a no-op for non-http asset systems
- virtual void addTempAssetData(const LLUUID& asset_id, const LLUUID& agent_id, const std::string& host_name);
- virtual BOOL hasTempAssetData(const LLUUID& texture_id) const;
- virtual std::string getTempAssetHostName(const LLUUID& texture_id) const;
- virtual LLUUID getTempAssetAgentID(const LLUUID& texture_id) const;
- virtual void removeTempAssetData(const LLUUID& asset_id);
- virtual void removeTempAssetDataByAgentID(const LLUUID& agent_id);
- // Pass LLUUID::null for all
- virtual void dumpTempAssetData(const LLUUID& avatar_id) const;
- virtual void clearTempAssetData();
-
// add extra methods to handle metadata
protected:
@@ -424,7 +380,7 @@ protected:
virtual void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type,
void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
void *user_data, BOOL duplicate,
- BOOL is_priority);
+ BOOL is_priority) = 0;
private:
void _init(LLMessageSystem *msg,