diff options
author | Eric Tulla <tulla@lindenlab.com> | 2009-03-05 00:29:27 +0000 |
---|---|---|
committer | Eric Tulla <tulla@lindenlab.com> | 2009-03-05 00:29:27 +0000 |
commit | 6db6d81b0a90fe7b48a3ccf64ba768e5772397c8 (patch) | |
tree | c3b9f11fbbfa29cd23b7de22543fd80285ad810d /indra/newview/llassetuploadresponders.cpp | |
parent | c0af95e18c57a7e0578df780697042f8a6221431 (diff) |
Merging in Avatar Pipeline work for Viewer 1.23 (QAR-1272).
No conflicts in the merge.
Result of:
svn merge -r113372:113479 $branches/avatar-pipeline/avatar-pipeline-merge-r113370 .
Diffstat (limited to 'indra/newview/llassetuploadresponders.cpp')
-rw-r--r-- | indra/newview/llassetuploadresponders.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 9dd0668787..481a6ceb26 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -56,6 +56,7 @@ #include "llviewerobjectlist.h" #include "llviewermenufile.h" #include "llviewerwindow.h" +#include "lltexlayer.h" // When uploading multiple files, don't display any of them when uploading more than this number. static const S32 FILE_COUNT_DISPLAY_THRESHOLD = 5; @@ -139,6 +140,7 @@ void LLAssetUploadResponder::result(const LLSD& content) if (mFileName.empty()) { // rename the file in the VFS to the actual asset id + // llinfos << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << llendl; gVFS->renameFile(mVFileID, mAssetType, content["new_asset"].asUUID(), mAssetType); } uploadComplete(content); @@ -332,6 +334,48 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) } } +LLSendTexLayerResponder::LLSendTexLayerResponder(const LLSD& post_data, + const LLUUID& vfile_id, + LLAssetType::EType asset_type, + LLBakedUploadData * baked_upload_data) + : LLAssetUploadResponder(post_data, vfile_id, asset_type), + mBakedUploadData(baked_upload_data) +{ +} + +LLSendTexLayerResponder::~LLSendTexLayerResponder() +{ + // mBakedUploadData is normally deleted by calls to LLTexLayerSetBuffer::onTextureUploadComplete() below + if (mBakedUploadData) + { // ...but delete it in the case where uploadComplete() is never called + delete mBakedUploadData; + mBakedUploadData = NULL; + } +} + + +// Baked texture upload completed +void LLSendTexLayerResponder::uploadComplete(const LLSD& content) +{ + LLUUID item_id = mPostData["item_id"]; + + std::string result = content["state"]; + LLUUID new_id = content["new_asset"]; + + llinfos << "LLSendTexLayerResponder::result from capabilities: " << result << llendl; + if (result == "complete" + && mBakedUploadData != NULL) + { // Invoke + LLTexLayerSetBuffer::onTextureUploadComplete(new_id, (void*) mBakedUploadData, 0, LL_EXSTAT_NONE); + mBakedUploadData = NULL; // deleted in onTextureUploadComplete() + } + else + { // Invoke the original callback with an error result + LLTexLayerSetBuffer::onTextureUploadComplete(new_id, (void*) mBakedUploadData, -1, LL_EXSTAT_NONE); + mBakedUploadData = NULL; // deleted in onTextureUploadComplete() + } +} + LLUpdateAgentInventoryResponder::LLUpdateAgentInventoryResponder(const LLSD& post_data, const LLUUID& vfile_id, |