CWorkerThread Class Reference

class CWorkerThread : public Den::CCommonWorkerThread

Inherits from

Nested Classes and Structures

Public Member Functions
~CWorkerThread()
voidCFBindMessageReceived(const CommsFW::TCFBindMsg &)
voidCFMessageForward(const CommsFW::TCFForwardMsg &)
IMPORT_C TIntCookieForProtocol(TUint, TUint, TUint, Messages::TRuntimeCtxId &)
IMPORT_C TIntCookieForProtocolByName(const TProtocolName &, Messages::TRuntimeCtxId &)
IMPORT_C TIntCookieForWorkerId(CommsFW::TWorkerId, Messages::TRuntimeCtxId &)
IMPORT_C TIntCurrentWorkerId(CommsFW::TWorkerId &)
Den::CCommonDealer *DoCreateDealerL(Den::CCommonWorkerThread *, Den::TPlayerRole)
Den::CCommonPitBoss *DoCreatePitBossL(Den::CCommonWorkerThread *)
Den::CCommonPlayer *DoCreatePlayerL(Den::CCommonWorkerThread *, Den::TPlayerRole)
TBool DoDispatchL(const CommsFW::TCFMessage &, CommsFW::TWorkerId)
CWorkerThread *NewL(CommsFW::TCFModuleInfo *)
voidOnDispatchLeave(const CommsFW::TCFMessage &, CommsFW::TWorkerId, TInt)
CPitBoss &PitBoss()
CPlayer *Player()
IMPORT_C TBoolResolveWorkerNameToId(const TDesC8 &, CommsFW::TWorkerId &)
const CSockManData *SockManGlobals()
CSockManData *SockManGlobals()
IMPORT_C TIntThreadEntrypoint(TAny *)
Den::CCommonWorkerDealer *WorkerDealer()
Protected Member Functions
CWorkerThread()
voidConstructL(CommsFW::TCFModuleInfo *)
voidCreateTransportUserL(TTransportUser &)
voidDoCompleteUnbinding(CommsFW::TWorkerId)
voidDoDeterminePlayerRoleL(HBufC8 *, Den::TPlayerRole &)
voidDoFillIntroMessage(CommsFW::TWorkerId, Den::TWorkerIntroductionMsg &)
voidDoPostMortemCleanup()
voidDoProcessWorkerIntroductionL(const Den::TWorkerIntroductionMsg &)
voidDoSendOtherIntroductionMessagesL(const CommsFW::TWorkerId &)
voidDoSetShuttingDown()
Private Member Functions
voidMaybeIncorporateFCL(const Den::TPlayerRole &, const Messages::TNodeId &)
voidProcessIniDataL()
voidProcessMatchingEskFilesL(const CommsFW::COwnEntryList *)
voidSendObjectBrokerIntroductionMessage(const CommsFW::TWorkerId &)
TInt TransportMessageReceived(const Den::TWorkerTransportMsg &, TRequestWrapper &, CommsFW::TWorkerId)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Den::CCommonWorkerThread::CCommonWorkerThread()
Den::CCommonWorkerThread::CFShutdownMessageReceived(const CommsFW::TCFShutdownMsg &)
Den::CCommonWorkerThread::CFUnbindMessageReceived(const CommsFW::TCFUnbindMsg &)
Den::CCommonWorkerThread::CompleteSessionClose(CWorkerSession *)
Den::CCommonWorkerThread::ConstructL(CommsFW::TCFModuleInfo &,CShutdownWatchDog &)
Den::CCommonWorkerThread::Dealer()const
Den::CCommonWorkerThread::DealerShutdownComplete()const
Den::CCommonWorkerThread::DecProlongBindingLife()
Den::CCommonWorkerThread::DecodePeerId(const CommsFW::TCFSubModuleAddress *,const CommsFW::TCFSubModuleAddress *,CommsFW::TWorkerId &)
Den::CCommonWorkerThread::DefaultOptimalDealer()const
Den::CCommonWorkerThread::DeleteHBufC8(TAny *)
Den::CCommonWorkerThread::DestroyDealer()
Den::CCommonWorkerThread::DestroyPlayer()
Den::CCommonWorkerThread::DetermineRoleL(HBufC8 *,TBool &,TBool &,TPlayerRole &)
Den::CCommonWorkerThread::DispatchL(const CommsFW::TCFMessage &,CommsFW::TWorkerId)
Den::CCommonWorkerThread::DoFillIntroMessage(CommsFW::TWorkerId,TWorkerIntroductionMsg &)
Den::CCommonWorkerThread::DoProcessWorkerIntroductionL(const TWorkerIntroductionMsg &)
Den::CCommonWorkerThread::DropTransportToPeer(TInt)
Den::CCommonWorkerThread::IncProlongBindingLife()
Den::CCommonWorkerThread::IsMainThread()
Den::CCommonWorkerThread::MaybeCompleteUnbinding(CommsFW::TWorkerId,TBool)
Den::CCommonWorkerThread::MaybeCompleteUnbindings()
Den::CCommonWorkerThread::MaybeTriggerThreadShutdownCallback()
Den::CCommonWorkerThread::PeerReachable(CommsFW::TWorkerId)const
Den::CCommonWorkerThread::PlayerShutdownComplete()const
Den::CCommonWorkerThread::PostMessage(CommsFW::TWorkerId,CommsFW::TCFMessage &)
Den::CCommonWorkerThread::PostMortemCleanupThreadEntry(TAny *)
Den::CCommonWorkerThread::SendIntroMessage(const CommsFW::TCFModuleName &,CommsFW::TWorkerId)
Den::CCommonWorkerThread::SessionShutdownComplete()
Den::CCommonWorkerThread::SetDealerShutdownComplete(TBool)
Den::CCommonWorkerThread::SetPlayerShutdownComplete(TBool)
Den::CCommonWorkerThread::SetShuttingDown()
Den::CCommonWorkerThread::ShuttingDown()const
Den::CCommonWorkerThread::Transport()const
Den::CCommonWorkerThread::TransportGlobals()
Den::CCommonWorkerThread::TriggerThreadShutdownCallback()
Den::CCommonWorkerThread::WorkerId()const
Den::CCommonWorkerThread::WorkerProperties(CommsFW::TWorkerId)
Den::CCommonWorkerThread::~CCommonWorkerThread()
Private Member Enumerations
enumanonymous { KMaxEskMaskLength = 16, KEskMaskLabelMax = 8, KEskMaskLabelLength }
Private Member Type Definitions
typedef TBuf< KMaxEskMaskLength > TEskMask
Private Attributes
RArray< TEskMask >iEskMaskList
CSockManData *iSockManGlobals
RTransportUsers iTransportUsers
Inherited Attributes
Den::CCommonWorkerThread::iChannelHandler
Den::CCommonWorkerThread::iDealer
Den::CCommonWorkerThread::iDealerShutdownComplete
Den::CCommonWorkerThread::iDefaultOptimalDealer
Den::CCommonWorkerThread::iGlobals
Den::CCommonWorkerThread::iPitBoss
Den::CCommonWorkerThread::iPlayer
Den::CCommonWorkerThread::iPlayerShutdownComplete
Den::CCommonWorkerThread::iProlongBindingLife
Den::CCommonWorkerThread::iShutdownWatchDog
Den::CCommonWorkerThread::iTransport
Den::CCommonWorkerThread::iWorkerId
Den::CCommonWorkerThread::iWorkerRegister
Den::CCommonWorkerThread::iWorkerShuttingDown

