|
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 header file for Diagnostics Battery Charger Cable Test Plug-in |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef DIAGBATTERYCHARGERCABLETESTPLUGIN_H |
|
20 #define DIAGBATTERYCHARGERCABLETESTPLUGIN_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <DiagResultsDatabaseItem.h> |
|
24 #include <DiagTestPluginBase.h> |
|
25 #include "diagbatterychargercallbackinterface.h" |
|
26 |
|
27 //CONSTANTS |
|
28 |
|
29 // MACROS |
|
30 |
|
31 // DATA TYPES |
|
32 |
|
33 // FUNCTION PROTOTYPES |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 class CDiagResultsDbItemBuilder; |
|
37 class CDiagBatteryChargerCableTestEngine; |
|
38 |
|
39 |
|
40 // CLASS DEFINITION |
|
41 |
|
42 /** |
|
43 * Diagnostics Battery Charger Cable Test Plug-in |
|
44 * This class is the main plug-in class for the Battery charger cable test plug-in |
|
45 */ |
|
46 class CDiagBatteryChargerCableTestPlugin : public CDiagTestPluginBase, |
|
47 public MDiagBatteryChargerTestCallBackInterface |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Symbian OS two-phased constructor |
|
53 * @return DataNetwork Test Plugin |
|
54 */ |
|
55 static MDiagPlugin* NewL( TAny* aInitParams ); |
|
56 |
|
57 /** |
|
58 * Destructor |
|
59 */ |
|
60 ~CDiagBatteryChargerCableTestPlugin(); |
|
61 |
|
62 private: // from MDiagBatteryChargerTestCallBackInterface |
|
63 |
|
64 /** |
|
65 * The engine class uses this interface to inform the plug-in class about the test result. |
|
66 */ |
|
67 void ReportTestResultL(CDiagResultsDatabaseItem::TResult aResult); |
|
68 |
|
69 /** |
|
70 * The engine class uses this callback on the plugin class to ask the user if the entire test |
|
71 * execution needs to be cancelled. |
|
72 * @param aUserResponse : The user response is returned in this reference argument. |
|
73 * |
|
74 * @return ETrue : The dialog was dismissed by the user. |
|
75 * EFalse : The dialog was dismissed internally. |
|
76 */ |
|
77 TBool AskCancelExecutionL(TInt& aUserResponse); |
|
78 |
|
79 // ADO & Platformization Changes |
|
80 TBool ShowMessageQueryL( TInt aResourceId, TInt &aButtonId ); |
|
81 |
|
82 private: // From CDiagTestPluginBase |
|
83 |
|
84 /** |
|
85 * @see CDiagTestPluginBase::Visible() |
|
86 */ |
|
87 TBool IsVisible() const; |
|
88 |
|
89 /** |
|
90 * @see CDiagTestPluginBase::RunMode() |
|
91 */ |
|
92 TRunMode RunMode() const; |
|
93 |
|
94 /** |
|
95 * @see CDiagTestPluginBase::TotalSteps() |
|
96 */ |
|
97 TUint TotalSteps() const; |
|
98 |
|
99 /** |
|
100 * @see CDiagTestPluginBase::GetPluginNameL |
|
101 */ |
|
102 HBufC* GetPluginNameL( TNameLayoutType aLayoutType ) const; |
|
103 |
|
104 /** |
|
105 * @see CDiagTestPluginBase::Uid |
|
106 */ |
|
107 TUid Uid() const; |
|
108 |
|
109 /** |
|
110 * Handle plug-in execution. |
|
111 * @see CDiagTestPluginBase::DoRunTestL |
|
112 */ |
|
113 void DoRunTestL(); |
|
114 |
|
115 /** |
|
116 * Clean up |
|
117 * @see CDiagTestPluginBase::DoStopAndCleanupL |
|
118 */ |
|
119 void DoStopAndCleanupL(); |
|
120 |
|
121 private: // New functions |
|
122 |
|
123 /** |
|
124 * C++ default constructor. |
|
125 */ |
|
126 CDiagBatteryChargerCableTestPlugin( CDiagPluginConstructionParam* aInitParams ); |
|
127 |
|
128 /** |
|
129 * Symbian OS second phase constructor. |
|
130 * |
|
131 */ |
|
132 void ConstructL(); |
|
133 |
|
134 protected: // from CActive |
|
135 /** |
|
136 * Handle active object completion event |
|
137 */ |
|
138 void RunL(); |
|
139 |
|
140 /** |
|
141 * Handle cancel |
|
142 */ |
|
143 void DoCancel(); |
|
144 |
|
145 private: // data |
|
146 |
|
147 /** Instance of the engine class for this test. Own */ |
|
148 CDiagBatteryChargerCableTestEngine *iEngine; |
|
149 }; |
|
150 |
|
151 #endif //DIAGBATTERYCHARGERCABLETESTPLUGIN_H |
|
152 |
|
153 // End of File |
|
154 |