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: Fast Pac Store Password Query Dialog implementation |
14 * Description: EAP-FAST PAC Store Password Query Dialog implementation |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 5 % |
19 * %version: 6 % |
20 */ |
20 */ |
21 |
21 |
|
22 // System includes |
22 #include <HbTranslator> |
23 #include <HbTranslator> |
23 #include <HbAction> |
24 #include <HbAction> |
24 #include <HbTranslator> |
25 #include <HbTranslator> |
25 #include <HbMessageBox> |
26 #include <HbMessageBox> |
26 #include <HbParameterLengthLimiter> |
27 #include <HbParameterLengthLimiter> |
27 #include <eapqtvalidator.h> |
28 #include <eapqtvalidator.h> |
28 #include <eapqtexpandedeaptype.h> |
29 #include <eapqtexpandedeaptype.h> |
29 #include <eapqtconfiginterface.h> |
30 #include <eapqtconfiginterface.h> |
30 #include <eapqtconfig.h> |
31 #include <eapqtconfig.h> |
|
32 |
|
33 // User includes |
31 #include "eapfastpacstorepwquerydialog.h" |
34 #include "eapfastpacstorepwquerydialog.h" |
32 #include "OstTraceDefinitions.h" |
35 #include "OstTraceDefinitions.h" |
33 #ifdef OST_TRACE_COMPILER_IN_USE |
36 #ifdef OST_TRACE_COMPILER_IN_USE |
34 #endif |
37 #endif |
35 |
38 |
36 |
39 |
37 /** |
40 /*! |
38 * The constructor |
41 * \class EapFastPacStorePwQueryDialog |
|
42 * \brief Implements EAP-FAST PAC Store Password Query Dialog. |
|
43 */ |
|
44 |
|
45 // External function prototypes |
|
46 |
|
47 // Local constants |
|
48 static const uint PacStorePwQueryTimeout = 60000; |
|
49 |
|
50 // ======== LOCAL FUNCTIONS ======== |
|
51 |
|
52 // ======== MEMBER FUNCTIONS ======== |
|
53 |
|
54 /*! |
|
55 * Constructor. |
|
56 * |
|
57 * @param [in] parameters Parameters for the Constructor. |
39 */ |
58 */ |
40 EapFastPacStorePwQueryDialog::EapFastPacStorePwQueryDialog(const QVariantMap ¶meters) |
59 EapFastPacStorePwQueryDialog::EapFastPacStorePwQueryDialog(const QVariantMap ¶meters) |
41 :mEdit(NULL), |
60 :mEdit(NULL), |
42 mPwdValidator(NULL), |
61 mPwdValidator(NULL), |
43 mTranslator(new HbTranslator("eapprompts")), |
62 mTranslator(new HbTranslator("eapprompts")), |
44 mErrMsgTranslator(new HbTranslator("cpdestinationplugin")), |
63 mErrMsgTranslator(new HbTranslator("cpdestinationplugin")), |
45 mClose(false) |
64 mClose(false) |
46 { |
65 { |
47 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_EAPFASTPACSTOREPWQUERYDIALOG_ENTRY ); |
66 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_EAPFASTPACSTOREPWQUERYDIALOG_ENTRY ); |
48 qDebug("EapFastPacStorePwQueryDialog::EapFastPacStorePwQueryDialog ENTER"); |
67 qDebug("EapFastPacStorePwQueryDialog::EapFastPacStorePwQueryDialog ENTER"); |
|
68 |
|
69 Q_UNUSED(parameters) |
49 |
70 |
50 createDialog(parameters); |
71 createDialog(); |
51 |
72 |
52 OstTraceFunctionExit0( EAPFASTPACSTOREPWQUERYDIALOG_EAPFASTPACSTOREPWQUERYDIALOG_EXIT ); |
73 OstTraceFunctionExit0( EAPFASTPACSTOREPWQUERYDIALOG_EAPFASTPACSTOREPWQUERYDIALOG_EXIT ); |
53 qDebug("EapFastPacStorePwQueryDialog::EapFastPacStorePwQueryDialog EXIT"); |
74 qDebug("EapFastPacStorePwQueryDialog::EapFastPacStorePwQueryDialog EXIT"); |
54 } |
75 } |
55 |
76 |
56 /** |
77 /*! |
57 * The construction of the dialog |
78 * The construction of the dialog |
58 */ |
79 */ |
59 void EapFastPacStorePwQueryDialog::createDialog(const QVariantMap ¶meters ) |
80 void EapFastPacStorePwQueryDialog::createDialog() |
60 { |
81 { |
61 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_CREATEDIALOG_ENTRY ); |
82 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_CREATEDIALOG_ENTRY ); |
62 qDebug("EapFastPacStorePwQueryDialog::createDialog ENTER"); |
83 qDebug("EapFastPacStorePwQueryDialog::createDialog ENTER"); |
63 |
84 |
64 QString labelText(hbTrId("txt_occ_dialog_pac_store_password")); |
85 QString labelText(hbTrId("txt_occ_dialog_pac_store_password")); |
65 |
86 |
66 Q_UNUSED(parameters) |
|
67 |
|
68 // Set the dialog to be on the screen for 60 seconds, unless |
87 // Set the dialog to be on the screen for 60 seconds, unless |
69 // the user reacts earlier |
88 // the user reacts earlier |
70 this->setModal(true); |
89 this->setModal(true); |
71 this->setTimeout(60000); |
90 this->setTimeout(PacStorePwQueryTimeout); |
72 this->setDismissPolicy(HbPopup::NoDismiss); |
91 this->setDismissPolicy(HbPopup::NoDismiss); |
73 this->setPromptText(labelText, 0); |
92 this->setPromptText(labelText, 0); |
74 |
93 |
75 mEdit = this->lineEdit(0); |
94 mEdit = this->lineEdit(0); |
76 mEdit->setEchoMode(HbLineEdit::Password); |
95 mEdit->setEchoMode(HbLineEdit::Password); |
198 } |
219 } |
199 qDebug("EapFastPacStorePwQueryDialog::cancelPressed EXIT"); |
220 qDebug("EapFastPacStorePwQueryDialog::cancelPressed EXIT"); |
200 OstTraceFunctionExit0( EAPFASTPACSTOREPWQUERYDIALOG_CANCELPRESSED_EXIT ); |
221 OstTraceFunctionExit0( EAPFASTPACSTOREPWQUERYDIALOG_CANCELPRESSED_EXIT ); |
201 } |
222 } |
202 |
223 |
203 /** |
224 /*! |
204 * Function is called when the dialog is about to close |
225 * Function is called when the dialog is about to close |
205 * |
|
206 */ |
226 */ |
207 void EapFastPacStorePwQueryDialog::closingDialog() |
227 void EapFastPacStorePwQueryDialog::closingDialog() |
208 { |
228 { |
209 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_CLOSINGDIALOG_ENTRY ); |
229 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_CLOSINGDIALOG_ENTRY ); |
210 qDebug("EapFastPacStorePwQueryDialog::closingDialog ENTER"); |
230 qDebug("EapFastPacStorePwQueryDialog::closingDialog ENTER"); |
211 |
231 |
212 qDebug("EapFastPacStorePwQueryDialog::closingDialog EXIT"); |
232 qDebug("EapFastPacStorePwQueryDialog::closingDialog EXIT"); |
213 OstTraceFunctionExit0( EAPFASTPACSTOREPWQUERYDIALOG_CLOSINGDIALOG_EXIT ); |
233 OstTraceFunctionExit0( EAPFASTPACSTOREPWQUERYDIALOG_CLOSINGDIALOG_EXIT ); |
214 } |
234 } |
215 |
235 |
216 /** |
236 /*! |
217 * Updating the dialog during its showing is not allowed. |
237 * Device dialog parameters to be set while dialog is displayed. |
218 */ |
238 * Not supported. |
|
239 * |
|
240 * @param [in] parameters NOT USED |
|
241 * @return true always. |
|
242 */ |
219 bool EapFastPacStorePwQueryDialog::setDeviceDialogParameters |
243 bool EapFastPacStorePwQueryDialog::setDeviceDialogParameters |
220 (const QVariantMap ¶meters) |
244 (const QVariantMap ¶meters) |
221 { |
245 { |
222 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY ); |
246 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY ); |
223 |
247 |
226 |
250 |
227 OstTraceFunctionExit0( EAPFASTPACSTOREPWQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT ); |
251 OstTraceFunctionExit0( EAPFASTPACSTOREPWQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT ); |
228 return true; |
252 return true; |
229 } |
253 } |
230 |
254 |
231 /** |
255 /*! |
232 * Not supported, 0 always returned |
256 * Not supported |
|
257 * |
|
258 * @return 0 always returned. |
233 */ |
259 */ |
234 int EapFastPacStorePwQueryDialog::deviceDialogError() const |
260 int EapFastPacStorePwQueryDialog::deviceDialogError() const |
235 { |
261 { |
236 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_DEVICEDIALOGERROR_ENTRY ); |
262 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_DEVICEDIALOGERROR_ENTRY ); |
237 OstTraceFunctionExit0( EAPFASTPACSTOREPWQUERYDIALOG_DEVICEDIALOGERROR_EXIT); |
263 OstTraceFunctionExit0( EAPFASTPACSTOREPWQUERYDIALOG_DEVICEDIALOGERROR_EXIT); |
238 return 0; |
264 return 0; |
239 } |
265 } |
240 |
266 |
241 /** |
267 /*! |
242 * Dialog is closed and the signal about closing is emitted |
268 * Dialog is closed and the signal about closing is emitted |
|
269 * |
|
270 * @param [in] byClient indicates when the user closes the dialog |
243 */ |
271 */ |
244 void EapFastPacStorePwQueryDialog::closeDeviceDialog(bool byClient) |
272 void EapFastPacStorePwQueryDialog::closeDeviceDialog(bool byClient) |
245 { |
273 { |
246 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY ); |
274 OstTraceFunctionEntry0( EAPFASTPACSTOREPWQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY ); |
247 qDebug("EapFastPacStorePwQueryDialog::closeDeviceDialog ENTER"); |
275 qDebug("EapFastPacStorePwQueryDialog::closeDeviceDialog ENTER"); |