CSession2 Class Reference

class CSession2 : public CBase

Represents a session (version 2) for a client thread on the server-side.

A session acts as a channel of communication between the client and the server. A client thread can have multiple concurrent sessions with a server.

A session can be:
  • restricted to the creating thread

  • can be shared with other threads in the same process

  • can be shared by all threads in the system.

A server must define and implement a derived class. In particular, it must provide an implementation for the ServiceL() virtual function.

(Note that this class should be used instead of CSession)

Inherits from

Constructor & Destructor Documentation

CSession2()

IMPORT_CCSession2()[protected]

~CSession2()

IMPORT_C~CSession2()[pure virtual]

Member Functions Documentation

CountResources()

IMPORT_C TIntCountResources()[virtual]

CreateL()

IMPORT_C voidCreateL()[private, virtual]

Disconnect(const RMessage2 &)

IMPORT_C voidDisconnect(const RMessage2 &aMessage)[protected, virtual]

Parameters

const RMessage2 & aMessage

Extension_(TUint, TAny *&, TAny *)

IMPORT_C TIntExtension_(TUintaExtensionId,
TAny *&a0,
TAny *a1
)[protected, virtual]

Parameters

TUint aExtensionId
TAny *& a0
TAny * a1

ResourceCountMarkEnd(const RMessage2 &)

IMPORT_C voidResourceCountMarkEnd(const RMessage2 &aMessage)

Parameters

const RMessage2 & aMessage

ResourceCountMarkStart()

IMPORT_C voidResourceCountMarkStart()

Server()

const CServer2 *Server()const [inline]

Gets the server active object that handles messages for this session.

This is the instance of the CServer2 derived class that created this session object.

The server active object.

ServiceError(const RMessage2 &, TInt)

IMPORT_C voidServiceError(const RMessage2 &aMessage,
TIntaError
)[virtual]

Parameters

const RMessage2 & aMessage
TInt aError

ServiceL(const RMessage2 &)

voidServiceL(const RMessage2 &aMessage)[pure virtual]

Handles the servicing of a client request that has been passed to the server.

This function must be implemented in a derived class. The details of the request are contained within the message.

Parameters

const RMessage2 & aMessageThe message containing the details of the client request.

SetServer(const CServer2 *)

IMPORT_C voidSetServer(const CServer2 *aServer)

Parameters

const CServer2 * aServer

Member Enumerations Documentation

Enum TPanicNo

Enumerators

ESesCountResourcesNotImplemented = 1
ESesFoundResCountHeaven

Member Data Documentation

TDblQueLink iLink

TDblQueLink iLink[private]

TInt iResourceCountMark

TInt iResourceCountMark[private]

const CServer2 * iServer

const CServer2 *iServer[private]

TAny * iSpare

TAny *iSpare[private]