LLVFSThread Class Reference

#include <llvfsthread.h>

Inheritance diagram for LLVFSThread:

Inheritance graph
[legend]
Collaboration diagram for LLVFSThread:

Collaboration graph
[legend]
List of all members.

Public Types

 FILE_READ
 FILE_WRITE
 FILE_RENAME
enum  operation_t { FILE_READ, FILE_WRITE, FILE_RENAME }

Public Member Functions

 LLVFSThread (bool threaded=TRUE)
 ~LLVFSThread ()
handle_t read (LLVFS *vfs, const LLUUID &file_id, const LLAssetType::EType file_type, U8 *buffer, S32 offset, S32 numbytes, U32 pri=PRIORITY_NORMAL, U32 flags=0)
handle_t write (LLVFS *vfs, const LLUUID &file_id, const LLAssetType::EType file_type, U8 *buffer, S32 offset, S32 numbytes, U32 flags)
S32 readImmediate (LLVFS *vfs, const LLUUID &file_id, const LLAssetType::EType file_type, U8 *buffer, S32 offset, S32 numbytes)
S32 writeImmediate (LLVFS *vfs, const LLUUID &file_id, const LLAssetType::EType file_type, U8 *buffer, S32 offset, S32 numbytes)
bool processRequest (QueuedRequest *req)

Static Public Member Functions

static void initClass (bool local_is_threaded=TRUE)
static S32 updateClass (U32 ms_elapsed)
static void cleanupClass ()
static void setDataPath (const std::string &path)

Static Public Attributes

static std::string sDataPath = ""
static LLVFSThreadsLocal = NULL

Classes

class  Request

Detailed Description

Definition at line 48 of file llvfsthread.h.


Member Enumeration Documentation

enum LLVFSThread::operation_t

Enumerator:
FILE_READ 
FILE_WRITE 
FILE_RENAME 

Definition at line 52 of file llvfsthread.h.


Constructor & Destructor Documentation

LLVFSThread::LLVFSThread ( bool  threaded = TRUE  ) 

Definition at line 73 of file llvfsthread.cpp.

Referenced by initClass().

LLVFSThread::~LLVFSThread (  ) 

Definition at line 78 of file llvfsthread.cpp.


Member Function Documentation

void LLVFSThread::cleanupClass (  )  [static]

Definition at line 60 of file llvfsthread.cpp.

References LLQueuedThread::getPending(), LLThread::setQuitting(), sLocal, and LLQueuedThread::update().

Referenced by cleanup_app().

void LLVFSThread::initClass ( bool  local_is_threaded = TRUE  )  [static]

Definition at line 46 of file llvfsthread.cpp.

References llassert, LLVFSThread(), NULL, and sLocal.

Referenced by main().

bool LLVFSThread::processRequest ( QueuedRequest *  req  ) 

LLVFSThread::handle_t LLVFSThread::read ( LLVFS vfs,
const LLUUID file_id,
const LLAssetType::EType  file_type,
U8 buffer,
S32  offset,
S32  numbytes,
U32  pri = PRIORITY_NORMAL,
U32  flags = 0 
)

Definition at line 85 of file llvfsthread.cpp.

References LLQueuedThread::addRequest(), LLVFSThread::Request::deleteRequest(), FILE_READ, LLQueuedThread::generateHandle(), llendl, llerrs, llmax(), LLQueuedThread::nullHandle(), and LLQueuedThread::PRIORITY_LOW.

Referenced by LLVFile::read().

S32 LLVFSThread::readImmediate ( LLVFS vfs,
const LLUUID file_id,
const LLAssetType::EType  file_type,
U8 buffer,
S32  offset,
S32  numbytes 
)

Definition at line 105 of file llvfsthread.cpp.

References LLQueuedThread::addRequest(), LLQueuedThread::completeRequest(), LLVFSThread::Request::deleteRequest(), FILE_READ, LLQueuedThread::generateHandle(), LLVFSThread::Request::getBytesRead(), llendl, llerrs, llverify, LLQueuedThread::PRIORITY_IMMEDIATE, S32, and LLQueuedThread::waitForResult().

Referenced by LLVFile::read().

static void LLVFSThread::setDataPath ( const std::string &  path  )  [inline, static]

Definition at line 141 of file llvfsthread.h.

References sDataPath.

S32 LLVFSThread::updateClass ( U32  ms_elapsed  )  [static]

Definition at line 53 of file llvfsthread.cpp.

References LLQueuedThread::getPending(), sLocal, and LLQueuedThread::update().

Referenced by cleanup_app(), and main_loop().

LLVFSThread::handle_t LLVFSThread::write ( LLVFS vfs,
const LLUUID file_id,
const LLAssetType::EType  file_type,
U8 buffer,
S32  offset,
S32  numbytes,
U32  flags 
)

Definition at line 128 of file llvfsthread.cpp.

References LLQueuedThread::addRequest(), LLVFSThread::Request::deleteRequest(), FILE_WRITE, LLQueuedThread::generateHandle(), llendl, llerrs, and LLQueuedThread::nullHandle().

Referenced by LLVFile::write().

S32 LLVFSThread::writeImmediate ( LLVFS vfs,
const LLUUID file_id,
const LLAssetType::EType  file_type,
U8 buffer,
S32  offset,
S32  numbytes 
)

Definition at line 147 of file llvfsthread.cpp.

References LLQueuedThread::addRequest(), LLQueuedThread::completeRequest(), LLVFSThread::Request::deleteRequest(), FILE_WRITE, LLQueuedThread::generateHandle(), LLVFSThread::Request::getBytesRead(), llendl, llerrs, llverify, LLQueuedThread::PRIORITY_IMMEDIATE, S32, and LLQueuedThread::waitForResult().

Referenced by LLVFile::write().


Member Data Documentation

std::string LLVFSThread::sDataPath = "" [static]

Definition at line 114 of file llvfsthread.h.

Referenced by setDataPath().

LLVFSThread * LLVFSThread::sLocal = NULL [static]

Definition at line 115 of file llvfsthread.h.

Referenced by cleanupClass(), initClass(), LLVFile::initClass(), and updateClass().


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