LLHTTPAssetRequest Class Reference

Inheritance diagram for LLHTTPAssetRequest:

Inheritance graph
[legend]
Collaboration diagram for LLHTTPAssetRequest:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLHTTPAssetRequest (LLHTTPAssetStorage *asp, const LLUUID &uuid, LLAssetType::EType type, LLAssetStorage::ERequestType rt, const char *url, CURLM *curl_multi)
virtual ~LLHTTPAssetRequest ()
void setupCurlHandle ()
void cleanupCurlHandle ()
void prepareCompressedUpload ()
void finishCompressedUpload ()
size_t readCompressedData (void *data, size_t size)
virtual LLSD getTerseDetails () const
virtual LLSD getFullDetails () const

Static Public Member Functions

static size_t curlCompressedUploadCallback (void *data, size_t size, size_t nmemb, void *user_data)

Public Attributes

LLHTTPAssetStoragemAssetStoragep
CURL * mCurlHandle
CURLM * mCurlMultiHandle
char * mURLBuffer
curl_slist * mHTTPHeaders
LLVFilemVFile
LLUUID mTmpUUID
LLAssetStorage::ERequestType mRequestType
bool mZInitialized
z_stream mZStream
char * mZInputBuffer
bool mZInputExhausted
FILE * mFP

Detailed Description

Definition at line 80 of file llhttpassetstorage.cpp.


Constructor & Destructor Documentation

LLHTTPAssetRequest::LLHTTPAssetRequest ( LLHTTPAssetStorage asp,
const LLUUID uuid,
LLAssetType::EType  type,
LLAssetStorage::ERequestType  rt,
const char *  url,
CURLM *  curl_multi 
)

Definition at line 121 of file llhttpassetstorage.cpp.

References mAssetStoragep, mCurlHandle, mCurlMultiHandle, mFP, mHTTPHeaders, mRequestType, mURLBuffer, mVFile, mZInputBuffer, mZInputExhausted, and NULL.

LLHTTPAssetRequest::~LLHTTPAssetRequest (  )  [virtual]

Definition at line 147 of file llhttpassetstorage.cpp.

References cleanupCurlHandle(), finishCompressedUpload(), mCurlHandle, mCurlMultiHandle, mHTTPHeaders, mURLBuffer, and mVFile.


Member Function Documentation

void LLHTTPAssetRequest::cleanupCurlHandle (  ) 

Definition at line 278 of file llhttpassetstorage.cpp.

References llendl, llerrs, mAssetStoragep, mCurlHandle, mRequestType, NULL, and LLHTTPAssetStorage::removeRunningRequest().

Referenced by LLHTTPAssetStorage::checkForTimeouts(), and ~LLHTTPAssetRequest().

size_t LLHTTPAssetRequest::curlCompressedUploadCallback ( void data,
size_t  size,
size_t  nmemb,
void user_data 
) [static]

Definition at line 375 of file llhttpassetstorage.cpp.

References gAssetStorage, NULL, and readCompressedData().

Referenced by LLHTTPAssetStorage::checkForTimeouts().

void LLHTTPAssetRequest::finishCompressedUpload (  ) 

Definition at line 321 of file llhttpassetstorage.cpp.

References llendl, llinfos, mZInitialized, mZInputBuffer, and mZStream.

Referenced by ~LLHTTPAssetRequest().

LLSD LLHTTPAssetRequest::getFullDetails (  )  const [virtual]

Reimplemented from LLAssetRequest.

Definition at line 175 of file llhttpassetstorage.cpp.

References LLAssetRequest::getFullDetails(), LLAssetStorage::getRequestName(), mCurlHandle, mFP, mRequestType, mTmpUUID, mZInitialized, mZInputExhausted, NULL, S32, and tut::sd().

LLSD LLHTTPAssetRequest::getTerseDetails (  )  const [virtual]

Reimplemented from LLAssetRequest.

Definition at line 165 of file llhttpassetstorage.cpp.

References LLAssetRequest::getTerseDetails(), mURLBuffer, and tut::sd().

void LLHTTPAssetRequest::prepareCompressedUpload (  ) 

Definition at line 293 of file llhttpassetstorage.cpp.

References COMPRESSED_INPUT_BUFFER_SIZE, gAssetStorage, LLAssetRequest::getType(), LLAssetRequest::getUUID(), llendl, llerrs, mVFile, LLAssetStorage::mVFS, mZInitialized, mZInputBuffer, mZInputExhausted, mZStream, r, and LLVFile::READ.

Referenced by LLHTTPAssetStorage::checkForTimeouts().

size_t LLHTTPAssetRequest::readCompressedData ( void data,
size_t  size 
)

