LLTransferSource Class Reference

#include <lltransfermanager.h>

Inheritance diagram for LLTransferSource:

Inheritance graph
[legend]
Collaboration diagram for LLTransferSource:

Collaboration graph
[legend]
List of all members.

Public Member Functions

LLUUID getID ()

Protected Types

typedef std::map< LLTransferSourceType,
LLTransferSourceCreateFunc
stype_scfunc_map

Protected Member Functions

 LLTransferSource (const LLTransferSourceType source_type, const LLUUID &request_id, const F32 priority)
virtual ~LLTransferSource ()
void sendTransferStatus (LLTSCode status)
virtual void initTransfer ()=0
virtual F32 updatePriority ()=0
virtual LLTSCode dataCallback (const S32 packet_id, const S32 max_bytes, U8 **datap, S32 &returned_bytes, BOOL &delete_returned)=0
virtual void completionCallback (const LLTSCode status)=0
virtual void packParams (LLDataPacker &dp) const =0
virtual BOOL unpackParams (LLDataPacker &dp)=0
virtual S32 getNextPacketID ()
virtual void setLastPacketID (const S32 packet_id)
F32 getPriority ()
void setPriority (const F32 pri)
virtual void abortTransfer ()

Static Protected Member Functions

static LLTransferSourcecreateSource (const LLTransferSourceType stype, const LLUUID &request_id, const F32 priority)
static void registerSourceType (const LLTransferSourceType stype, LLTransferSourceCreateFunc)
static void sSetPriority (LLTransferSource *&tsp, const F32 priority)
static F32 sGetPriority (LLTransferSource *&tsp)

Protected Attributes

LLTransferSourceType mType
LLUUID mID
LLTransferSourceChannelmChannelp
F32 mPriority
S32 mSize
S32 mLastPacketID

Static Protected Attributes

static stype_scfunc_map sSourceCreateMap

Friends

class LLTransferManager
class LLTransferSourceChannel

Detailed Description

Definition at line 285 of file lltransfermanager.h.


Member Typedef Documentation

typedef std::map<LLTransferSourceType, LLTransferSourceCreateFunc> LLTransferSource::stype_scfunc_map [protected]

Definition at line 334 of file lltransfermanager.h.


Constructor & Destructor Documentation

LLTransferSource::LLTransferSource ( const LLTransferSourceType  source_type,
const LLUUID request_id,
const F32  priority 
) [protected]

Definition at line 1022 of file lltransfermanager.cpp.

References setPriority().

LLTransferSource::~LLTransferSource (  )  [protected, virtual]

Definition at line 1036 of file lltransfermanager.cpp.


Member Function Documentation

void LLTransferSource::abortTransfer (  )  [protected, virtual]

Definition at line 1072 of file lltransfermanager.cpp.

References LLMessageSystem::addS32(), LLMessageSystem::addUUID(), completionCallback(), LLTransferSourceChannel::getChannelType(), LLTransferSourceChannel::getHost(), getID(), gMessageSystem, llendl, llinfos, LLTS_ABORT, mChannelp, LLMessageSystem::newMessage(), LLMessageSystem::nextBlock(), and LLMessageSystem::sendReliable().

Referenced by LLTransferManager::processTransferAbort(), and LLTransferManager::reliablePacketCallback().

virtual void LLTransferSource::completionCallback ( const LLTSCode  status  )  [protected, pure virtual]

Implemented in LLTransferSourceAsset, and LLTransferSourceFile.

Referenced by abortTransfer(), and sendTransferStatus().

LLTransferSource * LLTransferSource::createSource ( const LLTransferSourceType  stype,
const LLUUID request_id,
const F32  priority 
) [static, protected]

Definition at line 1102 of file lltransfermanager.cpp.

References llendl, LLTST_ASSET, llwarns, NULL, and sSourceCreateMap.

Referenced by LLTransferManager::processTransferRequest().

virtual LLTSCode LLTransferSource::dataCallback ( const S32  packet_id,
const S32  max_bytes,
U8 **  datap,
S32 returned_bytes,
BOOL delete_returned 
) [protected, pure virtual]

Implemented in LLTransferSourceAsset, and LLTransferSourceFile.

LLUUID LLTransferSource::getID (  )  [inline]

Definition at line 289 of file lltransfermanager.h.

References mID.

Referenced by abortTransfer(), LLTransferSourceAsset::initTransfer(), and sendTransferStatus().

virtual S32 LLTransferSource::getNextPacketID (  )  [inline, protected, virtual]

Definition at line 316 of file lltransfermanager.h.

References mLastPacketID.

F32 LLTransferSource::getPriority (  )  [inline, protected]

