CWorkerThread Class Reference

class CWorkerThread : public Den::CCommonWorkerThread

Inherits from

Nested Classes and Structures

Public Member Functions
~CWorkerThread ()
void CFBindMessageReceived (const CommsFW::TCFBindMsg &)
void CFMessageForward (const CommsFW::TCFForwardMsg &)
IMPORT_C TInt CookieForProtocol ( TUint , TUint , TUint , Messages::TRuntimeCtxId &)
IMPORT_C TInt CookieForProtocolByName (const TProtocolName &, Messages::TRuntimeCtxId &)
IMPORT_C TInt CookieForWorkerId ( CommsFW::TWorkerId , Messages::TRuntimeCtxId &)
IMPORT_C TInt CurrentWorkerId ( 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 *)
void OnDispatchLeave (const CommsFW::TCFMessage &, CommsFW::TWorkerId , TInt )
CPitBoss & PitBoss ()
CPlayer * Player ()
IMPORT_C TBool ResolveWorkerNameToId (const TDesC8 &, CommsFW::TWorkerId &)
const CSockManData * SockManGlobals ()
CSockManData * SockManGlobals ()
IMPORT_C TInt ThreadEntrypoint ( TAny *)
Den::CCommonWorkerDealer * WorkerDealer ()
Protected Member Functions
CWorkerThread ()
void ConstructL (CommsFW::TCFModuleInfo *)
void CreateTransportUserL ( TTransportUser &)
void DoCompleteUnbinding ( CommsFW::TWorkerId )
void DoDeterminePlayerRoleL ( HBufC8 *, Den::TPlayerRole &)
void DoFillIntroMessage ( CommsFW::TWorkerId , Den::TWorkerIntroductionMsg &)
void DoPostMortemCleanup ()
void DoProcessWorkerIntroductionL (const Den::TWorkerIntroductionMsg &)
void DoSendOtherIntroductionMessagesL (const CommsFW::TWorkerId &)
void DoSetShuttingDown ()
Private Member Functions
void MaybeIncorporateFCL (const Den::TPlayerRole &, const Messages::TNodeId &)
void ProcessIniDataL ()
void ProcessMatchingEskFilesL (const CommsFW::COwnEntryList *)
void SendObjectBrokerIntroductionMessage (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
enum anonymous { 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 &)

void CFBindMessageReceived ( const CommsFW::TCFBindMsg & aMsg ) [virtual]

Parameters

const CommsFW::TCFBindMsg & aMsg

CFMessageForward(const CommsFW::TCFForwardMsg &)

void CFMessageForward ( const CommsFW::TCFForwardMsg & aMessage ) [virtual]

Parameters

const CommsFW::TCFForwardMsg & aMessage

ConstructL(CommsFW::TCFModuleInfo *)

void ConstructL ( CommsFW::TCFModuleInfo * aModuleInfo ) [protected]

Parameters

CommsFW::TCFModuleInfo * aModuleInfo

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

IMPORT_C TInt CookieForProtocol ( TUint aAddrFamily,
TUint aSockType,
TUint aProtocol,
Messages::TRuntimeCtxId & aCookie
) [static]

Parameters

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

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

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

Parameters

const TProtocolName & aName
Messages::TRuntimeCtxId & aCookie

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

IMPORT_C TInt CookieForWorkerId ( CommsFW::TWorkerId aWorkerId,
Messages::TRuntimeCtxId & aCookie
) [static]

Parameters

CommsFW::TWorkerId aWorkerId
Messages::TRuntimeCtxId & aCookie

CreateTransportUserL(TTransportUser &)

void CreateTransportUserL ( TTransportUser & aTemplateUser ) [protected]

Parameters

TTransportUser & aTemplateUser

CurrentWorkerId(CommsFW::TWorkerId &)

IMPORT_C TInt CurrentWorkerId ( CommsFW::TWorkerId & aWorkerId ) [static]

Parameters

CommsFW::TWorkerId & aWorkerId

DoCompleteUnbinding(CommsFW::TWorkerId)

void DoCompleteUnbinding ( CommsFW::TWorkerId aWorker ) [protected, virtual]

Parameters

CommsFW::TWorkerId aWorker

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

Den::CCommonDealer * DoCreateDealerL ( Den::CCommonWorkerThread * aWorkerThread,
Den::TPlayerRole aPlayerRole
) [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::TPlayerRole aPlayerRole
) [virtual]

Parameters

Den::CCommonWorkerThread * aWorkerThread
Den::TPlayerRole aPlayerRole

DoDeterminePlayerRoleL(HBufC8 *, Den::TPlayerRole &)

void DoDeterminePlayerRoleL ( 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::TWorkerId aSenderId
) [virtual]

Parameters

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

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

void DoFillIntroMessage ( CommsFW::TWorkerId aPeerId,
Den::TWorkerIntroductionMsg & aIntroMsg
) [protected]

Parameters

CommsFW::TWorkerId aPeerId
Den::TWorkerIntroductionMsg & aIntroMsg

DoPostMortemCleanup()

void DoPostMortemCleanup ( ) [protected, virtual]

DoProcessWorkerIntroductionL(const Den::TWorkerIntroductionMsg &)

void DoProcessWorkerIntroductionL ( const Den::TWorkerIntroductionMsg & aMessage ) [protected]

Parameters

const Den::TWorkerIntroductionMsg & aMessage

DoSendOtherIntroductionMessagesL(const CommsFW::TWorkerId &)

void DoSendOtherIntroductionMessagesL ( const CommsFW::TWorkerId & aPeerId ) [protected]

Parameters

const CommsFW::TWorkerId & aPeerId

DoSetShuttingDown()

void DoSetShuttingDown ( ) [protected, virtual]

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

void MaybeIncorporateFCL ( 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)

void OnDispatchLeave ( const CommsFW::TCFMessage & aMessage,
CommsFW::TWorkerId aSenderId,
TInt aError
)

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()

void ProcessIniDataL ( ) [private]

ProcessMatchingEskFilesL(const CommsFW::COwnEntryList *)

void ProcessMatchingEskFilesL ( const CommsFW::COwnEntryList * aEskFiles ) [private]

Parameters

const CommsFW::COwnEntryList * aEskFiles

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

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

Parameters

const TDesC8 & aWorkerName
CommsFW::TWorkerId & aWorkerId

SendObjectBrokerIntroductionMessage(const CommsFW::TWorkerId &)

void SendObjectBrokerIntroductionMessage ( const CommsFW::TWorkerId & aPeerId ) [private]

Parameters

const CommsFW::TWorkerId & aPeerId

SockManGlobals()

const CSockManData * SockManGlobals ( ) const [inline]

SockManGlobals()

CSockManData * SockManGlobals ( ) [inline]

ThreadEntrypoint(TAny *)

IMPORT_C TInt ThreadEntrypoint ( 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 * aArg Will be the module info structure from the RootServer.

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

TInt TransportMessageReceived ( const Den::TWorkerTransportMsg & aMessage,
TRequestWrapper & aRequestWrapper,
CommsFW::TWorkerId aWorkerId
) [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