CSsmStartSafe Class Reference

class CSsmStartSafe : public CBase

Used to start a process or application reliably. Which means, if the starting fails after designated number of attempts then system restarts or an error is returned.

Inherits from

Constructor & Destructor Documentation

CSsmStartSafe()

CSsmStartSafe()[private]

~CSsmStartSafe()

~CSsmStartSafe()

Member Functions Documentation

CancellationComplete(TInt, TInt)

voidCancellationComplete(TIntaComplete,
TIntaCallerIndex
)

Parameters

TInt aComplete
TInt aCallerIndex

ConstructL()

voidConstructL()[private]

DeRegisterCall(TInt)

TInt DeRegisterCall(TIntaCallerIndex)[private]

Parameters

TInt aCallerIndex

InitAppArcServer()

IMPORT_C TIntInitAppArcServer()

Waits for AppArc Server to initialise.

InitApparcServer(TRequestStatus &)

IMPORT_C voidInitApparcServer(TRequestStatus &aCommandTrs)

Async call to wait for Apparc Server to initialise.

Parameters

TRequestStatus & aCommandTrsThe TRequestStatus which is completed when applist is populated.

InitApparcServerCancel()

IMPORT_C voidInitApparcServerCancel()

Cancel Apparc Server initialization.

LoadApStartLibL()

voidLoadApStartLibL()[private]

Load the library. Locate and call the ordinal corresponding to CApStart::NewL().

Note: We do not leave in the case of being unable to load the libray, but assume Apparc is not present. iApaStarter is checked for NULL before use passim and appropriate error code supplied if it is. The return code is derived from the loader-server (Base) and not closely specified in RLibrary docs or code.

LoadMonitorProxyLibL()

voidLoadMonitorProxyLibL()[private]

Load the dll interfacing between us and the System Monitor component, if installed.

NewL()

IMPORT_C CSsmStartSafe *NewL()[static]

Used to create an instance of CSsmStartSafe class

NewLC()

IMPORT_C CSsmStartSafe *NewLC()[static]

RegisterCall(TInt &, TRequestStatus &)

TInt RegisterCall(TInt &aCallerIndex,
TRequestStatus &aStatus
)[private]

Add the caller to the array of callers. Supply an index which identifies the caller. In the case a call to one of the cancel functions, the caller identifies themselves by this index.

Parameters

TInt & aCallerIndex
TRequestStatus & aStatus

RendezvousComplete(TInt, TInt)

voidRendezvousComplete(TIntaComplete,
TIntaCallerIndex
)

Parameters

TInt aComplete
TInt aCallerIndex

Start(const CSsmStartupProperties &, RProcess &, TRequestStatus &, TInt &)

IMPORT_C voidStart(const CSsmStartupProperties &aStartupProperties,
RProcess &aProcess,
TRequestStatus &aCommandTrs,
TInt &aCallerIndex
)

Asynchronous function to start a process or application.

Parameters

const CSsmStartupProperties & aStartupPropertiesThe startup-properties defining the app or process to be started.
RProcess & aProcessHandle on the process to be created.
TRequestStatus & aCommandTrsThe TRequestStatus which is completed as a result of the process rendezvous or any error arising from the attempt.
TInt & aCallerIndexThe index integer supplied by this call. This value should be perserved and passed in the case of a call to StartCancel()

StartAndMonitorL(const CSsmStartupProperties &, RProcess &)

IMPORT_C voidStartAndMonitorL(const CSsmStartupProperties &aStartupProperties,
RProcess &aProcess
)

Used to start a process or application and initiate monitoring. Use this for ESsmWaitForSignal or ESsmDeferredWaitForSignal. The number-of-retries parameter in aStartupProperties applies to the startup procedure. If monitoring is not successfully setup, the started process is killed and this function leaves with the error code supplied by the system-monitor.

leave
KErrArgument if the monitor flag is not set in aStartupProperties, or if the execution behaviour is ESsmFireandForget.
leave
KErrNotSupported if the system monitor sub-system is not installed.
leave
Another of the system-wide error codes
StartL

Parameters

const CSsmStartupProperties & aStartupPropertiesStartup properties provided by the caller.
RProcess & aProcessHandle on the process to be created.

StartCancel(TInt &)

IMPORT_C voidStartCancel(TInt &aCallerIndex)

Calling cancel precipitates the destruction of the rendezvous-observer/timeoutwaiter. These are AOs and so cancellation of any outstanding rendezvous is implied.

Parameters

TInt & aCallerIndexthe index value supplied by the async CSsmStartSafe::StartL(). This is set to a large negative value upon completion of the operation to guard against multiple calls, or KErrArgument if the index is out of range.

StartL(const CSsmStartupProperties &, RProcess &)

IMPORT_C voidStartL(const CSsmStartupProperties &aStartupProperties,
RProcess &aProcess
)

Synchronous function to start a process or application. Note: This API should be used only if one synchronous call to StartL at any one time can be assured.

leave
KErrNoMemory if no memory.
leave
KErrArgument if the TStartMethod enumeration in aStartupProperties is out of range.
leave
KErrTimedOut if the Application or process failed to rendezvous within the interval specified in aStartupProperties.
leave
Or one of the system-wide error codes

Parameters

const CSsmStartupProperties & aStartupPropertiesStartup properties provided by the caller.
RProcess & aProcessHandle on the process to be created.

Member Data Documentation

RLibrary iApStartLib

RLibrary iApStartLib[private]

CApaStarter * iApaStarter

CApaStarter *iApaStarter[private]

TInt iCallerCount

TInt iCallerCount[private]

RArray< TSsmStartSafeEntry > iStartSafeEntryArray

RArray< TSsmStartSafeEntry >iStartSafeEntryArray[private]

MSsmLoadSysMon * iSysMonCli

MSsmLoadSysMon *iSysMonCli[private]

RLibrary iSysMonProxyLib

RLibrary iSysMonProxyLib[private]