1 /* |
|
2 * Copyright (c) 2007 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 "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: This is a test suite i.e. contains collection of tests. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef DIAGSUITEPLUGIN_H |
|
21 #define DIAGSUITEPLUGIN_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <DiagPlugin.h> // MDiagPlugin |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MDiagSuiteObserver; |
|
28 class MDiagEngineCommon; |
|
29 class CDiagPluginPool; |
|
30 class TDiagSuiteExecParam; |
|
31 |
|
32 /** |
|
33 * Test suite plug-in abstract interface. |
|
34 * |
|
35 * @since S60 v5.0 |
|
36 **/ |
|
37 class MDiagSuitePlugin: public MDiagPlugin |
|
38 { |
|
39 public: //DATA STRUCTURES |
|
40 |
|
41 /** |
|
42 * Defines sorting algorithm. |
|
43 **/ |
|
44 enum TSortOrder |
|
45 { |
|
46 ENotSorted, |
|
47 ESortByPosition |
|
48 }; |
|
49 |
|
50 /** |
|
51 * Reason for execution stop. |
|
52 **/ |
|
53 enum TStopReason |
|
54 { |
|
55 ESkip, |
|
56 ECancelAll, |
|
57 EWatchdog |
|
58 }; |
|
59 |
|
60 public: // new API |
|
61 |
|
62 /** |
|
63 * Get children of this plug-in. The pointer array is guaranteed to |
|
64 * be sorted defined by TSortOrder. |
|
65 * @param aChildren Children are appended into this array. |
|
66 * @param aOrder Sorting algorithm. |
|
67 **/ |
|
68 virtual void GetChildrenL( RPointerArray<MDiagPlugin>& aChildren, |
|
69 TSortOrder aOrder ) const = 0; |
|
70 |
|
71 /** |
|
72 * Add one child. Child can be either a test suite or a test plug-in. |
|
73 * @param aChild - Child to be added. Ownership is transferred to |
|
74 * MDiagPluginSuite. |
|
75 **/ |
|
76 virtual void AddChildL( MDiagPlugin* aChild ) = 0; |
|
77 |
|
78 /** |
|
79 * Called before one of its test plug-in is executed. Note that it will |
|
80 * not be called if two of its children plug-ins are executed in |
|
81 * sequence. |
|
82 * |
|
83 * @param aExecParams Parameters for suite pre execution |
|
84 * @param aSkipDependencyCheck - If ETrue dependency is disabled |
|
85 * for this test session. |
|
86 * @param aDependencyExecution - If ETrue, this suite is being |
|
87 * executed to satisfy dependency. |
|
88 **/ |
|
89 virtual void PrepareChildrenExecutionL( TDiagSuiteExecParam* aParam, |
|
90 TBool aSkipDependencyCheck, |
|
91 TBool aDependencyExecution ) = 0; |
|
92 |
|
93 /** |
|
94 * Called before test execution switches to another test suite. |
|
95 * |
|
96 * @param aExecParams Parameters for suite post execution |
|
97 * @param aSkipDependencyCheck - If ETrue dependency is disabled |
|
98 * for this test session. |
|
99 * @param aDependencyExecution - If ETrue, this suite is being |
|
100 * executed to satisfy dependency. |
|
101 **/ |
|
102 virtual void FinalizeChildrenExecutionL( TDiagSuiteExecParam* aParam, |
|
103 TBool aSkipDependencyCheck, |
|
104 TBool aDependencyExecution ) = 0; |
|
105 |
|
106 /** |
|
107 * Get the Uids. The uid is used for database access. |
|
108 * Test suites return a list of their childrens' uids. |
|
109 * |
|
110 * @param aUids An UID array. |
|
111 * @param aOrder Sorting algorithm. |
|
112 **/ |
|
113 virtual void GetChildrenUidsL( RArray<TUid>& aUids, |
|
114 TSortOrder aOrder ) const = 0; |
|
115 |
|
116 /** |
|
117 * Cancels pre/post execution. Cancellation is expected to be synchronous. |
|
118 * Suite plug-in must not call ContinueExecutionL(). |
|
119 * |
|
120 * @param aReason - Reason why ExecutionStopL() is being called. |
|
121 **/ |
|
122 virtual void ExecutionStopL( TStopReason aReason ) = 0; |
|
123 }; |
|
124 |
|
125 #endif // DIAGSUITEPLUGIN_H |
|
126 |
|
127 // End of File |
|
128 |
|