sysstatemgmt/systemstarter/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 
       
    23 /**
       
    24 Client API for monitoring the applications and processes using System Monitor 
       
    25 Client can use this class to register for process/application monitoring. Upon failure 
       
    26 of the process/application, System Monitor will try to restart the process according to 
       
    27 the supplied parameters. If the process still fail to start after the retry limit is 
       
    28 reached, the recovery action will be taken. The retry action can be ignore failure, 
       
    29 restart the system, or restart the system with a specified startup mode, and different 
       
    30 PlatSec capability is required for each option. See API description for PlatSec capabiolity 
       
    31 required.
       
    32 
       
    33 @publishedAll
       
    34 @released
       
    35 */
       
    36 NONSHARABLE_CLASS (RSysMonSession) : public RSessionBase
       
    37 	{
       
    38 public:
       
    39 	IMPORT_C RSysMonSession();
       
    40 	
       
    41 	IMPORT_C void OpenL();
       
    42 	IMPORT_C void Close();
       
    43 	IMPORT_C void MonitorL(const CStartupProperties& aStartupProperties, const RProcess& aProcess, TBool aExecuteRecoveryMethodOnFailure=EFalse);
       
    44 	IMPORT_C void MonitorSelfL(const CStartupProperties& aStartupProperties);
       
    45 	IMPORT_C void CancelMonitorSelfL();
       
    46 		
       
    47 private:
       
    48 	void DoMonitorL(const CStartupProperties& aStartupProperties, const RProcess* aProcess, TBool aExecuteRecoveryMethodOnFailure);
       
    49 	static TInt Validate(const CStartupProperties& aStartupProperties);
       
    50 	};
       
    51 
       
    52 #endif