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