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 definition of CDiagEngine |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // CLASS DECLARATION |
|
20 #include "diagengineimpl.h" |
|
21 |
|
22 // SYSTEM INCLUDE FILES |
|
23 #include <DiagEngine.h> |
|
24 |
|
25 // USER INCLUDE FILES |
|
26 #include "diagframework.pan" // For Panics codes. |
|
27 |
|
28 #include "diagpluginexecplan.h" // ADO & Platformization Changes |
|
29 #include "diagexecplanentryimpltest.h" // ADO & Platformization Changes |
|
30 // ======== LOCAL FUNCTIONS ======== |
|
31 |
|
32 |
|
33 // ======== MEMBER FUNCTIONS ======== |
|
34 |
|
35 |
|
36 // --------------------------------------------------------------------------- |
|
37 // CDiagEngine::NewL() |
|
38 // --------------------------------------------------------------------------- |
|
39 // |
|
40 EXPORT_C CDiagEngine* CDiagEngine::NewL( CAknViewAppUi& aViewAppUi, |
|
41 MDiagEngineObserver& aObserver, |
|
42 RDiagResultsDatabase& aDbSession, |
|
43 CDiagPluginPool& aPluginPool, |
|
44 TBool aDisableDependency, |
|
45 const RArray< TUid >& aExecutionBatch ) |
|
46 { |
|
47 CDiagEngine* self = CDiagEngine::NewLC( aViewAppUi, |
|
48 aObserver, |
|
49 aDbSession, |
|
50 aPluginPool, |
|
51 aDisableDependency, |
|
52 aExecutionBatch ); |
|
53 |
|
54 CleanupStack::Pop( self ); |
|
55 return self; |
|
56 } |
|
57 |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // CDiagEngine::NewLC() |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 EXPORT_C CDiagEngine* CDiagEngine::NewLC( CAknViewAppUi& aViewAppUi, |
|
64 MDiagEngineObserver& aObserver, |
|
65 RDiagResultsDatabase& aDbSession, |
|
66 CDiagPluginPool& aPluginPool, |
|
67 TBool aDisableDependency, |
|
68 const RArray< TUid >& aExecutionBatch ) |
|
69 { |
|
70 CDiagEngine* self = new ( ELeave ) CDiagEngine(); |
|
71 CleanupStack::PushL( self ); |
|
72 |
|
73 self->iEngineImpl = CDiagEngineImpl::NewL( aViewAppUi, |
|
74 aObserver, |
|
75 aDbSession, |
|
76 aPluginPool, |
|
77 aDisableDependency, |
|
78 aExecutionBatch ); |
|
79 return self; |
|
80 } |
|
81 |
|
82 // --------------------------------------------------------------------------- |
|
83 // CDiagEngine::NewL() |
|
84 // --------------------------------------------------------------------------- |
|
85 // |
|
86 EXPORT_C CDiagEngine* CDiagEngine::NewL( CAknViewAppUi& aViewAppUi, |
|
87 MDiagEngineObserver& aObserver, |
|
88 RDiagResultsDatabase& aDbSession, |
|
89 CDiagPluginPool& aPluginPool, |
|
90 TUid aIncompleteRecordUid ) |
|
91 { |
|
92 CDiagEngine* self = CDiagEngine::NewLC( aViewAppUi, |
|
93 aObserver, |
|
94 aDbSession, |
|
95 aPluginPool, |
|
96 aIncompleteRecordUid ); |
|
97 |
|
98 CleanupStack::Pop( self ); |
|
99 return self; |
|
100 } |
|
101 |
|
102 |
|
103 // --------------------------------------------------------------------------- |
|
104 // CDiagEngine::NewLC() |
|
105 // --------------------------------------------------------------------------- |
|
106 // |
|
107 EXPORT_C CDiagEngine* CDiagEngine::NewLC( CAknViewAppUi& aViewAppUi, |
|
108 MDiagEngineObserver& aObserver, |
|
109 RDiagResultsDatabase& aDbSession, |
|
110 CDiagPluginPool& aPluginPool, |
|
111 TUid aIncompleteRecordUid ) |
|
112 { |
|
113 CDiagEngine* self = new ( ELeave ) CDiagEngine(); |
|
114 CleanupStack::PushL( self ); |
|
115 |
|
116 self->iEngineImpl = CDiagEngineImpl::NewL( aViewAppUi, |
|
117 aObserver, |
|
118 aDbSession, |
|
119 aPluginPool, |
|
120 aIncompleteRecordUid ); |
|
121 return self; |
|
122 } |
|
123 |
|
124 |
|
125 // --------------------------------------------------------------------------- |
|
126 // CDiagEngine::~CDiagEngine |
|
127 // --------------------------------------------------------------------------- |
|
128 // |
|
129 EXPORT_C CDiagEngine::~CDiagEngine() |
|
130 { |
|
131 delete iEngineImpl; |
|
132 iEngineImpl = NULL; |
|
133 } |
|
134 |
|
135 |
|
136 // --------------------------------------------------------------------------- |
|
137 // CDiagEngine::ExecuteL |
|
138 // --------------------------------------------------------------------------- |
|
139 // |
|
140 EXPORT_C void CDiagEngine::ExecuteL() |
|
141 { |
|
142 iEngineImpl->ExecuteL(); |
|
143 } |
|
144 |
|
145 // --------------------------------------------------------------------------- |
|
146 // CDiagEngine::SetCustomParam |
|
147 // --------------------------------------------------------------------------- |
|
148 // |
|
149 EXPORT_C void CDiagEngine::SetCustomParam( TAny* aCustomParams ) |
|
150 { |
|
151 __ASSERT_ALWAYS( aCustomParams, Panic( EDiagFrameworkBadArgument ) ); |
|
152 iEngineImpl->SetCustomParam( aCustomParams ); |
|
153 } |
|
154 |
|
155 // --------------------------------------------------------------------------- |
|
156 // CDiagEngine::SuspendL |
|
157 // --------------------------------------------------------------------------- |
|
158 // |
|
159 EXPORT_C void CDiagEngine::SuspendL() |
|
160 { |
|
161 iEngineImpl->SuspendL(); |
|
162 } |
|
163 |
|
164 // --------------------------------------------------------------------------- |
|
165 // CDiagEngine::ResumeL |
|
166 // --------------------------------------------------------------------------- |
|
167 // |
|
168 EXPORT_C void CDiagEngine::ResumeL() |
|
169 { |
|
170 iEngineImpl->ResumeL(); |
|
171 } |
|
172 |
|
173 |
|
174 |
|
175 // --------------------------------------------------------------------------- |
|
176 // From class MDiagEngineCommon |
|
177 // CDiagEngine::ExecutionPlanL |
|
178 // --------------------------------------------------------------------------- |
|
179 // |
|
180 const MDiagPluginExecPlan& CDiagEngine::ExecutionPlanL() const |
|
181 { |
|
182 return iEngineImpl->ExecutionPlanL(); |
|
183 } |
|
184 |
|
185 |
|
186 // --------------------------------------------------------------------------- |
|
187 // From class MDiagEngineCommon |
|
188 // CDiagEngine::ExecutionStopL |
|
189 // --------------------------------------------------------------------------- |
|
190 // |
|
191 void CDiagEngine::ExecutionStopL( TCancelMode aCancelMode ) |
|
192 { |
|
193 iEngineImpl->ExecutionStopL( aCancelMode ); |
|
194 } |
|
195 |
|
196 |
|
197 // --------------------------------------------------------------------------- |
|
198 // From class MDiagEngineCommon |
|
199 // CDiagEngine::ResetWatchdog |
|
200 // --------------------------------------------------------------------------- |
|
201 // |
|
202 void CDiagEngine::ResetWatchdog() |
|
203 { |
|
204 iEngineImpl->ResetWatchdog(); |
|
205 } |
|
206 |
|
207 |
|
208 // --------------------------------------------------------------------------- |
|
209 // From class MDiagEngineCommon |
|
210 // CDiagEngine::ResetWatchdog |
|
211 // --------------------------------------------------------------------------- |
|
212 // |
|
213 void CDiagEngine::ResetWatchdog( TDiagEngineWatchdogTypes aWatchdogType ) |
|
214 { |
|
215 iEngineImpl->ResetWatchdog( aWatchdogType ); |
|
216 } |
|
217 |
|
218 |
|
219 // --------------------------------------------------------------------------- |
|
220 // From class MDiagEngineCommon |
|
221 // CDiagEngine::ResetWatchdog |
|
222 // --------------------------------------------------------------------------- |
|
223 // |
|
224 void CDiagEngine::ResetWatchdog( TTimeIntervalMicroSeconds32 aExpectedTimeToComplete ) |
|
225 { |
|
226 iEngineImpl->ResetWatchdog( aExpectedTimeToComplete ); |
|
227 } |
|
228 |
|
229 // --------------------------------------------------------------------------- |
|
230 // From class MDiagEngineCommon |
|
231 // CDiagEngine::ViewAppUi |
|
232 // --------------------------------------------------------------------------- |
|
233 // |
|
234 CAknViewAppUi& CDiagEngine::ViewAppUi() |
|
235 { |
|
236 return iEngineImpl->ViewAppUi(); |
|
237 } |
|
238 |
|
239 // --------------------------------------------------------------------------- |
|
240 // From class MDiagEngineCommon |
|
241 // CDiagEngine::ViewAppUi |
|
242 // --------------------------------------------------------------------------- |
|
243 // |
|
244 const CAknViewAppUi& CDiagEngine::ViewAppUi() const |
|
245 { |
|
246 return iEngineImpl->ViewAppUi(); |
|
247 } |
|
248 |
|
249 |
|
250 // --------------------------------------------------------------------------- |
|
251 // From class MDiagEngineCommon |
|
252 // CDiagEngine::DbRecord |
|
253 // --------------------------------------------------------------------------- |
|
254 // |
|
255 RDiagResultsDatabaseRecord& CDiagEngine::DbRecord() |
|
256 { |
|
257 return iEngineImpl->DbRecord(); |
|
258 } |
|
259 |
|
260 // --------------------------------------------------------------------------- |
|
261 // From class MDiagEngineCommon |
|
262 // CDiagEngine::DbRecord |
|
263 // --------------------------------------------------------------------------- |
|
264 // |
|
265 const RDiagResultsDatabaseRecord& CDiagEngine::DbRecord() const |
|
266 { |
|
267 return iEngineImpl->DbRecord(); |
|
268 } |
|
269 |
|
270 // --------------------------------------------------------------------------- |
|
271 // From class MDiagEngineCommon |
|
272 // CDiagEngine::DbRecord |
|
273 // --------------------------------------------------------------------------- |
|
274 // |
|
275 CDiagPluginPool& CDiagEngine::PluginPool() |
|
276 { |
|
277 return iEngineImpl->PluginPool(); |
|
278 } |
|
279 |
|
280 // --------------------------------------------------------------------------- |
|
281 // From class MDiagEngineCommon |
|
282 // CDiagEngine::DbRecord |
|
283 // --------------------------------------------------------------------------- |
|
284 // |
|
285 const CDiagPluginPool& CDiagEngine::PluginPool() const |
|
286 { |
|
287 return iEngineImpl->PluginPool(); |
|
288 } |
|
289 |
|
290 // --------------------------------------------------------------------------- |
|
291 // From class MDiagEngineCommon |
|
292 // CDiagEngine::AddToConfigListL |
|
293 // --------------------------------------------------------------------------- |
|
294 // |
|
295 void CDiagEngine::AddToConfigListL( MDiagEngineCommon::TConfigListType aListType, |
|
296 const TDesC& aText ) |
|
297 { |
|
298 return iEngineImpl->AddToConfigListL( aListType, aText ); |
|
299 } |
|
300 |
|
301 // --------------------------------------------------------------------------- |
|
302 // From class MDiagEngineCommon |
|
303 // CDiagEngine::RemoveFromConfigListL |
|
304 // --------------------------------------------------------------------------- |
|
305 // |
|
306 void CDiagEngine::RemoveFromConfigListL( MDiagEngineCommon::TConfigListType aListType, |
|
307 const TDesC& aText ) |
|
308 { |
|
309 return iEngineImpl->RemoveFromConfigListL( aListType, aText ); |
|
310 } |
|
311 |
|
312 // --------------------------------------------------------------------------- |
|
313 // From class MDiagEngineCommon |
|
314 // CDiagEngine::CreateCommonDialogLC |
|
315 // --------------------------------------------------------------------------- |
|
316 // |
|
317 CAknDialog* CDiagEngine::CreateCommonDialogLC( TDiagCommonDialog aDialogType, |
|
318 TAny* aInitData ) |
|
319 { |
|
320 return iEngineImpl->CreateCommonDialogLC( aDialogType, aInitData ); |
|
321 } |
|
322 |
|
323 // --------------------------------------------------------------------------- |
|
324 // From class MDiagEngineCommon |
|
325 // CDiagEngine::ExecuteAppCommandL |
|
326 // --------------------------------------------------------------------------- |
|
327 // |
|
328 void CDiagEngine::ExecuteAppCommandL( TDiagAppCommand aCommand, |
|
329 TAny* aParam1, |
|
330 TAny* aParam2 ) |
|
331 { |
|
332 iEngineImpl->ExecuteAppCommandL( aCommand, aParam1, aParam2 ); |
|
333 } |
|
334 |
|
335 // --------------------------------------------------------------------------- |
|
336 // From class MDiagEngineCommon |
|
337 // CDiagEngine::StopWatchdogTemporarily |
|
338 // --------------------------------------------------------------------------- |
|
339 // |
|
340 void CDiagEngine::StopWatchdogTemporarily() |
|
341 { |
|
342 iEngineImpl->StopWatchdogTemporarily(); |
|
343 } |
|
344 |
|
345 // --------------------------------------------------------------------------- |
|
346 // From class MDiagEngineCommon |
|
347 // CDiagEngine::IsDependencyDisabled |
|
348 // --------------------------------------------------------------------------- |
|
349 // |
|
350 TBool CDiagEngine::IsDependencyDisabled() const |
|
351 { |
|
352 return iEngineImpl->IsDependencyDisabled(); |
|
353 } |
|
354 |
|
355 // --------------------------------------------------------------------------- |
|
356 // From class MDiagEngineCommon |
|
357 // CDiagEngine::CustomParam |
|
358 // --------------------------------------------------------------------------- |
|
359 // |
|
360 TAny* CDiagEngine::CustomParam() const |
|
361 { |
|
362 return iEngineImpl->CustomParam(); |
|
363 } |
|
364 |
|
365 |
|
366 // ADO & Platformization Changes |
|
367 |
|
368 ///@@@KSR: changes for Codescanner error val = High |
|
369 //EXPORT_C TBool CDiagEngine::GetPluginDependency() |
|
370 EXPORT_C TBool CDiagEngine::GetPluginDependencyL() |
|
371 { |
|
372 return iEngineImpl->ExecutionPlanL().CurrentExecutionItem().AsDependency(); |
|
373 } |
|
374 |
|
375 // End of File |
|
376 |
|