|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 /** |
|
24 @file |
|
25 @internalTechnology |
|
26 */ |
|
27 |
|
28 #ifndef __T_CONCURRENTCERTSTORE_H__ |
|
29 #define __T_CONCURRENTCERTSTORE_H__ |
|
30 |
|
31 #include "t_certstoreactions.h" |
|
32 #include "t_testactionspec.h" |
|
33 #include "t_output.h" |
|
34 |
|
35 // This class can be used to flag concurrent certstore testing |
|
36 // It inherits from CTestAction so it can be used in the script |
|
37 // but otherwise doesn't carry out any test. |
|
38 // When in a script and enabled, the concurrent tester singleton |
|
39 // is initialised and can then be referenced by all following tests in |
|
40 // various performance operations |
|
41 |
|
42 class CTestConcurrentCertStore : public CCertStoreTestAction |
|
43 { |
|
44 public: |
|
45 static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, |
|
46 const TTestActionSpec& aTestActionSpec); |
|
47 static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole, Output& aOut, |
|
48 const TTestActionSpec& aTestActionSpec); |
|
49 ~CTestConcurrentCertStore(); |
|
50 public: |
|
51 virtual void PerformAction(TRequestStatus& aStatus); |
|
52 protected: |
|
53 CTestConcurrentCertStore(RFs& aFs, CConsoleBase& aConsole, Output& aOut); |
|
54 private: |
|
55 virtual void DoReportAction(); |
|
56 virtual void DoCheckResult(TInt aError); |
|
57 virtual void DoPerformPrerequisite(TRequestStatus& aStatus); |
|
58 virtual void DoPerformPostrequisite(TRequestStatus& aStatus); |
|
59 private: |
|
60 void ConstructL(const TTestActionSpec& aTestActionSpec); |
|
61 }; |
|
62 |
|
63 class CConcurrentTester : public CBase |
|
64 { |
|
65 public: |
|
66 static void SetDoingConcurrentTesting(TBool aTestConcurrent); |
|
67 static TBool IsDoingConcurrentTesting(); |
|
68 public: |
|
69 static void SanitizeTestResult(Output& aOut, TBool& aResult); |
|
70 private: |
|
71 CConcurrentTester(); |
|
72 ~CConcurrentTester(); |
|
73 }; |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 #endif // __T_CONCURRENTCERTSTORE_H__ |