diff options
author | Rider Linden <rider@lindenlab.com> | 2016-03-17 13:14:21 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2016-03-17 13:14:21 -0700 |
commit | b8c1976460374e743743728ef49b38ad52c453a4 (patch) | |
tree | 4f340d954ae3552d4dbb87b389d15d98d66eba51 /indra/llmessage/llassetstorage.h | |
parent | 7a0fb4fece5a92627caa08622e9584a903a3fa1d (diff) | |
parent | 4aae7b51616c0963af4668442bdb5bfaba8c5044 (diff) |
Merge
Diffstat (limited to 'indra/llmessage/llassetstorage.h')
-rwxr-xr-x | indra/llmessage/llassetstorage.h | 112 |
1 files changed, 45 insertions, 67 deletions
diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index c3d31ba84c..4be677a4b0 100755 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -91,38 +91,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; @@ -140,63 +154,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; - }; @@ -368,17 +346,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); |