class RSessionBase : public RHandleBase |
Client-side handle to a session with a server.
This is the client-side interface through which communication with the server is channelled.
Clients normally define and implement a derived class to provide a richer interface.
Public Member Functions | |
---|---|
IMPORT_C TInt | Open(RMessagePtr2, TInt, TOwnerType) |
IMPORT_C TInt | Open(RMessagePtr2, TInt, const TSecurityPolicy &, TOwnerType) |
IMPORT_C TInt | Open(TInt, TOwnerType) |
IMPORT_C TInt | Open(TInt, const TSecurityPolicy &, TOwnerType) |
TInt | SetReturnedHandle(TInt) |
IMPORT_C TInt | SetReturnedHandle(TInt, const TSecurityPolicy &) |
TInt | ShareAuto() |
TInt | ShareProtected() |
Protected Member Functions | |
---|---|
TInt | CreateSession(const TDesC &, const TVersion &) |
IMPORT_C TInt | CreateSession(const TDesC &, const TVersion &, TInt) |
IMPORT_C TInt | CreateSession(const TDesC &, const TVersion &, TInt, TIpcSessionType, const TSecurityPolicy *, TRequestStatus *) |
TInt | CreateSession(RServer2, const TVersion &) |
IMPORT_C TInt | CreateSession(RServer2, const TVersion &, TInt) |
IMPORT_C TInt | CreateSession(RServer2, const TVersion &, TInt, TIpcSessionType, const TSecurityPolicy *, TRequestStatus *) |
TInt | CreateSession(const TDesC &, const TVersion &, TInt, TRequestStatus *) |
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) |
TInt | SetReturnedHandle(TInt, RHandleBase &) |
Private Member Functions | |
---|---|
TInt | DoConnect(const TVersion &, TRequestStatus *) |
IMPORT_C TInt | DoSend(TInt, const TIpcArgs *) |
IMPORT_C void | DoSendReceive(TInt, const TIpcArgs *, TRequestStatus &) |
IMPORT_C TInt | DoSendReceive(TInt, const TIpcArgs *) |
IMPORT_C TInt | DoShare(TInt) |
TInt | SendAsync(TInt, const TIpcArgs *, TRequestStatus *) |
TInt | SendSync(TInt, const TIpcArgs *) |
Public Member Enumerations | |
---|---|
enum | TAttachMode { EExplicitAttach, EAutoAttach } |
Inherited Enumerations | |
---|---|
RHandleBase:TAttributes |
Inherited Attributes | |
---|---|
RHandleBase::iHandle |
TInt | CreateSession | ( | const TDesC & | aServer, |
const TVersion & | aVersion | |||
) | [protected, inline] |
Creates a session with a server, specifying no message slots.
It should be called as part of session initialisation in the derived class.
Message slots are not pre-allocated for the session but are taken from a system-wide pool allowing up to 255 asynchronous messages to be outstanding. This raises a risk of failure due to lack of memory and, therefore, this mode of operation is not viable for sessions that make guarantees about the failure modes of asynchonous services.
KErrNone if successful, otherwise one of the other system-wide error codes.
IMPORT_C TInt | CreateSession | ( | const TDesC & | aServer, |
const TVersion & | aVersion, | |||
TInt | aAsyncMessageSlots | |||
) | [protected] |
IMPORT_C TInt | CreateSession | ( | const TDesC & | aServer, |
const TVersion & | aVersion, | |||
TInt | aAsyncMessageSlots, | |||
TIpcSessionType | aType, | |||
const TSecurityPolicy * | aPolicy = 0, | |||
TRequestStatus * | aStatus = 0 | |||
) | [protected] |
const TDesC & aServer | |
const TVersion & aVersion | |
TInt aAsyncMessageSlots | |
TIpcSessionType aType | |
const TSecurityPolicy * aPolicy = 0 | |
TRequestStatus * aStatus = 0 |
TInt | CreateSession | ( | RServer2 | aServer, |
const TVersion & | aVersion | |||
) | [protected, inline] |
Creates a session with a server, specifying no message slots.
It should be called as part of session initialisation in the derived class.
Message slots are not pre-allocated for the session but are taken from a system-wide pool allowing up to 255 asynchronous messages to be outstanding. This raises a risk of failure due to lack of memory and, therefore, this mode of operation is not viable for sessions that make guarantees about the failure modes of asynchonous services.
KErrNone if successful, otherwise one of the other system-wide error codes.
IMPORT_C TInt | CreateSession | ( | RServer2 | aServer, |
const TVersion & | aVersion, | |||
TInt | aAsyncMessageSlots | |||
) | [protected] |
IMPORT_C TInt | CreateSession | ( | RServer2 | aServer, |
const TVersion & | aVersion, | |||
TInt | aAsyncMessageSlots, | |||
TIpcSessionType | aType, | |||
const TSecurityPolicy * | aPolicy = 0, | |||
TRequestStatus * | aStatus = 0 | |||
) | [protected] |
RServer2 aServer | |
const TVersion & aVersion | |
TInt aAsyncMessageSlots | |
TIpcSessionType aType | |
const TSecurityPolicy * aPolicy = 0 | |
TRequestStatus * aStatus = 0 |
TInt | CreateSession | ( | const TDesC & | aServer, |
const TVersion & | aVersion, | |||
TInt | aAsyncMessageSlots, | |||
TRequestStatus * | aStatus | |||
) | [protected, inline] |
Use CreateSession(const TDesC& aServer,const TVersion& aVersion,TInt aAsyncMessageSlots,TIpcSessionType aType,const TSecurityPolicy* aPolicy=0, TRequestStatus* aStatus=0);
const TDesC & aServer | |
const TVersion & aVersion | |
TInt aAsyncMessageSlots | |
TRequestStatus * aStatus |
TInt | DoConnect | ( | const TVersion & | aVersion, |
TRequestStatus * | aStatus | |||
) | [private] |
const TVersion & aVersion | |
TRequestStatus * aStatus |
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] |
IMPORT_C TInt | Open | ( | RMessagePtr2 | aMessage, |
TInt | aParam, | |||
TOwnerType | aType = EOwnerProcess | |||
) |
RMessagePtr2 aMessage | |
TInt aParam | |
TOwnerType aType = EOwnerProcess |
IMPORT_C TInt | Open | ( | RMessagePtr2 | aMessage, |
TInt | aParam, | |||
const TSecurityPolicy & | aServerPolicy, | |||
TOwnerType | aType = EOwnerProcess | |||
) |
RMessagePtr2 aMessage | |
TInt aParam | |
const TSecurityPolicy & aServerPolicy | |
TOwnerType aType = EOwnerProcess |
IMPORT_C TInt | Open | ( | TInt | aArgumentIndex, |
TOwnerType | aType = EOwnerProcess | |||
) |
TInt aArgumentIndex | |
TOwnerType aType = EOwnerProcess |
IMPORT_C TInt | Open | ( | TInt | aArgumentIndex, |
const TSecurityPolicy & | aServerPolicy, | |||
TOwnerType | aType = EOwnerProcess | |||
) |
TInt aArgumentIndex | |
const TSecurityPolicy & aServerPolicy | |
TOwnerType aType = EOwnerProcess |
TInt | Send | ( | TInt | aFunction, |
const TIpcArgs & | aArgs | |||
) | const [protected, inline] |
Issues a blind request to the server with the specified function number, and arguments.
A blind request is one where the server does not issue a response to the client.
KErrNone, if the send operation is successful; KErrServerTerminated, if the server no longer present; KErrServerBusy, if there are no message slots available; KErrNoMemory, if there is insufficient memory available.
panic
USER 72 if the function number is negative.
TInt | Send | ( | TInt | aFunction | ) | const [protected, inline] |
Issues a blind request to the server with the specified function number, but with no arguments.
A blind request is one where the server does not issue a response to the client.
KErrNone, if the send operation is successful; KErrServerTerminated, if the server no longer present; KErrServerBusy, if there are no message slots available; KErrNoMemory, if there is insufficient memory available.
panic
USER 72 if the function number is negative.
TInt aFunction | The function number identifying the request. |
TInt | SendAsync | ( | TInt | aFunction, |
const TIpcArgs * | aArgs, | |||
TRequestStatus * | aStatus | |||
) | const [private] |
TInt aFunction | |
const TIpcArgs * aArgs | |
TRequestStatus * aStatus |
void | SendReceive | ( | TInt | aFunction, |
const TIpcArgs & | aArgs, | |||
TRequestStatus & | aStatus | |||
) | const [protected, inline] |
Issues an asynchronous request to the server with the specified function number and arguments.
The completion status of the request is returned via the request status object, aStatus.
panic
USER 72 if the function number is negative.
TInt aFunction | The function number identifying the request. |
const TIpcArgs & aArgs | A set of up to 4 arguments and their types to be passed to the server. |
TRequestStatus & aStatus | The request status object used to contain the completion status of the request. |
TInt | SendReceive | ( | TInt | aFunction, |
const TIpcArgs & | aArgs | |||
) | const [protected, inline] |
Issues a synchronous request to the server with the specified function number and arguments.
KErrNone, if the send operation is successful; KErrServerTerminated, if the server no longer present; KErrServerBusy, if there are no message slots available; KErrNoMemory, if there is insufficient memory available.
panic
USER 72 if the function number is negative.
void | SendReceive | ( | TInt | aFunction, |
TRequestStatus & | aStatus | |||
) | const [protected, inline] |
Issues an asynchronous request to the server with the specified function number, but with no arguments.
The completion status of the request is returned via the request status object, aStatus.
panic
USER 72 if the function number is negative.
TInt aFunction | The function number identifying the request. |
TRequestStatus & aStatus | The request status object used to contain the completion status of the request. |
TInt | SendReceive | ( | TInt | aFunction | ) | const [protected, inline] |
Issues a synchronous request to the server with the specified function number, but with no arguments.
KErrNone, if the send operation is successful; KErrServerTerminated, if the server no longer present; KErrServerBusy, if there are no message slots available; KErrNoMemory, if there is insufficient memory available.
panic
USER 72 if the function number is negative.
TInt aFunction | The function number identifying the request. |
TInt | SendSync | ( | TInt | aFunction, |
const TIpcArgs * | aArgs | |||
) | const [private] |
TInt | SetReturnedHandle | ( | TInt | aHandleOrError | ) | [inline] |
Sets the handle-number of this handle to the specified value.
The function can take a (zero or positive) handle-number, or a (negative) error number.
If aHandleOrError represents a handle-number, then the handle-number of this handle is set to that value. If aHandleOrError represents an error number, then the handle-number of this handle is set to zero and the negative value is returned.
KErrNone, if aHandle is a handle-number; the value of aHandleOrError, otherwise.
TInt aHandleOrError | A handle-number, if zero or positive; an error value, if negative. |
IMPORT_C TInt | SetReturnedHandle | ( | TInt | aHandleOrError, |
const TSecurityPolicy & | aServerPolicy | |||
) |
TInt aHandleOrError | |
const TSecurityPolicy & aServerPolicy |
TInt | SetReturnedHandle | ( | TInt | aHandleOrError, |
RHandleBase & | aHandle | |||
) | [protected, static, inline] |
TInt aHandleOrError | |
RHandleBase & aHandle |
TInt | ShareAuto | ( | ) | [inline] |
Creates a session that can be shared by other threads in the current process.
After calling this function the session object may be used by threads other than than the one that created it.
Note that this can only be done with servers that mark their sessions as sharable.
KErrNone, if the session is successfully shared; KErrNoMmemory, if the attempt fails for lack of memory.
panic
KERN-EXEC 23 The session cannot be shared.
TInt | ShareProtected | ( | ) | [inline] |
Creates a session handle that can be be passed via IPC to another process as well as being shared by other threads in the current process.
After calling this function the session object may be used by threads other than than the one that created it.
Note that this can only be done with servers that mark their sessions as globally sharable.
KErrNone, if the session is successfully shared; KErrNoMmemory, if the attempt fails for lack of memory.
panic
KERN-EXEC 23 The session cannot be shared.