summaryrefslogtreecommitdiff
path: root/indra/llmessage/llassetstorage.h
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-02-11 01:50:31 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-02-11 01:50:31 +0200
commit1a0c8c20e73e8ad157ba7a576c1afd7da22ebf9f (patch)
treec2555d86051301bf84e036331a5ffa955a1ba56a /indra/llmessage/llassetstorage.h
parent89c42e0f3c66ccdcf840c11e9aad969d3116be27 (diff)
parent58bb4116dbe4a8afd5df1a7d8db074b0a43fc8f8 (diff)
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/llmessage/llassetstorage.h')
-rwxr-xr-xindra/llmessage/llassetstorage.h112
1 files changed, 45 insertions, 67 deletions
diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h
index 1bb4acea9e..8a4d41565f 100755
--- a/indra/llmessage/llassetstorage.h
+++ b/indra/llmessage/llassetstorage.h
@@ -92,38 +92,52 @@ public:
};
-class LLAssetRequest
+class LLBaseDownloadRequest
{
public:
- LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType at);
- virtual ~LLAssetRequest();
-
- LLUUID getUUID() const { return mUUID; }
- LLAssetType::EType getType() const { return mType; }
+ LLBaseDownloadRequest(const LLUUID &uuid, const LLAssetType::EType at);
+ virtual ~LLBaseDownloadRequest();
+
+ LLUUID getUUID() const { return mUUID; }
+ LLAssetType::EType getType() const { return mType; }
+
+ void setUUID(const LLUUID& id) { mUUID = id; }
+ void setType(LLAssetType::EType type) { mType = type; }
- void setUUID(const LLUUID& id) { mUUID = id; }
- void setType(LLAssetType::EType type) { mType = type; }
- void setTimeout (F64Seconds timeout) { mTimeout = timeout; }
+ virtual LLBaseDownloadRequest* getCopy();
protected:
- LLUUID mUUID;
- LLAssetType::EType mType;
+ LLUUID mUUID;
+ LLAssetType::EType mType;
+
+public:
+ void(*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
+
+ void *mUserData;
+ LLHost mHost;
+ BOOL mIsTemp;
+ F64Seconds mTime; // Message system time
+ BOOL mIsPriority;
+ BOOL mDataSentInFirstPacket;
+ BOOL mDataIsInVFS;
+};
+class LLAssetRequest : public LLBaseDownloadRequest
+{
public:
- void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
+ LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType at);
+ virtual ~LLAssetRequest();
+
+ void setTimeout(F64Seconds timeout) { mTimeout = timeout; }
+
+ virtual LLBaseDownloadRequest* getCopy();
+
void (*mUpCallback)(const LLUUID&, void *, S32, LLExtStat);
void (*mInfoCallback)(LLAssetInfo *, void *, S32);
- void *mUserData;
- LLHost mHost;
- BOOL mIsTemp;
BOOL mIsLocal;
BOOL mIsUserWaiting; // We don't want to try forever if a user is waiting for a result.
- F64Seconds mTime; // Message system time
F64Seconds mTimeout; // Amount of time before timing out.
- BOOL mIsPriority;
- BOOL mDataSentInFirstPacket;
- BOOL mDataIsInVFS;
LLUUID mRequestingAgentID; // Only valid for uploads from an agent
virtual LLSD getTerseDetails() const;
@@ -141,63 +155,27 @@ struct ll_asset_request_equal : public std::equal_to<T>
};
-class LLInvItemRequest
+class LLInvItemRequest : public LLBaseDownloadRequest
{
public:
- LLInvItemRequest(const LLUUID &uuid, const LLAssetType::EType at);
- virtual ~LLInvItemRequest();
-
- LLUUID getUUID() const { return mUUID; }
- LLAssetType::EType getType() const { return mType; }
-
- void setUUID(const LLUUID& id) { mUUID = id; }
- void setType(LLAssetType::EType type) { mType = type; }
-
-protected:
- LLUUID mUUID;
- LLAssetType::EType mType;
-
-public:
- void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
-
- void *mUserData;
- LLHost mHost;
- BOOL mIsTemp;
- F64Seconds mTime; // Message system time
- BOOL mIsPriority;
- BOOL mDataSentInFirstPacket;
- BOOL mDataIsInVFS;
+ LLInvItemRequest(const LLUUID &uuid, const LLAssetType::EType at);
+ virtual ~LLInvItemRequest();
+ virtual LLBaseDownloadRequest* getCopy();
};
-class LLEstateAssetRequest
+class LLEstateAssetRequest : public LLBaseDownloadRequest
{
public:
- LLEstateAssetRequest(const LLUUID &uuid, const LLAssetType::EType at, EstateAssetType et);
- virtual ~LLEstateAssetRequest();
+ LLEstateAssetRequest(const LLUUID &uuid, const LLAssetType::EType at, EstateAssetType et);
+ virtual ~LLEstateAssetRequest();
- LLUUID getUUID() const { return mUUID; }
- LLAssetType::EType getAType() const { return mAType; }
+ LLAssetType::EType getAType() const { return mType; }
- void setUUID(const LLUUID& id) { mUUID = id; }
- void setType(LLAssetType::EType type) { mAType = type; }
+ virtual LLBaseDownloadRequest* getCopy();
protected:
- LLUUID mUUID;
- LLAssetType::EType mAType;
EstateAssetType mEstateAssetType;
-
-public:
- void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
-
- void *mUserData;
- LLHost mHost;
- BOOL mIsTemp;
- F64Seconds mTime; // Message system time
- BOOL mIsPriority;
- BOOL mDataSentInFirstPacket;
- BOOL mDataIsInVFS;
-
};
@@ -369,17 +347,17 @@ public:
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
- void* user_data, LLExtStat ext_status);
+ LLBaseDownloadRequest* user_data, LLExtStat ext_status);
static void downloadEstateAssetCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
- void* user_data, LLExtStat ext_status);
+ LLBaseDownloadRequest* user_data, LLExtStat ext_status);
static void downloadInvItemCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
- void* user_data, LLExtStat ext_status);
+ LLBaseDownloadRequest* user_data, LLExtStat ext_status);
// upload process callbacks
static void uploadCompleteCallback(const LLUUID&, void *user_data, S32 result, LLExtStat ext_status);