Location:
e32base.h
Link against: euser.lib
CSharableSession
Supported from 6.0
Sharable session abstract base class.
The class is the base class for all sessions and also provides the support needed for a session to be sharable by all threads within a single process.
The class is a base class for the CSession
class.
|
Defined in CSharableSession
:
CountResources()
, CreateL()
, Message()
, ResourceCountMarkEnd()
, ResourceCountMarkStart()
, Server()
, ServiceL()
, ~CSharableSession()
Inherited from CBase
:
operator new()
virtual void CreateL(const CServer& aServer);
Completes construction of this server-side client session object.
The default implementation stores a pointer to the server active object that provides message handling for this session, i.e. the server active object that created this session object.
This function is called by the server active object when a client makes a connect request.
|
~CSharableSession();
Frees resources prior to destruction. Specifically, it removes this session object from the server active object’s list of sessions.
const CServer* Server() const;
Returns the server active object which provides message handling for this session, i.e. the server active object which created this session object.
|
const RMessage& Message() const;
Returns the current message.
|
virtual void ServiceL(const RMessage& aMessage) = 0;
Handles the servicing of client requests passed to the server.
This function must be implemented in a derived class. The details of the request are contained within the message.
|
void ResourceCountMarkStart();
Initialises resource counting.
If resource counting has not been implemented in a derived class, the function panics the client thread associated with the most recent message, specifying the category name CSession and panic number 1.
void ResourceCountMarkEnd();
Ends resource counting.
The function checks that the current number of resources in use is the same as that when resource counting started. If these values are not equal, the function panics the client thread associated with the most recent message, specifying the category name CSession and panic number 2.
virtual TInt CountResources();
Returns the number of resources currently in use.
The default implementation returns KErrGeneral
.
Derived classes which support resource counting must provide a suitable implementation.
|