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 the observer class for the Device Diagnostics |
|
15 * Application's Engine class. It is used to propagate engine |
|
16 * events to UI elements. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef DEVDIAGENGINEOBSERVER_H |
|
22 #define DEVDIAGENGINEOBSERVER_H |
|
23 |
|
24 /** |
|
25 * The observer class for the application engine. |
|
26 * |
|
27 * This class is an abstract interface which is used by the application |
|
28 * engine to pass events from itself and the diagnostics framework to the UI |
|
29 * components. |
|
30 */ |
|
31 class MDevDiagEngineObserver |
|
32 { |
|
33 |
|
34 public: // Data Types |
|
35 |
|
36 /** An enum which identifies different engine events. */ |
|
37 enum TAppEngineCommand |
|
38 { |
|
39 EDevDiagEngineCommandPluginLoadProgress, |
|
40 EDevDiagEngineCommandPluginLoadComplete, |
|
41 EDevDiagEngineCommandRunTimeReqs, |
|
42 EDevDiagEngineCommandTestExecutionBegin, |
|
43 EDevDiagEngineCommandProgressDataUpdated, |
|
44 EDevDiagEngineCommandResultsDataUpdated, |
|
45 EDevDiagEngineCommandSinglePluginExecutionDone, |
|
46 EDevDiagEngineCommandGroupExecutionDone, |
|
47 EDevDiagEngineCommandGroupExecutionProgress, |
|
48 EDevDiagEngineCommandTestExecutionSuspended, |
|
49 EDevDiagEngineCommandTestExecutionCancelled, |
|
50 EDevDiagEngineCommandTestExecutionResumed, |
|
51 EDevDiagEngineCommandObserverChanged, |
|
52 EDevDiagEngineCommandGetLastResults, |
|
53 EDevDiagEngineCommandViewSwitch, |
|
54 EDevDiagEngineCommandExecutionStopping |
|
55 }; |
|
56 |
|
57 |
|
58 public: // Pure Virtual Functions |
|
59 |
|
60 /** |
|
61 * The observer interface to inform of engine events. |
|
62 * |
|
63 * @param aCommand The engine event. |
|
64 * @param aError Any error code related to the event. |
|
65 * @param aCustom Any data related to the event. Ownership is not |
|
66 * transferred. The format of the data is determined by |
|
67 * the event type. |
|
68 */ |
|
69 virtual void HandleEngineCommandL( TAppEngineCommand aCommand, |
|
70 TInt aError, |
|
71 TAny* aCustom ) = 0; |
|
72 }; |
|
73 |
|
74 #endif // DEVDIAGENGINEOBSERVER_H |
|