class RSubSessionBase |
Client-side handle to a sub-session.
It represents a client-side sub-session, and has a corresponding sub-session object on the server-side.
Clients normally define and implement a derived class to provide a richer interface. In particular, a derived class should:
1. provide a function to create a new sub-session with the server; this should call CreateSubSession().
2. provide a function to close the current sub-session; this should call CloseSubSession().
A session must already exist with a server before a client can establish any sub-sessions.
Public Member Functions | |
---|---|
TInt | SubSessionHandle() |
Protected Member Functions | |
---|---|
RSubSessionBase() | |
IMPORT_C void | CloseSubSession(TInt) |
IMPORT_C TInt | CreateAutoCloseSubSession(RSessionBase &, TInt, const TIpcArgs &) |
TInt | CreateSubSession(const RSessionBase &, TInt, const TIpcArgs &) |
TInt | CreateSubSession(const RSessionBase &, TInt) |
TInt | Send(TInt, const TIpcArgs &) |
TInt | Send(TInt) |
void | SendReceive(TInt, const TIpcArgs &, TRequestStatus &) |
TInt | SendReceive(TInt, const TIpcArgs &) |
void | SendReceive(TInt, TRequestStatus &) |
TInt | SendReceive(TInt) |
IMPORT_C const RSessionBase | Session() |
Private Member Functions | |
---|---|
IMPORT_C TInt | DoCreateSubSession(const RSessionBase &, TInt, const TIpcArgs *) |
TInt | DoCreateSubSession(RSessionBase &, TInt, const TIpcArgs *, TBool) |
IMPORT_C TInt | DoSend(TInt, const TIpcArgs *) |
IMPORT_C void | DoSendReceive(TInt, const TIpcArgs *, TRequestStatus &) |
IMPORT_C TInt | DoSendReceive(TInt, const TIpcArgs *) |
Private Attributes | |
---|---|
RSessionBase | iSession |
TInt | iSubSessionHandle |
IMPORT_C void | CloseSubSession | ( | TInt | aFunction | ) | [protected] |
TInt aFunction |
IMPORT_C TInt | CreateAutoCloseSubSession | ( | RSessionBase & | aSession, |
TInt | aFunction, | |||
const TIpcArgs & | aArgs | |||
) | [protected] |
RSessionBase & aSession | |
TInt aFunction | |
const TIpcArgs & aArgs |
TInt | CreateSubSession | ( | const RSessionBase & | aSession, |
TInt | aFunction, | |||
const TIpcArgs & | aArgs | |||
) | [protected, inline] |
Creates a new sub-session within an existing session.
KErrNone if successful, otherwise one of the system-wide error codes.
const RSessionBase & aSession | The session to which this sub-session will belong. |
TInt aFunction | The opcode specifying the requested service; the server should interpret this as a request to create a sub-session. |
const TIpcArgs & aArgs | The message arguments. |
TInt | CreateSubSession | ( | const RSessionBase & | aSession, |
TInt | aFunction | |||
) | [protected, inline] |
Creates a new sub-session within an existing session.
This variant sends no message arguments to the server.
KErrNone if successful, otherwise one of the system-wide error codes.
const RSessionBase & aSession | The session to which this sub-session will belong. |
TInt aFunction | The opcode specifying the requested service; the server should interpret this as a request to create a sub-session. |
IMPORT_C TInt | DoCreateSubSession | ( | const RSessionBase & | aSession, |
TInt | aFunction, | |||
const TIpcArgs * | aArgs | |||
) | [private] |
const RSessionBase & aSession | |
TInt aFunction | |
const TIpcArgs * aArgs |
TInt | DoCreateSubSession | ( | RSessionBase & | aSession, |
TInt | aFunction, | |||
const TIpcArgs * | aArgs, | |||
TBool | aAutoClose | |||
) | [private] |
RSessionBase & aSession | |
TInt aFunction | |
const TIpcArgs * aArgs | |
TBool aAutoClose |
IMPORT_C TInt | DoSend | ( | TInt | aFunction, |
const TIpcArgs * | aArgs | |||
) | const [private] |
IMPORT_C void | DoSendReceive | ( | TInt | aFunction, |
const TIpcArgs * | aArgs, | |||
TRequestStatus & | aStatus | |||
) | const [private] |
TInt aFunction | |
const TIpcArgs * aArgs | |
TRequestStatus & aStatus |
IMPORT_C TInt | DoSendReceive | ( | TInt | aFunction, |
const TIpcArgs * | aArgs | |||
) | const [private] |
TInt | Send | ( | TInt | aFunction, |
const TIpcArgs & | aArgs | |||
) | const [protected, inline] |
Sends a blind message to the server - no reply is expected.
A set of message arguments is passed that can be used to specify client addresses, which the server can use to read from and write to the client address space.
Note that this function can fail if there are no available message-slots, either in the system wide pool (if this is being used), or in the session reserved pool (if this is being used). If the client request is synchronous, then always use the synchronous variant of SendReceive(); this is guaranteed to reach the server.
KErrNone if successful, otherwise one of the system-wide error codes.
TInt | Send | ( | TInt | aFunction | ) | const [protected, inline] |
Sends a blind message to the server - no reply is expected.
This variant sends no message arguments to the server.
KErrNone if successful, otherwise one of the system-wide error codes.
TInt aFunction | The opcode specifying the requested service. |
void | SendReceive | ( | TInt | aFunction, |
const TIpcArgs & | aArgs, | |||
TRequestStatus & | aStatus | |||
) | const [protected, inline] |
Sends a message to the server and waits asynchronously for the reply.
An opcode specifies the service required. A set of message arguments is passed that can be used to specify client addresses, which the server can use to read from and write to the client address space.
Note that this function can fail if there are no available message-slots, either in the system wide pool (if this is being used), or in the session reserved pool (if this is being used). If the client request is synchronous, then always use the synchronous variant of SendReceive(); this is guaranteed to reach the server.
TInt aFunction | The opcode specifying the requested service. |
const TIpcArgs & aArgs | The message arguments. |
TRequestStatus & aStatus | A request status which indicates the completion status of the asynchronous request. |
TInt | SendReceive | ( | TInt | aFunction, |
const TIpcArgs & | aArgs | |||
) | const [protected, inline] |
Sends a message to the server and waits synchronously for a reply.
An opcode specifies the service required. A set of message arguments is passed that can be used to specify client addresses, which the server can use to read from and write to the client address space.
Note that this function will only fail if the server itself fails or environmental errors occur in the server. All requests made using this function are guaranteed to reach the server. This means that all synchronous client requests (typically those that return void) should be routed through this synchronous variant of SendReceive().
KErrNone if successful, otherwise one of the system-wide error codes.
void | SendReceive | ( | TInt | aFunction, |
TRequestStatus & | aStatus | |||
) | const [protected, inline] |
Sends a message to the server and waits asynchronously for the reply.
An opcode specifies the service required. This variant sends no message arguments to the server.
TInt aFunction | The opcode specifying the requested service. |
TRequestStatus & aStatus | A request status which indicates the completion status of the asynchronous request. |
TInt | SendReceive | ( | TInt | aFunction | ) | const [protected, inline] |
Sends a message to the server and waits synchronously for a reply.
An opcode specifies the service required. This variant sends no message arguments to the server.
KErrNone if successful, otherwise one of the system-wide error codes.
TInt aFunction | The opcode specifying the requested service. |
TInt | SubSessionHandle | ( | ) | const [inline] |
Gets the sub-session handle number.
This number is automatically passed to the server when making requests and is used to identify the appropriate server-side sub-session.
The sub-session handle number.