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.
Constructor & Destructor Documentation
Member Functions Documentation
CancellationComplete(TInt, TInt)
void | CancellationComplete | ( | TInt | aComplete, |
| TInt | aCallerIndex |
| ) | |
ConstructL()
void | ConstructL | ( | ) | [private] |
DeRegisterCall(TInt)
TInt
| DeRegisterCall | ( | TInt | aCallerIndex | ) | [private] |
InitAppArcServer()
IMPORT_C TInt | InitAppArcServer | ( | ) | |
Waits for AppArc Server to initialise.
InitApparcServer(TRequestStatus &)
Async call to wait for Apparc Server to initialise.
Parameters
TRequestStatus & aCommandTrs | The TRequestStatus which is completed when applist is populated. |
InitApparcServerCancel()
IMPORT_C void | InitApparcServerCancel | ( | ) | |
Cancel Apparc Server initialization.
LoadApStartLibL()
void | LoadApStartLibL | ( | ) | [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()
void | LoadMonitorProxyLibL | ( | ) | [private] |
Load the dll interfacing between us and the System Monitor component, if installed.
RegisterCall(TInt &, TRequestStatus &)
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.
RendezvousComplete(TInt, TInt)
void | RendezvousComplete | ( | TInt | aComplete, |
| TInt | aCallerIndex |
| ) | |
Start(const CSsmStartupProperties &, RProcess &, TRequestStatus &, TInt &)
Asynchronous function to start a process or application.
Parameters
const CSsmStartupProperties & aStartupProperties | The startup-properties defining the app or process to be started. |
RProcess & aProcess | Handle on the process to be created. |
TRequestStatus & aCommandTrs | The TRequestStatus which is completed as a result of the process rendezvous or any error arising from the attempt. |
TInt & aCallerIndex | The 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 &)
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 & aStartupProperties | Startup properties provided by the caller. |
RProcess & aProcess | Handle on the process to be created. |
StartCancel(TInt &)
IMPORT_C void | StartCancel | ( | 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 & aCallerIndex | the 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 &)
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 & aStartupProperties | Startup properties provided by the caller. |
RProcess & aProcess | Handle on the process to be created. |
Member Data Documentation
CApaStarter * iApaStarter
TInt
iCallerCount
TInt
| iCallerCount | [private] |
RArray< TSsmStartSafeEntry > iStartSafeEntryArray
MSsmLoadSysMon * iSysMonCli
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.