Constructor & Destructor Documentation

CWorkerThread()

CWorkerThread()[protected]

~CWorkerThread()

~CWorkerThread()

Member Functions Documentation

CFBindMessageReceived(const CommsFW::TCFBindMsg &)

voidCFBindMessageReceived(const CommsFW::TCFBindMsg &aMsg)[virtual]

Parameters

const CommsFW::TCFBindMsg & aMsg

CFMessageForward(const CommsFW::TCFForwardMsg &)

voidCFMessageForward(const CommsFW::TCFForwardMsg &aMessage)[virtual]

Parameters

const CommsFW::TCFForwardMsg & aMessage

ConstructL(CommsFW::TCFModuleInfo *)

voidConstructL(CommsFW::TCFModuleInfo *aModuleInfo)[protected]

Parameters

CommsFW::TCFModuleInfo * aModuleInfo

CookieForProtocol(TUint, TUint, TUint, Messages::TRuntimeCtxId &)

IMPORT_C TIntCookieForProtocol(TUintaAddrFamily,
TUintaSockType,
TUintaProtocol,
Messages::TRuntimeCtxId &aCookie
)[static]

Parameters

TUint aAddrFamily
TUint aSockType
TUint aProtocol
Messages::TRuntimeCtxId & aCookie

CookieForProtocolByName(const TProtocolName &, Messages::TRuntimeCtxId &)

