sysstatemgmt/systemstateplugins/cmncustomcmd/inc/cmdpersistreboots.h
changeset 70 653a8b91b95e
parent 64 61992147389a
child 72 d25e1504e8e9
child 73 d38941471f1c
equal deleted inserted replaced
64:61992147389a 70:653a8b91b95e
     1 // Copyright (c) 2008-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 /**
       
    17  @file
       
    18  @internalComponent
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef __CMDPERSISTREBOOTS_H__
       
    23 #define __CMDPERSISTREBOOTS_H__
       
    24 
       
    25 #include <s32file.h>
       
    26 #include <s32mem.h>
       
    27 
       
    28 #include <ssm/ssmcustomcommand.h>
       
    29 #include <ssm/cmdpersistreboots.hrh>
       
    30 
       
    31 NONSHARABLE_CLASS (CCustomCmdPersistReboots) : public CBase, public MSsmCustomCommand
       
    32 	{
       
    33 public:
       
    34 	static CCustomCmdPersistReboots* NewL();
       
    35 	TUint8 BootCountFromLogL();
       
    36 
       
    37 	// From MSsmCustomCommand
       
    38 	TInt Initialize(CSsmCustomCommandEnv* aCmdEnv);
       
    39 	void Execute(const TDesC8& aParams, TRequestStatus& aStatus);
       
    40 	void Close();
       
    41 	void Release();
       
    42 	void ExecuteCancel();
       
    43 	
       
    44 private:
       
    45 	CCustomCmdPersistReboots();
       
    46 	~CCustomCmdPersistReboots();
       
    47 
       
    48 	void ConstructL();
       
    49 	void IncrementBootCountL();
       
    50 	void ResetBootCountL();
       
    51 	TCustCmdPersistRebootExecuteOption ExtractExecuteOptionL(const TDesC8& aParams);
       
    52 	void LogBootupCountL(TUint8 aCount);
       
    53 	void CreateLogIfNotExistL();
       
    54 private:
       
    55 	RFs iFs;
       
    56 	RBuf iBootupInfoPath;
       
    57 	};
       
    58 
       
    59 #endif // __CMDPERSISTREBOOTS_H__