|
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: Class declaration for CDiagPluginExecPlan |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef DIAGPLUGINEXECPLAN_H |
|
20 #define DIAGPLUGINEXECPLAN_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> // CBase |
|
24 |
|
25 // FORWARD DECLARATION |
|
26 class MDiagPlugin; |
|
27 class MDiagExecPlanEntry; |
|
28 |
|
29 /** |
|
30 * Diagnostics Plugin Execution Plan |
|
31 * |
|
32 * This class provides interface to access execution plan. |
|
33 * It also provides interface to modify execution plan. |
|
34 * A cursor to currently executing item is also maintained. |
|
35 * |
|
36 */ |
|
37 class MDiagPluginExecPlan |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Access an item in plan. |
|
42 * |
|
43 * @param aIndex - index |
|
44 * @return Reference to plan entry at given index. |
|
45 */ |
|
46 virtual const MDiagExecPlanEntry& operator[]( TInt aIndex ) const = 0; |
|
47 |
|
48 /** |
|
49 * Get current execution plan item. |
|
50 * |
|
51 * @return Reference to currently executing plan item. |
|
52 */ |
|
53 virtual const MDiagExecPlanEntry& CurrentExecutionItem() const = 0; |
|
54 |
|
55 /** |
|
56 * Returns index of execution cursor. Note that this index |
|
57 * includes both suite plug-in and test plug-in. |
|
58 * |
|
59 * If only interested about test plug-ins. use CurrentTestIndex(). |
|
60 * |
|
61 * @return Index to current execution cursor. |
|
62 */ |
|
63 virtual TInt CurrentIndex() const = 0; |
|
64 |
|
65 /** |
|
66 * Returns total number of items in the plan. Note that this count |
|
67 * includes both suite plug-in and test plug-in. |
|
68 |
|
69 * If only interested only test plug-ins. use TestCount(). |
|
70 * |
|
71 * @return Number of items in the test plan. |
|
72 */ |
|
73 virtual TInt Count() const = 0; |
|
74 |
|
75 /** |
|
76 * Get current test index. |
|
77 * |
|
78 * Note that only test plug-ins (MDiagTestPlugin) are counted in this |
|
79 * case. Suite pre/post execution are not. You cannot use this value |
|
80 * with [] operator since this is not a real index. |
|
81 * |
|
82 * To get real cursor index, use GetCurrentIndex(). |
|
83 * |
|
84 * @param aIncludeDependency If ETrue, test index will also include |
|
85 * plugins that are included as dependency. |
|
86 * @return current test index. |
|
87 */ |
|
88 virtual TInt CurrentTestIndex( TBool aIncludeDependency ) const = 0; |
|
89 |
|
90 /** |
|
91 * Get total test count. |
|
92 * |
|
93 * Note that only test plug-ins (MDiagTestPlugin) are counted in this |
|
94 * case. Suite pre/post execution are not. You cannot use this value |
|
95 * with [] operator since this is not a real count. |
|
96 * |
|
97 * To get the real number of items in the plan, use GetCount(). |
|
98 * |
|
99 * @param aIncludeDependency If ETrue, test index will also include |
|
100 * plug-ins that are included as dependency. |
|
101 * @return current test index. |
|
102 */ |
|
103 virtual TInt TestCount( TBool aIncludeDependency ) const = 0; |
|
104 |
|
105 /** |
|
106 * Check if this is the last test being executed. |
|
107 * |
|
108 * Note that only test plug-ins (MDiagTestPlugin) are counted in this |
|
109 * case. Suite pre/post execution are not. |
|
110 * If you are interested in checking if it is currently running |
|
111 * the last plug-in, including test and suites, @see IsLastPlugin() |
|
112 * |
|
113 * @return ETrue plan is executing the last test plug-in. |
|
114 */ |
|
115 virtual TBool IsLastTest() const = 0; |
|
116 |
|
117 /** |
|
118 * Check if this is the last plug-in being executed. |
|
119 * |
|
120 * Note that this includes both test plug-ins and suite plug-ins. |
|
121 * If you are interested in checking the progress on tests only, |
|
122 * @see IsLastTest() |
|
123 * |
|
124 * @return ETrue plan is executing the last test or suite plug-in. |
|
125 */ |
|
126 virtual TBool IsLastPlugin() const = 0; |
|
127 |
|
128 /** |
|
129 * Returns the plug-in index that plan is resuming from. |
|
130 * If this session is not a resume session, this will return 0 (first index). |
|
131 * Otherwise, this index will point the first real execution item. |
|
132 * |
|
133 * Note that this value will not change as test session progresses. Even |
|
134 * as test progresses, this value will still point to the index that |
|
135 * this session is being resumed from. |
|
136 * |
|
137 * @return Index of which session is being resumed from. |
|
138 */ |
|
139 virtual TInt ResumeIndex() const = 0; |
|
140 }; |
|
141 |
|
142 #endif // DIAGPLUGINEXECPLAN_H |
|
143 |
|
144 // End of File |
|
145 |