summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenufile.h
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-07-07 11:44:15 -0700
committerRider Linden <rider@lindenlab.com>2015-07-07 11:44:15 -0700
commitb34163be5e675de8d19d3f06c7ae99a14d4b5129 (patch)
treecc6a2509a4a5f844ede8958effd689a9d44c1be1 /indra/newview/llviewermenufile.h
parent247eb0c9c3418c10be8f2a0e3c8116758efa702f (diff)
parentd8c02a2838fc426e0e41868aa3b2f43925a14733 (diff)
Merge
Diffstat (limited to 'indra/newview/llviewermenufile.h')
-rwxr-xr-xindra/newview/llviewermenufile.h109
1 files changed, 83 insertions, 26 deletions
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 9bc4d5b041..7ee5043777 100755
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -45,31 +45,31 @@ public:
typedef boost::shared_ptr<NewResourceUploadInfo> ptr_t;
NewResourceUploadInfo(
- LLTransactionID transactId,
- LLAssetType::EType assetType,
- std::string name,
- std::string description,
- S32 compressionInfo,
- LLFolderType::EType destinationType,
- LLInventoryType::EType inventoryType,
- U32 nextOWnerPerms,
- U32 groupPerms,
- U32 everyonePerms,
- S32 expectedCost) :
- mTransactionId(transactId),
- mAssetType(assetType),
- mName(name),
- mDescription(description),
- mCompressionInfo(compressionInfo),
- mDestinationFolderType(destinationType),
- mInventoryType(inventoryType),
- mNextOwnerPerms(nextOWnerPerms),
- mGroupPerms(groupPerms),
- mEveryonePerms(everyonePerms),
- mExpectedUploadCost(expectedCost),
- mFolderId(LLUUID::null),
- mItemId(LLUUID::null),
- mAssetId(LLAssetID::null)
+ LLTransactionID transactId,
+ LLAssetType::EType assetType,
+ std::string name,
+ std::string description,
+ S32 compressionInfo,
+ LLFolderType::EType destinationType,
+ LLInventoryType::EType inventoryType,
+ U32 nextOWnerPerms,
+ U32 groupPerms,
+ U32 everyonePerms,
+ S32 expectedCost) :
+ mTransactionId(transactId),
+ mAssetType(assetType),
+ mName(name),
+ mDescription(description),
+ mCompressionInfo(compressionInfo),
+ mDestinationFolderType(destinationType),
+ mInventoryType(inventoryType),
+ mNextOwnerPerms(nextOWnerPerms),
+ mGroupPerms(groupPerms),
+ mEveryonePerms(everyonePerms),
+ mExpectedUploadCost(expectedCost),
+ mFolderId(LLUUID::null),
+ mItemId(LLUUID::null),
+ mAssetId(LLAssetID::null)
{ }
virtual ~NewResourceUploadInfo()
@@ -97,13 +97,42 @@ public:
U32 getEveryonePerms() const { return mEveryonePerms; };
S32 getExpectedUploadCost() const { return mExpectedUploadCost; };
- std::string getDisplayName() const;
+ virtual std::string getDisplayName() const;
LLUUID getFolderId() const { return mFolderId; }
LLUUID getItemId() const { return mItemId; }
LLAssetID getAssetId() const { return mAssetId; }
protected:
+ NewResourceUploadInfo(
+ std::string name,
+ std::string description,
+ S32 compressionInfo,
+ LLFolderType::EType destinationType,
+ LLInventoryType::EType inventoryType,
+ U32 nextOWnerPerms,
+ U32 groupPerms,
+ U32 everyonePerms,
+ S32 expectedCost) :
+ mName(name),
+ mDescription(description),
+ mCompressionInfo(compressionInfo),
+ mDestinationFolderType(destinationType),
+ mInventoryType(inventoryType),
+ mNextOwnerPerms(nextOWnerPerms),
+ mGroupPerms(groupPerms),
+ mEveryonePerms(everyonePerms),
+ mExpectedUploadCost(expectedCost),
+ mTransactionId(),
+ mAssetType(LLAssetType::AT_NONE),
+ mFolderId(LLUUID::null),
+ mItemId(LLUUID::null),
+ mAssetId(LLAssetID::null)
+ { }
+
+ void setTransactionId(LLTransactionID tid) { mTransactionId = tid; }
+ void setAssetType(LLAssetType::EType assetType) { mAssetType = assetType; }
+
LLAssetID generateNewAssetId();
void incrementUploadStats() const;
virtual void assignDefaults();
@@ -126,6 +155,34 @@ private:
LLAssetID mAssetId;
};
+class NewFileResourceUploadInfo : public NewResourceUploadInfo
+{
+public:
+ NewFileResourceUploadInfo(
+ std::string fileName,
+ std::string name,
+ std::string description,
+ S32 compressionInfo,
+ LLFolderType::EType destinationType,
+ LLInventoryType::EType inventoryType,
+ U32 nextOWnerPerms,
+ U32 groupPerms,
+ U32 everyonePerms,
+ S32 expectedCost);
+
+ virtual LLSD prepareUpload();
+
+ std::string getFileName() const { return mFileName; };
+
+protected:
+
+ virtual LLSD exportTempFile();
+
+private:
+ std::string mFileName;
+
+};
+
LLUUID upload_new_resource(
const std::string& src_filename,