summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/llassetstorage.cpp28
-rw-r--r--indra/llmessage/llcorehttputil.cpp4
-rw-r--r--indra/llmessage/lltransfersourceasset.cpp6
-rw-r--r--indra/llmessage/lltransfersourceasset.h2
-rw-r--r--indra/llmessage/lltransfertargetvfile.cpp8
-rw-r--r--indra/llmessage/lltransfertargetvfile.h4
-rw-r--r--indra/llmessage/llxfer_vfile.cpp22
-rw-r--r--indra/llmessage/llxfer_vfile.h4
8 files changed, 39 insertions, 39 deletions
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index be5d00d4c9..31c1edd75e 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -42,7 +42,7 @@
// this library includes
#include "message.h"
#include "llxfermanager.h"
-#include "llvfile.h"
+#include "lldiskcache.h"
#include "lldbstrings.h"
#include "lltransfersourceasset.h"
@@ -438,7 +438,7 @@ void LLAssetStorage::_cleanupRequests(BOOL all, S32 error)
BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType type)
{
- return LLVFile::getExists(uuid, type);
+ return LLDiskCache::getExists(uuid, type);
}
bool LLAssetStorage::findInCacheAndInvokeCallback(const LLUUID& uuid, LLAssetType::EType type,
@@ -450,10 +450,10 @@ bool LLAssetStorage::findInCacheAndInvokeCallback(const LLUUID& uuid, LLAssetTyp
llassert(callback != NULL);
}
- BOOL exists = LLVFile::getExists(uuid, type);
+ BOOL exists = LLDiskCache::getExists(uuid, type);
if (exists)
{
- LLVFile file(uuid, type);
+ LLDiskCache file(uuid, type);
U32 size = file.getSize();
if (size > 0)
{
@@ -523,8 +523,8 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,
return;
}
- BOOL exists = LLVFile::getExists(uuid, type);
- LLVFile file(uuid, type);
+ BOOL exists = LLDiskCache::getExists(uuid, type);
+ LLDiskCache file(uuid, type);
U32 size = exists ? file.getSize() : 0;
if (size > 0)
@@ -664,7 +664,7 @@ void LLAssetStorage::downloadCompleteCallback(
if (LL_ERR_NOERR == result)
{
// we might have gotten a zero-size file
- LLVFile vfile(callback_id, callback_type);
+ LLDiskCache vfile(callback_id, callback_type);
if (vfile.getSize() <= 0)
{
LL_WARNS("AssetStorage") << "downloadCompleteCallback has non-existent or zero-size asset " << callback_id << LL_ENDL;
@@ -724,8 +724,8 @@ void LLAssetStorage::getEstateAsset(
return;
}
- BOOL exists = LLVFile::getExists(asset_id, atype);
- LLVFile file(asset_id, atype);
+ BOOL exists = LLDiskCache::getExists(asset_id, atype);
+ LLDiskCache file(asset_id, atype);
U32 size = exists ? file.getSize() : 0;
if (size > 0)
@@ -818,7 +818,7 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback(
if (LL_ERR_NOERR == result)
{
// we might have gotten a zero-size file
- LLVFile vfile(req->getUUID(), req->getAType());
+ LLDiskCache vfile(req->getUUID(), req->getAType());
if (vfile.getSize() <= 0)
{
LL_WARNS("AssetStorage") << "downloadCompleteCallback has non-existent or zero-size asset!" << LL_ENDL;
@@ -860,8 +860,8 @@ void LLAssetStorage::getInvItemAsset(
return;
}
- exists = LLVFile::getExists(asset_id, atype);
- LLVFile file(asset_id, atype);
+ exists = LLDiskCache::getExists(asset_id, atype);
+ LLDiskCache file(asset_id, atype);
size = exists ? file.getSize() : 0;
if(exists && size < 1)
{
@@ -961,7 +961,7 @@ void LLAssetStorage::downloadInvItemCompleteCallback(
if (LL_ERR_NOERR == result)
{
// we might have gotten a zero-size file
- LLVFile vfile(req->getUUID(), req->getType());
+ LLDiskCache vfile(req->getUUID(), req->getType());
if (vfile.getSize() <= 0)
{
LL_WARNS("AssetStorage") << "downloadCompleteCallback has non-existent or zero-size asset!" << LL_ENDL;
@@ -1396,7 +1396,7 @@ void LLAssetStorage::legacyGetDataCallback(const LLUUID &uuid,
if ( !status
&& !toxic )
{
- LLVFile file(uuid, type);
+ LLDiskCache file(uuid, type);
std::string uuid_str;
diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp
index c931a89b5b..376558400c 100644
--- a/indra/llmessage/llcorehttputil.cpp
+++ b/indra/llmessage/llcorehttputil.cpp
@@ -37,7 +37,7 @@
#include "llsdserialize.h"
#include "reader.h" // JSON
#include "writer.h" // JSON
-#include "llvfile.h"
+#include "lldiskcache.h"
#include "message.h" // for getting the port
@@ -784,7 +784,7 @@ LLSD HttpCoroutineAdapter::postFileAndSuspend(LLCore::HttpRequest::ptr_t request
// scoping for our streams so that they go away when we no longer need them.
{
LLCore::BufferArrayStream outs(fileData.get());
- LLVFile vfile(assetId, assetType, LLVFile::READ);
+ LLDiskCache vfile(assetId, assetType, LLDiskCache::READ);
S32 fileSize = vfile.getSize();
U8* fileBuffer;
diff --git a/indra/llmessage/lltransfersourceasset.cpp b/indra/llmessage/lltransfersourceasset.cpp
index 0156d1a5ef..7b00a95b00 100644
--- a/indra/llmessage/lltransfersourceasset.cpp
+++ b/indra/llmessage/lltransfersourceasset.cpp
@@ -32,7 +32,7 @@
#include "message.h"
#include "lldatapacker.h"
#include "lldir.h"
-#include "llvfile.h"
+#include "lldiskcache.h"
LLTransferSourceAsset::LLTransferSourceAsset(const LLUUID &request_id, const F32 priority) :
LLTransferSource(LLTST_ASSET, request_id, priority),
@@ -99,7 +99,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id,
return LLTS_SKIP;
}
- LLVFile vf(mParams.getAssetID(), mParams.getAssetType(), LLVFile::READ);
+ LLDiskCache vf(mParams.getAssetID(), mParams.getAssetType(), LLDiskCache::READ);
if (!vf.getSize())
{
@@ -198,7 +198,7 @@ void LLTransferSourceAsset::responderCallback(const LLUUID& uuid, LLAssetType::E
if (LL_ERR_NOERR == result)
{
// Everything's OK.
- LLVFile vf(uuid, type, LLVFile::READ);
+ LLDiskCache vf(uuid, type, LLDiskCache::READ);
tsap->mSize = vf.getSize();
status = LLTS_OK;
}
diff --git a/indra/llmessage/lltransfersourceasset.h b/indra/llmessage/lltransfersourceasset.h
index 2c798d0598..d9055202ec 100644
--- a/indra/llmessage/lltransfersourceasset.h
+++ b/indra/llmessage/lltransfersourceasset.h
@@ -30,7 +30,7 @@
#include "lltransfermanager.h"
#include "llassetstorage.h"
-class LLVFile;
+class LLDiskCache;
class LLTransferSourceParamsAsset : public LLTransferSourceParams
{
diff --git a/indra/llmessage/lltransfertargetvfile.cpp b/indra/llmessage/lltransfertargetvfile.cpp
index f2e0232a05..f4a5e71d08 100644
--- a/indra/llmessage/lltransfertargetvfile.cpp
+++ b/indra/llmessage/lltransfertargetvfile.cpp
@@ -30,7 +30,7 @@
#include "lldatapacker.h"
#include "llerror.h"
-#include "llvfile.h"
+#include "lldiskcache.h"
//static
void LLTransferTargetVFile::updateQueue(bool shutdown)
@@ -138,7 +138,7 @@ LLTSCode LLTransferTargetVFile::dataCallback(const S32 packet_id, U8 *in_datap,
//LL_INFOS() << "LLTransferTargetFile::dataCallback" << LL_ENDL;
//LL_INFOS() << "Packet: " << packet_id << LL_ENDL;
- LLVFile vf(mTempID, mParams.getAssetType(), LLVFile::APPEND);
+ LLDiskCache vf(mTempID, mParams.getAssetType(), LLDiskCache::APPEND);
if (mNeedsCreate)
{
vf.setMaxSize(mSize);
@@ -176,7 +176,7 @@ void LLTransferTargetVFile::completionCallback(const LLTSCode status)
case LLTS_DONE:
if (!mNeedsCreate)
{
- LLVFile file(mTempID, mParams.getAssetType(), LLVFile::WRITE);
+ LLDiskCache file(mTempID, mParams.getAssetType(), LLDiskCache::WRITE);
if (!file.rename(mParams.getAssetID(), mParams.getAssetType()))
{
LL_ERRS() << "LLTransferTargetVFile: rename failed" << LL_ENDL;
@@ -195,7 +195,7 @@ void LLTransferTargetVFile::completionCallback(const LLTSCode status)
{
// We're aborting this transfer, we don't want to keep this file.
LL_WARNS() << "Aborting vfile transfer for " << mParams.getAssetID() << LL_ENDL;
- LLVFile vf(mTempID, mParams.getAssetType(), LLVFile::APPEND);
+ LLDiskCache vf(mTempID, mParams.getAssetType(), LLDiskCache::APPEND);
vf.remove();
}
break;
diff --git a/indra/llmessage/lltransfertargetvfile.h b/indra/llmessage/lltransfertargetvfile.h
index c819c1e2f2..4c1bfe22c5 100644
--- a/indra/llmessage/lltransfertargetvfile.h
+++ b/indra/llmessage/lltransfertargetvfile.h
@@ -29,9 +29,9 @@
#include "lltransfermanager.h"
#include "llassetstorage.h"
-#include "llvfile.h"
+#include "lldiskcache.h"
-class LLVFile;
+class LLDiskCache;
// Lame, an S32 for now until I figure out the deal with how we want to do
// error codes.
diff --git a/indra/llmessage/llxfer_vfile.cpp b/indra/llmessage/llxfer_vfile.cpp
index 0835970cfc..95629d5fea 100644
--- a/indra/llmessage/llxfer_vfile.cpp
+++ b/indra/llmessage/llxfer_vfile.cpp
@@ -30,7 +30,7 @@
#include "lluuid.h"
#include "llerror.h"
#include "llmath.h"
-#include "llvfile.h"
+#include "lldiskcache.h"
#include "lldir.h"
// size of chunks read from/written to disk
@@ -79,9 +79,9 @@ void LLXfer_VFile::cleanup ()
if (mTempID.notNull() &&
mDeleteTempFile)
{
- if (LLVFile::getExists(mTempID, mType))
+ if (LLDiskCache::getExists(mTempID, mType))
{
- LLVFile file(mTempID, mType, LLVFile::WRITE);
+ LLDiskCache file(mTempID, mType, LLDiskCache::WRITE);
file.remove();
}
else
@@ -187,9 +187,9 @@ S32 LLXfer_VFile::startSend (U64 xfer_id, const LLHost &remote_host)
delete mVFile;
mVFile = NULL;
- if(LLVFile::getExists(mLocalID, mType))
+ if(LLDiskCache::getExists(mLocalID, mType))
{
- mVFile = new LLVFile(mLocalID, mType, LLVFile::READ);
+ mVFile = new LLDiskCache(mLocalID, mType, LLDiskCache::READ);
if (mVFile->getSize() <= 0)
{
@@ -235,9 +235,9 @@ S32 LLXfer_VFile::reopenFileHandle()
if (mVFile == NULL)
{
- if (LLVFile::getExists(mLocalID, mType))
+ if (LLDiskCache::getExists(mLocalID, mType))
{
- mVFile = new LLVFile(mLocalID, mType, LLVFile::READ);
+ mVFile = new LLDiskCache(mLocalID, mType, LLDiskCache::READ);
}
else
{
@@ -260,7 +260,7 @@ void LLXfer_VFile::setXferSize (S32 xfer_size)
// It would be nice if LLXFers could tell which end of the pipe they were
if (! mVFile)
{
- LLVFile file(mTempID, mType, LLVFile::APPEND);
+ LLDiskCache file(mTempID, mType, LLDiskCache::APPEND);
file.setMaxSize(xfer_size);
}
}
@@ -315,7 +315,7 @@ S32 LLXfer_VFile::flush()
S32 retval = 0;
if (mBufferLength)
{
- LLVFile file(mTempID, mType, LLVFile::APPEND);
+ LLDiskCache file(mTempID, mType, LLDiskCache::APPEND);
file.write((U8*)mBuffer, mBufferLength);
@@ -335,9 +335,9 @@ S32 LLXfer_VFile::processEOF()
if (!mCallbackResult)
{
- if (LLVFile::getExists(mTempID, mType))
+ if (LLDiskCache::getExists(mTempID, mType))
{
- LLVFile file(mTempID, mType, LLVFile::WRITE);
+ LLDiskCache file(mTempID, mType, LLDiskCache::WRITE);
if (!file.rename(mLocalID, mType))
{
LL_WARNS("Xfer") << "Cache rename of temp file failed: unable to rename " << mTempID << " to " << mLocalID << LL_ENDL;
diff --git a/indra/llmessage/llxfer_vfile.h b/indra/llmessage/llxfer_vfile.h
index d830c4be96..d6ac6ff818 100644
--- a/indra/llmessage/llxfer_vfile.h
+++ b/indra/llmessage/llxfer_vfile.h
@@ -30,7 +30,7 @@
#include "llxfer.h"
#include "llassetstorage.h"
-class LLVFile;
+class LLDiskCache;
class LLXfer_VFile : public LLXfer
{
@@ -40,7 +40,7 @@ class LLXfer_VFile : public LLXfer
LLUUID mTempID;
LLAssetType::EType mType;
- LLVFile *mVFile;
+ LLDiskCache *mVFile;
std::string mName;