Definition at line 335 of file llhttpassetstorage.cpp.

References COMPRESSED_INPUT_BUFFER_SIZE, LLVFile::getLastBytesRead(), LLVFile::getSize(), llendl, llmin(), llwarns, mVFile, mZInputBuffer, mZInputExhausted, mZStream, r, LLVFile::read(), S32, and LLVFile::tell().

Referenced by curlCompressedUploadCallback().

void LLHTTPAssetRequest::setupCurlHandle (  ) 

Definition at line 240 of file llhttpassetstorage.cpp.

References LLHTTPAssetStorage::addRunningRequest(), llendl, llerrs, mAssetStoragep, mCurlHandle, mHTTPHeaders, mRequestType, mURLBuffer, mZInitialized, and LLAssetStorage::RT_DOWNLOAD.

Referenced by LLHTTPAssetStorage::checkForTimeouts().


Member Data Documentation

LLHTTPAssetStorage* LLHTTPAssetRequest::mAssetStoragep

Definition at line 102 of file llhttpassetstorage.cpp.

Referenced by cleanupCurlHandle(), LLHTTPAssetRequest(), and setupCurlHandle().

CURL* LLHTTPAssetRequest::mCurlHandle

Definition at line 104 of file llhttpassetstorage.cpp.

Referenced by LLHTTPAssetStorage::checkForTimeouts(), cleanupCurlHandle(), getFullDetails(), LLHTTPAssetRequest(), setupCurlHandle(), and ~LLHTTPAssetRequest().

CURLM* LLHTTPAssetRequest::mCurlMultiHandle

Definition at line 105 of file llhttpassetstorage.cpp.

Referenced by LLHTTPAssetRequest(), and ~LLHTTPAssetRequest().

FILE* LLHTTPAssetRequest::mFP

Definition at line 117 of file llhttpassetstorage.cpp.

Referenced by LLHTTPAssetStorage::curlFileDownCallback(), getFullDetails(), and LLHTTPAssetRequest().

struct curl_slist* LLHTTPAssetRequest::mHTTPHeaders

Definition at line 107 of file llhttpassetstorage.cpp.

Referenced by LLHTTPAssetRequest(), setupCurlHandle(), and ~LLHTTPAssetRequest().

LLAssetStorage::ERequestType LLHTTPAssetRequest::mRequestType

Definition at line 110 of file llhttpassetstorage.cpp.

Referenced by LLHTTPAssetStorage::checkForTimeouts(), cleanupCurlHandle(), getFullDetails(), LLHTTPAssetRequest(), and setupCurlHandle().

LLUUID LLHTTPAssetRequest::mTmpUUID

Definition at line 109 of file llhttpassetstorage.cpp.

Referenced by LLHTTPAssetStorage::checkForTimeouts(), LLHTTPAssetStorage::curlDownCallback(), and getFullDetails().

char* LLHTTPAssetRequest::mURLBuffer

Definition at line 106 of file llhttpassetstorage.cpp.

Referenced by LLHTTPAssetStorage::checkForTimeouts(), getTerseDetails(), LLHTTPAssetRequest(), setupCurlHandle(), and ~LLHTTPAssetRequest().

LLVFile* LLHTTPAssetRequest::mVFile

Definition at line 108 of file llhttpassetstorage.cpp.

Referenced by LLHTTPAssetStorage::checkForTimeouts(), LLHTTPAssetStorage::curlDownCallback(), LLHTTPAssetStorage::curlUpCallback(), LLHTTPAssetRequest(), prepareCompressedUpload(), readCompressedData(), and ~LLHTTPAssetRequest().

bool LLHTTPAssetRequest::mZInitialized

Definition at line 112 of file llhttpassetstorage.cpp.

Referenced by finishCompressedUpload(), getFullDetails(), prepareCompressedUpload(), and setupCurlHandle().

char* LLHTTPAssetRequest::mZInputBuffer

Definition at line 114 of file llhttpassetstorage.cpp.

Referenced by finishCompressedUpload(), LLHTTPAssetRequest(), prepareCompressedUpload(), and readCompressedData().

bool LLHTTPAssetRequest::mZInputExhausted

Definition at line 115 of file llhttpassetstorage.cpp.

Referenced by getFullDetails(), LLHTTPAssetRequest(), prepareCompressedUpload(), and readCompressedData().

z_stream LLHTTPAssetRequest::mZStream

Definition at line 113 of file llhttpassetstorage.cpp.

Referenced by finishCompressedUpload(), prepareCompressedUpload(), and readCompressedData().


The documentation for this class was generated from the following file:
Generated on Thu Jul 1 06:11:24 2010 for Second Life Viewer by  doxygen 1.4.7