systemhealthmanagement/systemhealthmgr/inc/sysmonclisess.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SYSMONCLISESS_H__
       
    17 #define __SYSMONCLISESS_H__
       
    18 
       
    19 #include <e32std.h>
       
    20 
       
    21 class CStartupProperties;
       
    22 class CSsmStartupProperties;
       
    23 
       
    24 /**
       
    25 Client API for monitoring the applications and processes using System Monitor 
       
    26 Client can use this class to register for process/application monitoring. Upon failure 
       
    27 of the process/application, System Monitor will try to restart the process according to 
       
    28 the supplied parameters. If the process still fail to start after the retry limit is 
       
    29 reached or if the relaunch attempts exceeds the rate of failure policy, the recovery action 
       
    30 will be taken. The retry action can be ignore failure, restart the system, or restart the system with a specified startup mode, 
       
    31 and different PlatSec capability is required for each option. See API description for PlatSec capability 
       
    32 required.
       
    33 
       
    34 @publishedPartner
       
    35 @released
       
    36 */
       
    37 NONSHARABLE_CLASS (RSysMonSession) : public RSessionBase
       
    38 	{
       
    39 public:
       
    40 	IMPORT_C RSysMonSession();
       
    41 	
       
    42 	IMPORT_C void OpenL();
       
    43 	IMPORT_C void Close();
       
    44 	IMPORT_C void MonitorL(const CStartupProperties& aStartupProperties, const RProcess& aProcess, TBool aExecuteRecoveryMethodOnFailure=EFalse);
       
    45 	IMPORT_C void MonitorSelfL(const CStartupProperties& aStartupProperties);
       
    46 	IMPORT_C void CancelMonitorSelfL();
       
    47 	IMPORT_C void MonitorL(const CSsmStartupProperties& aSsmStartupProperties, const RProcess& aProcess, TBool aExecuteRecoveryMethodOnFailure=EFalse);
       
    48 	IMPORT_C void MonitorSelfL(const CSsmStartupProperties& aSsmStartupProperties);
       
    49 	IMPORT_C TInt CancelAllMonitors();
       
    50 		
       
    51 private:
       
    52 	void DoMonitorL(const CStartupProperties& aStartupProperties, const RProcess* aProcess, TBool aExecuteRecoveryMethodOnFailure);
       
    53 	static TInt Validate(const CStartupProperties& aStartupProperties);
       
    54 	CStartupProperties* ChangeToOldStylePropertiesL(const CSsmStartupProperties& aSsmStartupProperties) const;
       
    55 	};
       
    56 
       
    57 #endif