1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
45 |
45 |
46 _LIT(KRegisterCountFile, "C:\\Register_ResultFile.txt"); |
46 _LIT(KRegisterCountFile, "C:\\Register_ResultFile.txt"); |
47 _LIT(KRestartCountFile, "C:\\Restart_ResultFile.txt"); |
47 _LIT(KRestartCountFile, "C:\\Restart_ResultFile.txt"); |
48 |
48 |
49 const TInt KMaxTestIdLength = 20; // TestId is of the format APPFWK-SYSMON-00xx |
49 const TInt KMaxTestIdLength = 20; // TestId is of the format APPFWK-SYSMON-00xx |
|
50 const TUid KTestSysMon={0x200086A8}; // Category value to be used to define restart P&S key |
50 |
51 |
51 class CSysMonTestHelper : public CBase |
52 class CSysMonTestHelper : public CBase |
52 { |
53 { |
53 public: |
54 public: |
54 IMPORT_C static TRecoveryMethod StringToRecoveryMethodL(const TDesC& aRecoveryMethodString); |
55 IMPORT_C static TRecoveryMethod StringToRecoveryMethodL(const TDesC& aRecoveryMethodString); |
55 IMPORT_C static void GetResultIntL(const TDesC& aTestId, TInt& aResult); |
56 IMPORT_C static void GetResultIntL(const TDesC& aTestId, TInt& aResult); |
56 IMPORT_C static void GetDeregResultIntL(const TDesC& aTestId, TInt& aResult); |
57 IMPORT_C static void GetDeregResultIntL(const TDesC& aTestId, TInt& aResult); |
57 IMPORT_C static TInt ReadRunCountL(const TDesC& aProcessFilename); |
58 IMPORT_C static TInt ReadRunCountL(const TDesC& aProcessFilename); |
58 IMPORT_C static void IncrementRunCountL(const TDesC& aProcessFilename); |
59 IMPORT_C static void IncrementRunCountL(const TDesC& aProcessFilename); |
59 IMPORT_C static TInt GetRestartCountL(); |
60 IMPORT_C static TInt GetRestartCountL(); |
60 IMPORT_C static TInt GetRegisterCountL(); |
61 IMPORT_C static TInt GetRegisterCount(TInt aKey); |
61 |
62 |
62 IMPORT_C static CSysMonTestHelper* NewLC(); |
63 IMPORT_C static CSysMonTestHelper* NewLC(); |
63 IMPORT_C static CSysMonTestHelper* NewL(); |
64 IMPORT_C static CSysMonTestHelper* NewL(); |
64 IMPORT_C ~CSysMonTestHelper(); |
65 IMPORT_C ~CSysMonTestHelper(); |
65 |
66 |