IMPORT_C TIntCookieForProtocolByName(const TProtocolName &aName,
Messages::TRuntimeCtxId &aCookie
)[static]

Parameters

const TProtocolName & aName
Messages::TRuntimeCtxId & aCookie

CookieForWorkerId(CommsFW::TWorkerId, Messages::TRuntimeCtxId &)

IMPORT_C TIntCookieForWorkerId(CommsFW::TWorkerIdaWorkerId,
Messages::TRuntimeCtxId &aCookie
)[static]

Parameters

CommsFW::TWorkerId aWorkerId
Messages::TRuntimeCtxId & aCookie

CreateTransportUserL(TTransportUser &)

voidCreateTransportUserL(TTransportUser &aTemplateUser)[protected]

Parameters

TTransportUser & aTemplateUser

CurrentWorkerId(CommsFW::TWorkerId &)

IMPORT_C TIntCurrentWorkerId(CommsFW::TWorkerId &aWorkerId)[static]

Parameters

CommsFW::TWorkerId & aWorkerId

DoCompleteUnbinding(CommsFW::TWorkerId)

voidDoCompleteUnbinding(CommsFW::TWorkerIdaWorker)[protected, virtual]

Parameters

CommsFW::TWorkerId aWorker

DoCreateDealerL(Den::CCommonWorkerThread *, Den::TPlayerRole)

Den::CCommonDealer *DoCreateDealerL(Den::CCommonWorkerThread *aWorkerThread,
Den::TPlayerRoleaPlayerRole
)[virtual]

Parameters

Den::CCommonWorkerThread * aWorkerThread
Den::TPlayerRole aPlayerRole

DoCreatePitBossL(Den::CCommonWorkerThread *)

Den::CCommonPitBoss *DoCreatePitBossL(Den::CCommonWorkerThread *aWorkerThread)[virtual]

Parameters

Den::CCommonWorkerThread * aWorkerThread

DoCreatePlayerL(Den::CCommonWorkerThread *, Den::TPlayerRole)

Den::CCommonPlayer *DoCreatePlayerL(Den::CCommonWorkerThread *aWorkerThread,
Den::TPlayerRoleaPlayerRole
)[virtual]

Parameters

Den::CCommonWorkerThread * aWorkerThread
Den::TPlayerRole aPlayerRole

DoDeterminePlayerRoleL(HBufC8 *, Den::TPlayerRole &)

voidDoDeterminePlayerRoleL(HBufC8 *aIniData,
Den::TPlayerRole &aPlayerRole
)[protected, virtual]

Parameters

HBufC8 * aIniData
Den::TPlayerRole & aPlayerRole

DoDispatchL(const CommsFW::TCFMessage &, CommsFW::TWorkerId)

TBool DoDispatchL(const CommsFW::TCFMessage &aMessage,
CommsFW::TWorkerIdaSenderId
)[virtual]

Parameters

const CommsFW::TCFMessage & aMessage
CommsFW::TWorkerId aSenderId

DoFillIntroMessage(CommsFW::TWorkerId, Den::TWorkerIntroductionMsg &)

voidDoFillIntroMessage(CommsFW::TWorkerIdaPeerId,
Den::TWorkerIntroductionMsg &aIntroMsg
)[protected]

Parameters

CommsFW::TWorkerId aPeerId
Den::TWorkerIntroductionMsg & aIntroMsg

DoPostMortemCleanup()

voidDoPostMortemCleanup()[protected, virtual]

DoProcessWorkerIntroductionL(const Den::TWorkerIntroductionMsg &)

voidDoProcessWorkerIntroductionL(const Den::TWorkerIntroductionMsg &aMessage)[protected]

Parameters

const Den::TWorkerIntroductionMsg & aMessage

DoSendOtherIntroductionMessagesL(const CommsFW::TWorkerId &)

voidDoSendOtherIntroductionMessagesL(const CommsFW::TWorkerId &aPeerId)[protected]

Parameters

const CommsFW::TWorkerId & aPeerId

DoSetShuttingDown()

voidDoSetShuttingDown()[protected, virtual]

MaybeIncorporateFCL(const Den::TPlayerRole &, const Messages::TNodeId &)

voidMaybeIncorporateFCL(const Den::TPlayerRole &aPlane,
const Messages::TNodeId &aPeerId
)[private]

