#include <llxfer_file.h>
Inheritance diagram for LLXfer_File:
Public Member Functions | |
LLXfer_File (S32 chunk_size) | |
LLXfer_File (const LLString &local_filename, BOOL delete_local_on_completion, S32 chunk_size) | |
virtual | ~LLXfer_File () |
virtual void | init (const LLString &local_filename, BOOL delete_local_on_completion, S32 chunk_size) |
virtual void | free () |
virtual S32 | initializeRequest (U64 xfer_id, const LLString &local_filename, const LLString &remote_filename, ELLPath remote_path, const LLHost &remote_host, BOOL delete_remote_on_completion, void(*callback)(void **, S32, LLExtStat), void **user_data) |
virtual S32 | startDownload () |
virtual S32 | processEOF () |
virtual S32 | startSend (U64 xfer_id, const LLHost &remote_host) |
virtual S32 | suck (S32 start_position) |
virtual S32 | flush () |
virtual BOOL | matchesLocalFilename (const LLString &filename) |
virtual BOOL | matchesRemoteFilename (const LLString &filename, ELLPath remote_path) |
virtual S32 | getMaxBufferSize () |
virtual U32 | getXferTypeTag () |
virtual const char * | getName () |
Protected Attributes | |
FILE * | mFp |
char | mLocalFilename [LL_MAX_PATH] |
char | mRemoteFilename [LL_MAX_PATH] |
ELLPath | mRemotePath |
char | mTempFilename [LL_MAX_PATH] |
BOOL | mDeleteLocalOnCompletion |
BOOL | mDeleteRemoteOnCompletion |
Definition at line 38 of file llxfer_file.h.
LLXfer_File::LLXfer_File | ( | S32 | chunk_size | ) |
Definition at line 54 of file llxfer_file.cpp.
References FALSE, init(), and LLStringBase< char >::null.
LLXfer_File::~LLXfer_File | ( | ) | [virtual] |
S32 LLXfer_File::flush | ( | ) | [virtual] |
Reimplemented from LLXfer.
Definition at line 282 of file llxfer_file.cpp.
References LLFile::fopen(), LL_ERR_CANNOT_OPEN_FILE, llendl, llerrs, llwarns, LLXfer::mBuffer, LLXfer::mBufferLength, mFp, mTempFilename, NULL, and S32.
Referenced by processEOF().
void LLXfer_File::free | ( | ) | [virtual] |
Reimplemented from LLXfer.
Definition at line 98 of file llxfer_file.cpp.
References LLXfer::free(), lldebugs, llendl, mDeleteLocalOnCompletion, mFp, mLocalFilename, mTempFilename, NULL, and LLFile::remove().
Referenced by ~LLXfer_File().
S32 LLXfer_File::getMaxBufferSize | ( | ) | [virtual] |
Reimplemented from LLXfer.
Definition at line 244 of file llxfer_file.cpp.
References LL_MAX_XFER_FILE_BUFFER.
const char * LLXfer_File::getName | ( | ) | [virtual] |
Reimplemented from LLXfer.
Definition at line 402 of file llxfer_file.cpp.
References mLocalFilename.
U32 LLXfer_File::getXferTypeTag | ( | ) | [virtual] |
Reimplemented from LLXfer.
Definition at line 411 of file llxfer_file.cpp.
References LLXfer::XFER_FILE.
void LLXfer_File::init | ( | const LLString & | local_filename, | |
BOOL | delete_local_on_completion, | |||
S32 | chunk_size | |||
) | [virtual] |
Definition at line 75 of file llxfer_file.cpp.
References FALSE, LL_MAX_PATH, LL_PATH_NONE, mDeleteLocalOnCompletion, mDeleteRemoteOnCompletion, mFp, mLocalFilename, mRemoteFilename, mRemotePath, mTempFilename, and NULL.
Referenced by LLXfer_File().
S32 LLXfer_File::initializeRequest | ( | U64 | xfer_id, | |
const LLString & | local_filename, | |||
const LLString & | remote_filename, | |||
ELLPath | remote_path, | |||
const LLHost & | remote_host, | |||
BOOL | delete_remote_on_completion, | |||
void(*)(void **, S32, LLExtStat) | callback, | |||
void ** | user_data | |||
) | [virtual] |
Definition at line 123 of file llxfer_file.cpp.
References e_LL_XFER_PENDING, gDirUtilp, LLDir::getTempFilename(), LL_ERR_NOERR, LL_MAX_PATH, LL_MAX_XFER_FILE_BUFFER, llendl, llinfos, LLXfer::mBuffer, LLXfer::mBufferLength, LLXfer::mCallback, LLXfer::mCallbackDataHandle, LLXfer::mCallbackResult, mDeleteRemoteOnCompletion, LLXfer::mID, mLocalFilename, LLXfer::mPacketNum, mRemoteFilename, LLXfer::mRemoteHost, mRemotePath, LLXfer::mStatus, mTempFilename, NULL, and S32.
S32 LLXfer_File::processEOF | ( | ) | [virtual] |
Reimplemented from LLXfer.
Definition at line 317 of file llxfer_file.cpp.
References copy_file(), e_LL_XFER_COMPLETE, flush(), llendl, llinfos, llwarns, LLXfer::mCallbackResult, mFp, mLocalFilename, LLXfer::mStatus, mTempFilename, NULL, LLXfer::processEOF(), LLFile::remove(), LLFile::rename(), and S32.
S32 LLXfer_File::startDownload | ( | ) | [virtual] |
Reimplemented from LLXfer.
Definition at line 168 of file llxfer_file.cpp.
References _PREHASH_Filename, _PREHASH_ID, _PREHASH_RequestXfer, _PREHASH_VFileID, _PREHASH_VFileType, _PREHASH_XferID, LLMessageSystem::addBOOL(), LLMessageSystem::addS16Fast(), LLMessageSystem::addStringFast(), LLMessageSystem::addU64Fast(), LLMessageSystem::addU8(), LLMessageSystem::addUUIDFast(), e_LL_XFER_IN_PROGRESS, LLFile::fopen(), gMessageSystem, LL_XFER_LARGE_PAYLOAD, llendl, llwarns, LLXfer::mChunkSize, mDeleteRemoteOnCompletion, mFp, LLXfer::mID, mRemoteFilename, LLXfer::mRemoteHost, mRemotePath, LLXfer::mStatus, mTempFilename, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLUUID::null, NULL, S32, and LLMessageSystem::sendReliable().
Reimplemented from LLXfer.
Definition at line 201 of file llxfer_file.cpp.
References e_LL_XFER_PENDING, LLFile::fopen(), LL_ERR_FILE_EMPTY, LL_ERR_FILE_NOT_FOUND, LL_ERR_NOERR, LL_MAX_XFER_FILE_BUFFER, llendl, llinfos, LLXfer::mBuffer, LLXfer::mBufferLength, LLXfer::mBufferStartOffset, mFp, LLXfer::mID, mLocalFilename, LLXfer::mPacketNum, LLXfer::mRemoteHost, LLXfer::mStatus, S32, and LLXfer::setXferSize().
Reimplemented from LLXfer.
Definition at line 251 of file llxfer_file.cpp.
References FALSE, LL_MAX_XFER_FILE_BUFFER, LLXfer::mBuffer, LLXfer::mBufferContainsEOF, LLXfer::mBufferLength, LLXfer::mBufferStartOffset, mFp, S32, and TRUE.
BOOL LLXfer_File::mDeleteLocalOnCompletion [protected] |
BOOL LLXfer_File::mDeleteRemoteOnCompletion [protected] |
Definition at line 48 of file llxfer_file.h.
Referenced by init(), initializeRequest(), and startDownload().
FILE* LLXfer_File::mFp [protected] |
Definition at line 41 of file llxfer_file.h.
Referenced by flush(), free(), init(), processEOF(), startDownload(), startSend(), and suck().
char LLXfer_File::mLocalFilename[LL_MAX_PATH] [protected] |
Definition at line 42 of file llxfer_file.h.
Referenced by free(), getName(), init(), initializeRequest(), matchesLocalFilename(), processEOF(), and startSend().
char LLXfer_File::mRemoteFilename[LL_MAX_PATH] [protected] |
Definition at line 43 of file llxfer_file.h.
Referenced by init(), initializeRequest(), matchesRemoteFilename(), and startDownload().
ELLPath LLXfer_File::mRemotePath [protected] |
Definition at line 44 of file llxfer_file.h.
Referenced by init(), initializeRequest(), matchesRemoteFilename(), and startDownload().
char LLXfer_File::mTempFilename[LL_MAX_PATH] [protected] |
Definition at line 45 of file llxfer_file.h.
Referenced by flush(), free(), init(), initializeRequest(), processEOF(), and startDownload().