Den::CCommonDealer Class Reference

class Den::CCommonDealer : public CBase

The Dealer is an interface to the Symbian OS server (CServer2) and as such one of its most important possessions is the list of CSession2's kept by the CServer2. On a conceptual level one can say that the Dealer owns the CWorkerSession's due to their inherited relationship. Sub-sessions are also supported in the form of the CPlayerSubSession and its derivatives. These are owned by the provider container (CSubSessionIx) in the CWorkerSession.

Inherits from

Nested Classes and Structures

Constructor & Destructor Documentation

CCommonDealer(CCommonServer *)

IMPORT_CCCommonDealer(CCommonServer *aServer)[protected]

Parameters

CCommonServer * aServer

~CCommonDealer()

IMPORT_C~CCommonDealer()

Member Functions Documentation

CanShutdown()

TBool CanShutdown()const [inline]

CanUnbindFromWorker(CommsFW::TWorkerId)

TBool CanUnbindFromWorker(CommsFW::TWorkerIdaWorker)

Parameters

CommsFW::TWorkerId aWorker

CleanupDeadWorker(CommsFW::TWorkerId)

IMPORT_C voidCleanupDeadWorker(CommsFW::TWorkerIdaPeerId)

Parameters

CommsFW::TWorkerId aPeerId

ConstructL()

IMPORT_C voidConstructL()[protected]

DeleteSession(CWorkerSession *)

IMPORT_C voidDeleteSession(CWorkerSession *aSession)

When deleting a session it will be in response to a disconnect from the client, so we signal that to the session. If this thread is in the process of shutting down we need to check whether it was just waiting for this session (if this was the last one) and if this is the case we can initiate the asynchronous process of shutting down the worker thread.

Parameters

CWorkerSession * aSession

MainDealer()

TBool MainDealer()const [inline, virtual]

Returns whether the dealer is the main dealer or not. A main dealer is a dealer which can receive IPC messages directly from a client. Non-main dealers can not, and must have IPC messages handed to them by a main dealer.

NewL(CCommonServer *)

IMPORT_C CCommonDealer *NewL(CCommonServer *aServer)[static]

This function will first do the ConstructL and if that succeeds it will start the server using the server name discovered during ConstructL. So when this function returns the new dealer object, its server is in effect running.

Parameters

CCommonServer * aServer

ParkRequest(CWorkerSession *, const RMessage2 &, TParkReason)

IMPORT_C TIntParkRequest(CWorkerSession *aSession,
const RMessage2 &aMessage,
TParkReasonaReason
)const

Add to the queue of indeterminate requests parked for re-evaluation once configuration has completed

Parameters

CWorkerSession * aSession
const RMessage2 & aMessage
TParkReason aReason

ProcessConfigurationComplete(TConfigurationCompletionType)

IMPORT_C voidProcessConfigurationComplete(TConfigurationCompletionTypeaType)

Once server configuration is complete any requests parked because they required the full environment can be re-evaluated

ProcessShutdownRequest(CommsFW::TCFShutdownType)

voidProcessShutdownRequest(CommsFW::TCFShutdownTypeaType)

Parameters

CommsFW::TCFShutdownType aType

ProcessSubSessions(CommsFW::TWorkerId, CWorkerSession::TSubSessionProcessor, TAny *)

voidProcessSubSessions(CommsFW::TWorkerIdaPeerId,
CWorkerSession::TSubSessionProcessoraSubSessionProcessor,
TAny *aArg
)

Parameters

CommsFW::TWorkerId aPeerId
CWorkerSession::TSubSessionProcessor aSubSessionProcessor
TAny * aArg

ReleaseParkedRequests(TParkReason)

voidReleaseParkedRequests(TParkReasonaReason)[protected]

Complete all requests parked for the given reason

Parameters

TParkReason aReason

ServerName()

IMPORT_C const TDesC &ServerName()const

SubsessionCountInPlayer(CommsFW::TWorkerId)

TInt SubsessionCountInPlayer(CommsFW::TWorkerIdaPeerId)

Parameters

CommsFW::TWorkerId aPeerId

WorkerId()

CommsFW::TWorkerId WorkerId()const [inline]

WorkerThread()

CCommonWorkerThread &WorkerThread()[inline]

Member Enumerations Documentation

Enum TParkReason

Enumerators

EIndeterminateDuringBoot

During initial configuration a client request may have an indeterminate outcome, in that it relates to a protocol that isn't known but might be yet to load. This would expose clients to the need to cope with a startup race so instead such requests are "parked" until start-up is complete and an authorative answer can be made.

EAwaitingTierToWorkerMapping

The hosting of tier managers by worker threads is only determined upon the first need. The actual work is done by the tier resolver; until this completes all requests needing this are parked

EDebugParking

Some test cases concern competing client requests, such as a connection start and stop. A test harness can specify that a sequence of requests is parked and then released together. This is only supported when _DEBUG_SOCKET_FUNCTIONS is defined, ie usually only in UDEB

Member Type Definitions Documentation

Typedef RParkedRequestArray

typedef RArray< TParkedRequest >RParkedRequestArray[protected]

Member Data Documentation

RParkedRequestArray iParkedRequests

RParkedRequestArray iParkedRequests[protected]

CCommonServer * iServer

CCommonServer *iServer[protected]