RSubSessionBase Class Reference

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.

Constructor & Destructor Documentation

RSubSessionBase()

RSubSessionBase()[protected, inline]

Default constructor

Member Functions Documentation

CloseSubSession(TInt)

IMPORT_C voidCloseSubSession(TIntaFunction)[protected]

Parameters

TInt aFunction

CreateAutoCloseSubSession(RSessionBase &, TInt, const TIpcArgs &)

IMPORT_C TIntCreateAutoCloseSubSession(RSessionBase &aSession,
TIntaFunction,
const TIpcArgs &aArgs
)[protected]

Parameters

RSessionBase & aSession
TInt aFunction
const TIpcArgs & aArgs

CreateSubSession(const RSessionBase &, TInt, const TIpcArgs &)

TInt CreateSubSession(const RSessionBase &aSession,
TIntaFunction,
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.

Parameters

const RSessionBase & aSessionThe session to which this sub-session will belong.
TInt aFunctionThe opcode specifying the requested service; the server should interpret this as a request to create a sub-session.
const TIpcArgs & aArgsThe message arguments.

CreateSubSession(const RSessionBase &, TInt)

TInt CreateSubSession(const RSessionBase &aSession,
TIntaFunction
)[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.

Parameters

const RSessionBase & aSessionThe session to which this sub-session will belong.
TInt aFunctionThe opcode specifying the requested service; the server should interpret this as a request to create a sub-session.

DoCreateSubSession(const RSessionBase &, TInt, const TIpcArgs *)

IMPORT_C TIntDoCreateSubSession(const RSessionBase &aSession,
TIntaFunction,
const TIpcArgs *aArgs
)[private]

Parameters

const RSessionBase & aSession
TInt aFunction
const TIpcArgs * aArgs

DoCreateSubSession(RSessionBase &, TInt, const TIpcArgs *, TBool)

TInt DoCreateSubSession(RSessionBase &aSession,
TIntaFunction,
const TIpcArgs *aArgs,
TBoolaAutoClose
)[private]

Parameters

RSessionBase & aSession
TInt aFunction
const TIpcArgs * aArgs
TBool aAutoClose

DoSend(TInt, const TIpcArgs *)

IMPORT_C TIntDoSend(TIntaFunction,
const TIpcArgs *aArgs
)const [private]

Parameters

TInt aFunction
const TIpcArgs * aArgs

DoSendReceive(TInt, const TIpcArgs *, TRequestStatus &)

IMPORT_C voidDoSendReceive(TIntaFunction,
const TIpcArgs *aArgs,
TRequestStatus &aStatus
)const [private]

Parameters

TInt aFunction
const TIpcArgs * aArgs
TRequestStatus & aStatus

DoSendReceive(TInt, const TIpcArgs *)

IMPORT_C TIntDoSendReceive(TIntaFunction,
const TIpcArgs *aArgs
)const [private]

Parameters

TInt aFunction
const TIpcArgs * aArgs

Send(TInt, const TIpcArgs &)

TInt Send(TIntaFunction,
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.

Parameters

TInt aFunctionThe opcode specifying the requested service.
const TIpcArgs & aArgsThe message arguments.

Send(TInt)

TInt Send(TIntaFunction)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.

Parameters

TInt aFunctionThe opcode specifying the requested service.

SendReceive(TInt, const TIpcArgs &, TRequestStatus &)

voidSendReceive(TIntaFunction,
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.

Parameters

TInt aFunctionThe opcode specifying the requested service.
const TIpcArgs & aArgsThe message arguments.
TRequestStatus & aStatusA request status which indicates the completion status of the asynchronous request.

SendReceive(TInt, const TIpcArgs &)

TInt SendReceive(TIntaFunction,
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.

Parameters

TInt aFunctionThe opcode specifying the requested service.
const TIpcArgs & aArgsThe message arguments.

SendReceive(TInt, TRequestStatus &)

voidSendReceive(TIntaFunction,
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.

Parameters

TInt aFunctionThe opcode specifying the requested service.
TRequestStatus & aStatusA request status which indicates the completion status of the asynchronous request.

SendReceive(TInt)

TInt SendReceive(TIntaFunction)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.

Parameters

TInt aFunctionThe opcode specifying the requested service.

Session()

IMPORT_C const RSessionBaseSession()const [protected]

SubSessionHandle()

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.

Member Data Documentation

RSessionBase iSession

RSessionBase iSession[private]

TInt iSubSessionHandle

TInt iSubSessionHandle[private]