Definition at line 321 of file lltransfermanager.h.

References mPriority.

Referenced by LLTransferSourceChannel::addTransferSource(), and sGetPriority().

virtual void LLTransferSource::initTransfer (  )  [protected, pure virtual]

Implemented in LLTransferSourceAsset, and LLTransferSourceFile.

Referenced by LLTransferManager::processTransferRequest().

virtual void LLTransferSource::packParams ( LLDataPacker dp  )  const [protected, pure virtual]

Implemented in LLTransferSourceAsset, and LLTransferSourceFile.

Referenced by sendTransferStatus().

void LLTransferSource::registerSourceType ( const LLTransferSourceType  stype,
LLTransferSourceCreateFunc   
) [static, protected]

Definition at line 1087 of file lltransfermanager.cpp.

References llendl, llerrs, and sSourceCreateMap.

void LLTransferSource::sendTransferStatus ( LLTSCode  status  )  [protected]

Definition at line 1044 of file lltransfermanager.cpp.

References LLMessageSystem::addBinaryData(), LLMessageSystem::addS32(), LLMessageSystem::addUUID(), completionCallback(), LLTransferSourceChannel::deleteTransfer(), LLTransferSourceChannel::getChannelType(), LLDataPackerBinaryBuffer::getCurrentSize(), LLTransferSourceChannel::getHost(), getID(), gMessageSystem, LLTS_OK, LLTTT_UNKNOWN, MAX_PARAMS_SIZE, mChannelp, mSize, LLMessageSystem::newMessage(), LLMessageSystem::nextBlock(), packParams(), S32, and LLMessageSystem::sendReliable().

Referenced by LLTransferSourceFile::initTransfer(), LLTransferSourceAsset::initTransfer(), and LLTransferSourceAsset::responderCallback().

virtual void LLTransferSource::setLastPacketID ( const S32  packet_id  )  [inline, protected, virtual]

Definition at line 317 of file lltransfermanager.h.

References mLastPacketID.

void LLTransferSource::setPriority ( const F32  pri  )  [inline, protected]

Definition at line 322 of file lltransfermanager.h.

References mPriority.

Referenced by LLTransferSource(), and sSetPriority().

F32 LLTransferSource::sGetPriority ( LLTransferSource *&  tsp  )  [static, protected]

Definition at line 1138 of file lltransfermanager.cpp.

References getPriority().

void LLTransferSource::sSetPriority ( LLTransferSource *&  tsp,
const F32  priority 
) [static, protected]

Definition at line 1131 of file lltransfermanager.cpp.

References setPriority().

virtual BOOL LLTransferSource::unpackParams ( LLDataPacker dp  )  [protected, pure virtual]

Implemented in LLTransferSourceAsset, and LLTransferSourceFile.

Referenced by LLTransferManager::processTransferRequest().

virtual F32 LLTransferSource::updatePriority (  )  [protected, pure virtual]

Implemented in LLTransferSourceAsset, and LLTransferSourceFile.


Friends And Related Function Documentation

friend class LLTransferManager [friend]

Definition at line 291 of file lltransfermanager.h.

friend class LLTransferSourceChannel [friend]

Definition at line 292 of file lltransfermanager.h.


Member Data Documentation

LLTransferSourceChannel* LLTransferSource::mChannelp [protected]

Definition at line 339 of file lltransfermanager.h.

Referenced by abortTransfer(), LLTransferSourceChannel::addTransferSource(), LLTransferManager::reliablePacketCallback(), and sendTransferStatus().

LLUUID LLTransferSource::mID [protected]

Definition at line 338 of file lltransfermanager.h.

Referenced by getID().

S32 LLTransferSource::mLastPacketID [protected]

Definition at line 342 of file lltransfermanager.h.

Referenced by LLTransferSourceFile::dataCallback(), LLTransferSourceAsset::dataCallback(), getNextPacketID(), and setLastPacketID().

F32 LLTransferSource::mPriority [protected]

Definition at line 340 of file lltransfermanager.h.

Referenced by getPriority(), and setPriority().

S32 LLTransferSource::mSize [protected]

Definition at line 341 of file lltransfermanager.h.

Referenced by LLTransferSourceFile::initTransfer(), LLTransferSourceAsset::responderCallback(), and sendTransferStatus().

LLTransferSourceType LLTransferSource::mType [protected]

Definition at line 337 of file lltransfermanager.h.

LLTransferSource::stype_scfunc_map LLTransferSource::sSourceCreateMap [static, protected]

Definition at line 335 of file lltransfermanager.h.

Referenced by createSource(), and registerSourceType().


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