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 File Password Query Dialog implementation |
14 * Description: EAP-FAST PAC File Password Query Dialog implementation |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 3 % |
19 * %version: 4 % |
20 */ |
20 */ |
21 |
21 |
|
22 // System includes |
22 #include <HbTranslator> |
23 #include <HbTranslator> |
23 #include <HbAction> |
24 #include <HbAction> |
24 #include <HbParameterLengthLimiter> |
25 #include <HbParameterLengthLimiter> |
|
26 |
|
27 // User includes |
25 #include "eapfastpacfilepwquerydialog.h" |
28 #include "eapfastpacfilepwquerydialog.h" |
26 #include "OstTraceDefinitions.h" |
29 #include "OstTraceDefinitions.h" |
27 #ifdef OST_TRACE_COMPILER_IN_USE |
30 #ifdef OST_TRACE_COMPILER_IN_USE |
28 #endif |
31 #endif |
29 |
32 |
30 |
33 |
31 /** |
34 /*! |
32 * The constructor |
35 * \class EapFastPacFilePwQueryDialog |
|
36 * \brief Implements EAP-FAST PAC File Password Query Dialog. |
|
37 */ |
|
38 |
|
39 // External function prototypes |
|
40 |
|
41 // Local constants |
|
42 static const uint PacFilePwQueryTimeout = 60000; |
|
43 |
|
44 // ======== LOCAL FUNCTIONS ======== |
|
45 |
|
46 // ======== MEMBER FUNCTIONS ======== |
|
47 |
|
48 /*! |
|
49 * Constructor. |
|
50 * |
|
51 * @param [in] parameters Parameters for the Constructor. |
33 */ |
52 */ |
34 EapFastPacFilePwQueryDialog::EapFastPacFilePwQueryDialog(const QVariantMap ¶meters) |
53 EapFastPacFilePwQueryDialog::EapFastPacFilePwQueryDialog(const QVariantMap ¶meters) |
35 :mEdit(NULL), |
54 :mEdit(NULL), |
36 mTranslator(new HbTranslator("eapprompts")), |
55 mTranslator(new HbTranslator("eapprompts")), |
37 mClose(false), |
56 mClose(false), |
44 |
63 |
45 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_EAPFASTPACFILEQUERYDIALOG_EXIT ); |
64 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_EAPFASTPACFILEQUERYDIALOG_EXIT ); |
46 qDebug("EapFastPacFilePwQueryDialog::EapFastPacFilePwQueryDialog EXIT"); |
65 qDebug("EapFastPacFilePwQueryDialog::EapFastPacFilePwQueryDialog EXIT"); |
47 } |
66 } |
48 |
67 |
49 /** |
68 /*! |
50 * The construction of the dialog |
69 * The construction of the dialog |
|
70 * |
|
71 * @param [in] parameters Parameters for the Construction of the dialog. |
51 */ |
72 */ |
52 void EapFastPacFilePwQueryDialog::createDialog(const QVariantMap ¶meters ) |
73 void EapFastPacFilePwQueryDialog::createDialog(const QVariantMap ¶meters ) |
53 { |
74 { |
54 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CREATEDIALOG_ENTRY ); |
75 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CREATEDIALOG_ENTRY ); |
55 qDebug("EapFastPacFilePwQueryDialog::createDialog ENTER"); |
76 qDebug("EapFastPacFilePwQueryDialog::createDialog ENTER"); |
69 hbTrId("txt_occ_dialog_pac_file_password_for_1").arg(filename))); |
90 hbTrId("txt_occ_dialog_pac_file_password_for_1").arg(filename))); |
70 |
91 |
71 //Set the dialog to be on the screen for 60 seconds, unless |
92 //Set the dialog to be on the screen for 60 seconds, unless |
72 //the user reacts earlier |
93 //the user reacts earlier |
73 this->setModal(true); |
94 this->setModal(true); |
74 this->setTimeout(60000); |
95 this->setTimeout(PacFilePwQueryTimeout); |
75 this->setDismissPolicy(HbPopup::NoDismiss); |
96 this->setDismissPolicy(HbPopup::NoDismiss); |
76 this->setPromptText(mainText, 0); |
97 this->setPromptText(mainText, 0); |
77 mEdit = this->lineEdit(0); |
98 mEdit = this->lineEdit(0); |
78 mEdit->setEchoMode(HbLineEdit::Password); |
99 mEdit->setEchoMode(HbLineEdit::Password); |
79 |
100 |
112 |
133 |
113 OstTraceFunctionExit0( DUP1_EAPFASTPACFILEQUERYDIALOG_CREATEDIALOG_EXIT ); |
134 OstTraceFunctionExit0( DUP1_EAPFASTPACFILEQUERYDIALOG_CREATEDIALOG_EXIT ); |
114 qDebug("EapFastPacFilePwQueryDialog::createDialog EXIT"); |
135 qDebug("EapFastPacFilePwQueryDialog::createDialog EXIT"); |
115 } |
136 } |
116 |
137 |
117 /** |
138 /*! |
118 * Destructor |
139 * Destructor. |
119 */ |
140 */ |
120 EapFastPacFilePwQueryDialog::~EapFastPacFilePwQueryDialog() |
141 EapFastPacFilePwQueryDialog::~EapFastPacFilePwQueryDialog() |
121 { |
142 { |
122 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_DEAPFASTPACFILEQUERYDIALOG_ENTRY ); |
143 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_DEAPFASTPACFILEQUERYDIALOG_ENTRY ); |
123 |
144 |
124 // The dialog widgets are deleted as the dialog is deleted |
145 // The dialog widgets are deleted as the dialog is deleted |
125 |
146 |
126 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_DEAPFASTPACFILEQUERYDIALOG_EXIT ); |
147 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_DEAPFASTPACFILEQUERYDIALOG_EXIT ); |
127 } |
148 } |
128 |
149 |
129 /** |
150 /*! |
130 * Function is called when the Ok Action button is pressed |
151 * Function is called when the Ok Action button is pressed |
131 */ |
152 */ |
132 void EapFastPacFilePwQueryDialog::okPressed() |
153 void EapFastPacFilePwQueryDialog::okPressed() |
133 { |
154 { |
134 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_FIRSTBUTTONPRESSED_ENTRY ); |
155 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_FIRSTBUTTONPRESSED_ENTRY ); |
149 } |
170 } |
150 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_FIRSTBUTTONPRESSED_EXIT ); |
171 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_FIRSTBUTTONPRESSED_EXIT ); |
151 qDebug("EapFastPacFilePwQueryDialog::okPressed EXIT"); |
172 qDebug("EapFastPacFilePwQueryDialog::okPressed EXIT"); |
152 } |
173 } |
153 |
174 |
154 /** |
175 /*! |
155 * Function is called when the Cancel Action button is pressed |
176 * Function is called when the Cancel Action button is pressed |
156 */ |
177 */ |
157 void EapFastPacFilePwQueryDialog::cancelPressed() |
178 void EapFastPacFilePwQueryDialog::cancelPressed() |
158 { |
179 { |
159 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CANCELPRESSED_ENTRY ); |
180 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CANCELPRESSED_ENTRY ); |
165 } |
186 } |
166 qDebug("EapFastPacFilePwQueryDialog::cancelPressed EXIT"); |
187 qDebug("EapFastPacFilePwQueryDialog::cancelPressed EXIT"); |
167 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_CANCELPRESSED_EXIT ); |
188 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_CANCELPRESSED_EXIT ); |
168 } |
189 } |
169 |
190 |
170 /** |
191 /*! |
171 * Function is called when the dialog is about to close |
192 * Function is called when the dialog is about to close |
172 * |
|
173 */ |
193 */ |
174 void EapFastPacFilePwQueryDialog::closingDialog() |
194 void EapFastPacFilePwQueryDialog::closingDialog() |
175 { |
195 { |
176 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CLOSINGDIALOG_ENTRY ); |
196 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CLOSINGDIALOG_ENTRY ); |
177 qDebug("EapFastPacFilePwQueryDialog::closingDialog ENTER"); |
197 qDebug("EapFastPacFilePwQueryDialog::closingDialog ENTER"); |
178 |
198 |
179 qDebug("EapFastPacFilePwQueryDialog::closingDialog EXIT"); |
199 qDebug("EapFastPacFilePwQueryDialog::closingDialog EXIT"); |
180 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_CLOSINGDIALOG_EXIT ); |
200 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_CLOSINGDIALOG_EXIT ); |
181 } |
201 } |
182 |
202 |
183 /** |
203 /*! |
184 * Updating the dialog during its showing is not allowed. |
204 * Device dialog parameters to be set while dialog is displayed. |
185 */ |
205 * Not supported. |
|
206 * |
|
207 * @param [in] parameters NOT USED |
|
208 * @return true always. |
|
209 */ |
186 bool EapFastPacFilePwQueryDialog::setDeviceDialogParameters |
210 bool EapFastPacFilePwQueryDialog::setDeviceDialogParameters |
187 (const QVariantMap ¶meters) |
211 (const QVariantMap ¶meters) |
188 { |
212 { |
189 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY ); |
213 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY ); |
190 |
214 |
193 |
217 |
194 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT ); |
218 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT ); |
195 return true; |
219 return true; |
196 } |
220 } |
197 |
221 |
198 /** |
222 /*! |
199 * Not supported, 0 always returned |
223 * Not supported |
|
224 * |
|
225 * @return 0 always returned. |
200 */ |
226 */ |
201 int EapFastPacFilePwQueryDialog::deviceDialogError() const |
227 int EapFastPacFilePwQueryDialog::deviceDialogError() const |
202 { |
228 { |
203 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGERROR_ENTRY ); |
229 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGERROR_ENTRY ); |
204 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGERROR_EXIT); |
230 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGERROR_EXIT); |
205 return 0; |
231 return 0; |
206 } |
232 } |
207 |
233 |
208 /** |
234 /*! |
209 * Dialog is closed and the signal about closing is emitted |
235 * Dialog is closed and the signal about closing is emitted |
|
236 * |
|
237 * @param [in] byClient indicates when the user closes the dialog |
210 */ |
238 */ |
211 void EapFastPacFilePwQueryDialog::closeDeviceDialog(bool byClient) |
239 void EapFastPacFilePwQueryDialog::closeDeviceDialog(bool byClient) |
212 { |
240 { |
213 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY ); |
241 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY ); |
214 qDebug("EapFastPacFilePwQueryDialog::closeDeviceDialog ENTER"); |
242 qDebug("EapFastPacFilePwQueryDialog::closeDeviceDialog ENTER"); |
222 |
250 |
223 qDebug("EapFastPacFilePwQueryDialog::closeDeviceDialog EXIT"); |
251 qDebug("EapFastPacFilePwQueryDialog::closeDeviceDialog EXIT"); |
224 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT ); |
252 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT ); |
225 } |
253 } |
226 |
254 |
227 /** |
255 /*! |
228 * This dialog widget is returned to the caller |
256 * This dialog widget is returned to the caller |
|
257 * |
|
258 * @return this dialog widget |
229 */ |
259 */ |
230 HbPopup *EapFastPacFilePwQueryDialog::deviceDialogWidget() const |
260 HbPopup *EapFastPacFilePwQueryDialog::deviceDialogWidget() const |
231 { |
261 { |
232 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY ); |
262 OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY ); |
233 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT ); |
263 OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT ); |