summaryrefslogtreecommitdiff
path: root/indra/llmessage/llassetstorage.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage/llassetstorage.h')
-rw-r--r--indra/llmessage/llassetstorage.h105
1 files changed, 27 insertions, 78 deletions
diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h
index 0f23754096..853387a595 100644
--- a/indra/llmessage/llassetstorage.h
+++ b/indra/llmessage/llassetstorage.h
@@ -186,18 +186,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 +231,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 +250,9 @@ 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();
+ 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 +277,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,17 +306,17 @@ 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);
// download process callbacks
@@ -370,23 +344,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 +359,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 +373,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,