9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: EAP-MSCHAPv2 Old Password Input Dialog implementation |
14 * Description: |
|
15 * EAP-MSCHAPv2 Old Password Input Dialog implementation |
15 * |
16 * |
16 */ |
17 */ |
17 |
18 |
|
19 /* |
|
20 * %version: 5 % |
|
21 */ |
|
22 |
|
23 // System includes |
18 #include <HbAction> |
24 #include <HbAction> |
19 #include <HbTranslator> |
25 #include <HbTranslator> |
20 #include <eapqtvalidator.h> |
26 #include <eapqtvalidator.h> |
21 #include <eapqtexpandedeaptype.h> |
27 #include <eapqtexpandedeaptype.h> |
22 #include <eapqtconfiginterface.h> |
28 #include <eapqtconfiginterface.h> |
23 #include <eapqtconfig.h> |
29 #include <eapqtconfig.h> |
|
30 |
|
31 // User includes |
24 #include "eapmschapv2oldpwddialog.h" |
32 #include "eapmschapv2oldpwddialog.h" |
25 #include "OstTraceDefinitions.h" |
33 #include "OstTraceDefinitions.h" |
26 #ifdef OST_TRACE_COMPILER_IN_USE |
34 #ifdef OST_TRACE_COMPILER_IN_USE |
27 #endif |
35 #endif |
28 |
36 |
29 /** |
37 /*! |
30 * The constructor |
38 * \class EapMschapv2OldPwdDialog |
|
39 * \brief Implements EAP-MSCHAPv2 Old Password Input Dialog. |
|
40 */ |
|
41 |
|
42 // External function prototypes |
|
43 |
|
44 // Local constants |
|
45 |
|
46 // ======== LOCAL FUNCTIONS ======== |
|
47 |
|
48 // ======== MEMBER FUNCTIONS ======== |
|
49 |
|
50 /*! |
|
51 * Constructor. |
|
52 * |
|
53 * @param [in] parameters Parameters for the Constructor. |
31 */ |
54 */ |
32 EapMschapv2OldPwdDialog::EapMschapv2OldPwdDialog(const QVariantMap ¶meters) |
55 EapMschapv2OldPwdDialog::EapMschapv2OldPwdDialog(const QVariantMap ¶meters) |
33 :mEdit(NULL), |
56 :mEdit(NULL), |
34 mPwdValidator(NULL), |
57 mPwdValidator(NULL), |
35 mTranslator(new HbTranslator("eapprompts")), |
58 mTranslator(new HbTranslator("eapprompts")), |
43 |
66 |
44 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_EAPMSCHAPV2OLDPWDDIALOG_EXIT ); |
67 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_EAPMSCHAPV2OLDPWDDIALOG_EXIT ); |
45 qDebug("EapMschapv2OldPwdDialog::EapMschapv2OldPwdDialog EXIT"); |
68 qDebug("EapMschapv2OldPwdDialog::EapMschapv2OldPwdDialog EXIT"); |
46 } |
69 } |
47 |
70 |
48 /** |
71 /*! |
49 * The construction of the dialog |
72 * The construction of the dialog |
|
73 * |
|
74 * @param [in] parameters Parameters for the Construction of the dialog. |
50 */ |
75 */ |
51 void EapMschapv2OldPwdDialog::createDialog(const QVariantMap ¶meters ) |
76 void EapMschapv2OldPwdDialog::createDialog(const QVariantMap ¶meters ) |
52 { |
77 { |
53 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_CREATEDIALOG_ENTRY ); |
78 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_CREATEDIALOG_ENTRY ); |
54 qDebug("EapMschapv2OldPwdDialog::createDialog ENTER"); |
79 qDebug("EapMschapv2OldPwdDialog::createDialog ENTER"); |
122 // mPwdValidator: scoped pointer deleted automatically |
147 // mPwdValidator: scoped pointer deleted automatically |
123 |
148 |
124 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_DEAPMSCHAPV2OLDPWDDIALOG_EXIT ); |
149 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_DEAPMSCHAPV2OLDPWDDIALOG_EXIT ); |
125 } |
150 } |
126 |
151 |
127 /** |
152 /*! |
128 * Line edit validator |
153 * Line edit validator |
|
154 * |
|
155 * @return true if content is valid. |
129 */ |
156 */ |
130 bool EapMschapv2OldPwdDialog::validate() const |
157 bool EapMschapv2OldPwdDialog::validate() const |
131 { |
158 { |
132 qDebug("EapMschapv2OldPwdDialog::validate ENTER"); |
159 qDebug("EapMschapv2OldPwdDialog::validate ENTER"); |
133 |
160 |
140 |
167 |
141 qDebug("EapMschapv2OldPwdDialog::validate EXIT"); |
168 qDebug("EapMschapv2OldPwdDialog::validate EXIT"); |
142 return valid; |
169 return valid; |
143 } |
170 } |
144 |
171 |
145 /** |
172 /*! |
146 * Function is called when the Ok Action button is pressed |
173 * Function is called when the Ok Action button is pressed |
147 */ |
174 */ |
148 void EapMschapv2OldPwdDialog::okPressed() |
175 void EapMschapv2OldPwdDialog::okPressed() |
149 { |
176 { |
150 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_FIRSTBUTTONPRESSED_ENTRY ); |
177 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_OKPRESSED_ENTRY ); |
151 qDebug("EapMschapv2OldPwdDialog::okPressed ENTER"); |
178 qDebug("EapMschapv2OldPwdDialog::okPressed ENTER"); |
152 |
179 |
153 if ( validate() == true && mOkActionPressed == false ) { |
180 if ( validate() == true && mOkActionPressed == false ) { |
154 |
181 |
155 mOkActionPressed = true; |
182 mOkActionPressed = true; |
162 |
189 |
163 emit deviceDialogData(data); |
190 emit deviceDialogData(data); |
164 closeDeviceDialog(true); |
191 closeDeviceDialog(true); |
165 } |
192 } |
166 |
193 |
167 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_FIRSTBUTTONPRESSED_EXIT ); |
194 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_OKPRESSED_EXIT ); |
168 qDebug("EapMschapv2OldPwdDialog::okPressed EXIT"); |
195 qDebug("EapMschapv2OldPwdDialog::okPressed EXIT"); |
169 } |
196 } |
170 |
197 |
171 /** |
198 /*! |
172 * Function is called when the Cancel Action button is pressed |
199 * Function is called when the Cancel Action button is pressed |
173 */ |
200 */ |
174 void EapMschapv2OldPwdDialog::cancelPressed() |
201 void EapMschapv2OldPwdDialog::cancelPressed() |
175 { |
202 { |
176 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_CANCELPRESSED_ENTRY ); |
203 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_CANCELPRESSED_ENTRY ); |
182 } |
209 } |
183 qDebug("EapMschapv2OldPwdDialog::cancelPressed EXIT"); |
210 qDebug("EapMschapv2OldPwdDialog::cancelPressed EXIT"); |
184 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_CANCELPRESSED_EXIT ); |
211 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_CANCELPRESSED_EXIT ); |
185 } |
212 } |
186 |
213 |
187 /** |
214 /*! |
188 * Function is called when the dialog is about to close |
215 * Function is called when the dialog is about to close |
189 * |
|
190 */ |
216 */ |
191 void EapMschapv2OldPwdDialog::closingDialog() |
217 void EapMschapv2OldPwdDialog::closingDialog() |
192 { |
218 { |
193 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_CLOSINGDIALOG_ENTRY ); |
219 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_CLOSINGDIALOG_ENTRY ); |
194 qDebug("EapMschapv2OldPwdDialog::closingDialog ENTER"); |
220 qDebug("EapMschapv2OldPwdDialog::closingDialog ENTER"); |
196 |
222 |
197 qDebug("EapMschapv2OldPwdDialog::closingDialog EXIT"); |
223 qDebug("EapMschapv2OldPwdDialog::closingDialog EXIT"); |
198 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_CLOSINGDIALOG_EXIT ); |
224 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_CLOSINGDIALOG_EXIT ); |
199 } |
225 } |
200 |
226 |
201 /** |
227 /*! |
202 * Updating the dialog during its showing is not allowed. |
228 * Device dialog parameters to be set while dialog is displayed. |
|
229 * Not supported. |
|
230 * |
|
231 * @param [in] parameters NOT USED |
|
232 * @return true always. |
203 */ |
233 */ |
204 bool EapMschapv2OldPwdDialog::setDeviceDialogParameters |
234 bool EapMschapv2OldPwdDialog::setDeviceDialogParameters |
205 (const QVariantMap ¶meters) |
235 (const QVariantMap ¶meters) |
206 { |
236 { |
207 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY ); |
237 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY ); |
211 |
241 |
212 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT ); |
242 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT ); |
213 return true; |
243 return true; |
214 } |
244 } |
215 |
245 |
216 /** |
246 /*! |
217 * Not supported, 0 always returned |
247 * Not supported |
|
248 * |
|
249 * @return 0 always returned. |
218 */ |
250 */ |
219 int EapMschapv2OldPwdDialog::deviceDialogError() const |
251 int EapMschapv2OldPwdDialog::deviceDialogError() const |
220 { |
252 { |
221 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_DEVICEDIALOGERROR_ENTRY ); |
253 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_DEVICEDIALOGERROR_ENTRY ); |
222 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_DEVICEDIALOGERROR_EXIT); |
254 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_DEVICEDIALOGERROR_EXIT); |
223 return 0; |
255 return 0; |
224 } |
256 } |
225 |
257 |
226 /** |
258 /*! |
227 * Dialog is closed and the signal about closing is emitted |
259 * Dialog is closed and the signal about closing is emitted |
|
260 * |
|
261 * @param [in] byClient indicates when the user closes the dialog |
228 */ |
262 */ |
229 void EapMschapv2OldPwdDialog::closeDeviceDialog(bool byClient) |
263 void EapMschapv2OldPwdDialog::closeDeviceDialog(bool byClient) |
230 { |
264 { |
231 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_CLOSEDEVICEDIALOG_ENTRY ); |
265 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_CLOSEDEVICEDIALOG_ENTRY ); |
232 qDebug("EapMschapv2OldPwdDialog::closeDeviceDialog ENTER"); |
266 qDebug("EapMschapv2OldPwdDialog::closeDeviceDialog ENTER"); |
239 |
273 |
240 qDebug("EapMschapv2OldPwdDialog::closeDeviceDialog EXIT"); |
274 qDebug("EapMschapv2OldPwdDialog::closeDeviceDialog EXIT"); |
241 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_CLOSEDEVICEDIALOG_EXIT ); |
275 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_CLOSEDEVICEDIALOG_EXIT ); |
242 } |
276 } |
243 |
277 |
244 /** |
278 /*! |
245 * This dialog widget is returned to the caller |
279 * This dialog widget is returned to the caller |
|
280 * |
|
281 * @return this dialog widget |
246 */ |
282 */ |
247 HbPopup *EapMschapv2OldPwdDialog::deviceDialogWidget() const |
283 HbPopup *EapMschapv2OldPwdDialog::deviceDialogWidget() const |
248 { |
284 { |
249 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_DEVICEDIALOGWIDGET_ENTRY ); |
285 OstTraceFunctionEntry0( EAPMSCHAPV2OLDPWDDIALOG_DEVICEDIALOGWIDGET_ENTRY ); |
250 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_DEVICEDIALOGWIDGET_EXIT ); |
286 OstTraceFunctionExit0( EAPMSCHAPV2OLDPWDDIALOG_DEVICEDIALOGWIDGET_EXIT ); |