#include <scs/scsclient.h>
Link against: scsclient.lib
class RScsClientBase : public RSessionBase |
Public Member Functions | |
---|---|
IMPORT_C void | Close() |
IMPORT_C TInt | ResetServerHeapFail() |
IMPORT_C TInt | SetServerHeapFail(TInt) |
IMPORT_C TInt | ShutdownServer() |
Protected Member Functions | |
---|---|
RScsClientBase() | |
IMPORT_C TInt | CallSessionFunction(TInt) |
IMPORT_C TInt | CallSessionFunction(TInt, const TIpcArgs &) |
IMPORT_C void | CallSessionFunction(TInt, const TIpcArgs &, TRequestStatus &) |
IMPORT_C void | CancelSessionFunction(TInt) |
IMPORT_C TInt | Connect(const TDesC &, const TVersion &, const TDesC &, const TUidType &) |
Inherited Attributes | |
---|---|
RHandleBase::iHandle |
Inherited Enumerations | |
---|---|
RHandleBase:TAttributes | |
RSessionBase:TAttachMode |
Provides functionality to connect to the server, starting the server process if necessary. This class cannot be used directly - the SCS implementor must define a subclass.
IMPORT_C | RScsClientBase | ( | ) | [protected] |
This constructor is protected to ensure this class is not instantiated directly.
Send a command to the corresponding server-side session. The subclass uses this function instead of directly calling RSubSessionBase::SendReceive because it adds the SCS code which marks this as an ordinary session call.
Parameters | |
---|---|
aFunction | Function identifier. Bits 31:24 must be zero, because they are reserved for SCS commands. |
Send a command to the corresponding server-side session. The subclass uses this function instead of directly calling RSubSessionBase::SendReceive because it adds the SCS code which marks this as an ordinary session call.
Parameters | |
---|---|
aFunction | Session function identifier. Bits 31:24 must be zero, because they are reserved for SCS commands. |
aArgs | Standard IPC arguments. |
IMPORT_C void | CallSessionFunction | ( | TInt | aFunction, |
const TIpcArgs & | aArgs, | |||
TRequestStatus & | aStatus | |||
) | const [protected] |
Send the supplied function identifier and arguments to the server-side session. The subclass uses this function instead of directly calling RSubSessionBase::SendReceive because it adds the SCS code which marks this as an ordinary session call.
Parameters | |
---|---|
aFunction | Session function identifier. Bits 31:24 must be zero, because they are reserved for SCS commands. |
aArgs | Standard IPC arguments. |
aStatus | This will be completed by the server when it has finished handling the function. |
IMPORT_C void | CancelSessionFunction | ( | TInt | aFunction | ) | const [protected] |
Cancel an outstanding session request. This has no effect if the request is not outstanding.
Parameters | |
---|---|
aFunction | Implementation function. This must be the same value that was supplied to CallSessionFunction. |
IMPORT_C void | Close | ( | ) |
Reimplemented from RHandleBase::Close()
This method should be used in preference to RScsSessionBase::Close because it sends a message to cancel any outstanding requests on the session or its subsessions.
IMPORT_C TInt | Connect | ( | const TDesC & | aSvrName, |
const TVersion & | aReqVer, | |||
const TDesC & | aExeName, | |||
const TUidType & | aFullExeUid | |||
) | [protected] |
Attempt to connect to the named server. If the server is not available then attempt to start its hosting process.
Parameters | |
---|---|
aSvrName | Name of server to connect to. |
aReqVer | Required server version. |
aExeName | Executable which hosts the server. This function will launch this executable if the server is not running. |
aFullExeUid | The server executable's full UID. This ensures the intended executable is started, and not another executable with the same name. |
IMPORT_C TInt | ResetServerHeapFail | ( | ) |
Finish marking the server heap and reset the failure rate. This should match a previous call to SetServerHeapFail.
If there is a heap imbalance, then the server will be panicked.
This function is empty in release builds.
See also: SetServerHeapFail __UHEAP_MARKEND __UHEAP_RESET
Start marking the server heap and set a deterministic fail rate. This should matched with a call to EndServerHeapFail.
This function is empty in release builds.
See also: EndServerHeapFail __UHEAP_MARK __UHEAP_SETFAIL
Parameters | |
---|---|
aRate | Number of allocations after which allocation should fail on the server heap. |
IMPORT_C TInt | ShutdownServer | ( | ) |
DEBUG USE ONLY - Tells the server to shutdown down ASAP, and block until it has done so. This also closes the current session.
If the server is not configured to use a inactivity shutdown timer, this will fail with KErrNotSupported.
nb. You may still need to call the Close function of a derived class to ensure it gets to cleanup...