| 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.
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)
| Public Member Functions | |
|---|---|
| ~CSession2() | |
| IMPORT_C TInt | CountResources() |
| IMPORT_C void | ResourceCountMarkEnd(const RMessage2 &) |
| IMPORT_C void | ResourceCountMarkStart() |
| const CServer2 * | Server() |
| IMPORT_C void | ServiceError(const RMessage2 &, TInt) |
| void | ServiceL(const RMessage2 &) |
| IMPORT_C void | SetServer(const CServer2 *) |
| Protected Member Functions | |
|---|---|
| CSession2() | |
| IMPORT_C void | Disconnect(const RMessage2 &) |
| IMPORT_C TInt | Extension_(TUint, TAny *&, TAny *) |
| Private Member Functions | |
|---|---|
| IMPORT_C void | CreateL() |
| Public Member Enumerations | |
|---|---|
| enum | TPanicNo { ESesCountResourcesNotImplemented = 1, ESesFoundResCountHeaven } |
| Private Attributes | |
|---|---|
| TDblQueLink | iLink |
| TInt | iResourceCountMark |
| const CServer2 * | iServer |
| TAny * | iSpare |
| IMPORT_C void | Disconnect | ( | const RMessage2 & | aMessage | ) | [protected, virtual] |
| const RMessage2 & aMessage |
| IMPORT_C TInt | Extension_ | ( | TUint | aExtensionId, |
| TAny *& | a0, | |||
| TAny * | a1 | |||
| ) | [protected, virtual] | |||
| IMPORT_C void | ResourceCountMarkEnd | ( | const RMessage2 & | aMessage | ) |
| const RMessage2 & aMessage |
| 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.
| IMPORT_C void | ServiceError | ( | const RMessage2 & | aMessage, |
| TInt | aError | |||
| ) | [virtual] | |||
| void | ServiceL | ( | 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.
| const RMessage2 & aMessage | The message containing the details of the client request. |
| IMPORT_C void | SetServer | ( | const CServer2 * | aServer | ) |
| const CServer2 * aServer |