Parameters

const Den::TPlayerRole & aPlane
const Messages::TNodeId & aPeerId

NewL(CommsFW::TCFModuleInfo *)

CWorkerThread *NewL(CommsFW::TCFModuleInfo *aModuleInfo)[static]

Parameters

CommsFW::TCFModuleInfo * aModuleInfo

OnDispatchLeave(const CommsFW::TCFMessage &, CommsFW::TWorkerId, TInt)

voidOnDispatchLeave(const CommsFW::TCFMessage &aMessage,
CommsFW::TWorkerIdaSenderId,
TIntaError
)

Parameters

const CommsFW::TCFMessage & aMessage
CommsFW::TWorkerId aSenderId
TInt aError

PitBoss()

CPitBoss &PitBoss()const
Return the pointer to the domain PitBoss. This will be initialised when:
  1. If this is Main thread: In CCommonWorkerThread::ConstructL(TCFModuleInfo* aModuleInfo).
    1. In other common worker threads: When receiving TWorkerMsg::EMainIntroduction.

Player()

CPlayer *Player()const

ProcessIniDataL()

voidProcessIniDataL()[private]

ProcessMatchingEskFilesL(const CommsFW::COwnEntryList *)

voidProcessMatchingEskFilesL(const CommsFW::COwnEntryList *aEskFiles)[private]

Parameters

const CommsFW::COwnEntryList * aEskFiles

ResolveWorkerNameToId(const TDesC8 &, CommsFW::TWorkerId &)

IMPORT_C TBoolResolveWorkerNameToId(const TDesC8 &aWorkerName,
CommsFW::TWorkerId &aWorkerId
)[static]

Parameters

const TDesC8 & aWorkerName
CommsFW::TWorkerId & aWorkerId

SendObjectBrokerIntroductionMessage(const CommsFW::TWorkerId &)

voidSendObjectBrokerIntroductionMessage(const CommsFW::TWorkerId &aPeerId)[private]

Parameters

const CommsFW::TWorkerId & aPeerId

SockManGlobals()

const CSockManData *SockManGlobals()const [inline]

SockManGlobals()

CSockManData *SockManGlobals()[inline]

ThreadEntrypoint(TAny *)

IMPORT_C TIntThreadEntrypoint(TAny *aArg)[static]

This is the main thread function used by the RootServer when creating a new ESock thread. The RootServer will know the DLL ordinal for it, as specified in the .CMI file, and this is where an ESock instance starts and ends operation (unless it PANICs). CommsFW::TCFModuleInfo

Parameters

TAny * aArgWill be the module info structure from the RootServer.

TransportMessageReceived(const Den::TWorkerTransportMsg &, TRequestWrapper &, CommsFW::TWorkerId)

TInt TransportMessageReceived(const Den::TWorkerTransportMsg &aMessage,
TRequestWrapper &aRequestWrapper,
CommsFW::TWorkerIdaWorkerId
)[private]

Parameters

const Den::TWorkerTransportMsg & aMessage
TRequestWrapper & aRequestWrapper
CommsFW::TWorkerId aWorkerId

WorkerDealer()

Den::CCommonWorkerDealer *WorkerDealer()const

Member Enumerations Documentation

Enum anonymous

Enumerators

KMaxEskMaskLength = 16

Max length of the EskMask value

KEskMaskLabelMax = 8

Max number of optional EskMasks, e.g. EskMask0, EskMask1, etc...

KEskMaskLabelLength

Max length of label searched for, e.g. length of "EskMask0"

Member Type Definitions Documentation

Typedef TEskMask

typedef TBuf< KMaxEskMaskLength >TEskMask[private]

Buffer type holding the ESK mask defined in the .CMI files, e.g. "IP.*.ESK".

Member Data Documentation

RArray< TEskMask > iEskMaskList

RArray< TEskMask >iEskMaskList[private]

Array of ESK masks as defined in the .CMI file loading this instance of ESock. The Player will load all .ESK files matching these masks.

CSockManData * iSockManGlobals

CSockManData *iSockManGlobals[private]

RTransportUsers iTransportUsers

RTransportUsers iTransportUsers[private]

The array of transport users for this instance of ESock. Will be populated when the appropriate ECOM plug-ins are loaded on demand (as messages with unknown message ID arrives and causes the appropriate ECOM plugins to be loaded and inserted). TTransportUser