29 #include "eap_type_mschapv2.h" |
29 #include "eap_type_mschapv2.h" |
30 #include "eap_auth_notifier.h" |
30 #include "eap_auth_notifier.h" |
31 |
31 |
32 #include <EapType.h> |
32 #include <EapType.h> |
33 #include <d32dbms.h> |
33 #include <d32dbms.h> |
|
34 #include "eap_am_export.h" |
|
35 // Start: added by script change_export_macros.sh. |
|
36 #if defined(EAP_NO_EXPORT_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H) |
|
37 #define EAP_CLASS_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H EAP_NONSHARABLE |
|
38 #define EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H |
|
39 #define EAP_C_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H |
|
40 #define EAP_FUNC_EXPORT_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H |
|
41 #define EAP_C_FUNC_EXPORT_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H |
|
42 #elif defined(EAP_EXPORT_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H) |
|
43 #define EAP_CLASS_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H EAP_EXPORT |
|
44 #define EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H EAP_FUNC_EXPORT |
|
45 #define EAP_C_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H EAP_C_FUNC_EXPORT |
|
46 #define EAP_FUNC_EXPORT_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H EAP_FUNC_EXPORT |
|
47 #define EAP_C_FUNC_EXPORT_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H EAP_C_FUNC_EXPORT |
|
48 #else |
|
49 #define EAP_CLASS_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H EAP_IMPORT |
|
50 #define EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H EAP_FUNC_IMPORT |
|
51 #define EAP_C_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H EAP_C_FUNC_IMPORT |
|
52 #define EAP_FUNC_EXPORT_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H |
|
53 #define EAP_C_FUNC_EXPORT_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H |
|
54 #endif |
|
55 // End: added by script change_export_macros.sh. |
|
56 |
34 |
57 |
35 const TUint KDefaultTimeoutEAPMsChapV2 = 120000; |
58 const TUint KDefaultTimeoutEAPMsChapV2 = 120000; |
36 |
59 |
37 /** |
60 /** |
38 * Class that implements the operating system dependent portion of EAP Ms-Chap-v2 protocol. |
61 * Class that implements the operating system dependent portion of EAP Ms-Chap-v2 protocol. |
39 * For Symbian OS. |
62 * For Symbian OS. |
40 */ |
63 */ |
41 class EAP_EXPORT eap_am_type_mschapv2_symbian_c |
64 class EAP_CLASS_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H eap_am_type_mschapv2_symbian_c |
42 : public CActive, public eap_am_type_mschapv2_c |
65 : public CActive, public eap_am_type_mschapv2_c |
43 , public MNotificationCallback |
66 , public MNotificationCallback |
44 |
67 |
45 |
68 |
46 { |
69 { |
141 const eap_type_value_e aTunnelingType, |
164 const eap_type_value_e aTunnelingType, |
142 const bool aIsClient, |
165 const bool aIsClient, |
143 const eap_am_network_id_c * const receive_network_id); |
166 const eap_am_network_id_c * const receive_network_id); |
144 |
167 |
145 // |
168 // |
146 EAP_FUNC_IMPORT virtual ~eap_am_type_mschapv2_symbian_c(); |
169 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H virtual ~eap_am_type_mschapv2_symbian_c(); |
147 |
170 |
148 eap_status_e show_username_password_dialog( |
171 eap_status_e show_username_password_dialog( |
149 eap_variable_data_c & username, |
172 eap_variable_data_c & username, |
150 eap_variable_data_c & password, |
173 eap_variable_data_c & password, |
151 bool & password_prompt_enabled, |
174 bool & password_prompt_enabled, |
156 eap_variable_data_c & old_password, |
179 eap_variable_data_c & old_password, |
157 eap_variable_data_c & password, |
180 eap_variable_data_c & password, |
158 bool & password_prompt_enabled); |
181 bool & password_prompt_enabled); |
159 |
182 |
160 // |
183 // |
161 EAP_FUNC_IMPORT eap_status_e configure(); |
184 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H eap_status_e configure(); |
162 |
185 |
163 EAP_FUNC_IMPORT eap_status_e reset(); |
186 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H eap_status_e reset(); |
164 |
187 |
165 EAP_FUNC_IMPORT eap_status_e update_username_password(); |
188 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H eap_status_e update_username_password(); |
166 |
189 |
167 EAP_FUNC_IMPORT void set_is_valid(); |
190 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H void set_is_valid(); |
168 |
191 |
169 EAP_FUNC_IMPORT bool get_is_valid(); |
192 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H bool get_is_valid(); |
170 |
193 |
171 EAP_FUNC_IMPORT eap_status_e type_configure_read( |
194 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H eap_status_e type_configure_read( |
172 const eap_configuration_field_c * const field, |
195 const eap_configuration_field_c * const field, |
173 eap_variable_data_c * const data); |
196 eap_variable_data_c * const data); |
174 |
197 |
175 void type_configure_readL( |
198 void type_configure_readL( |
176 eap_config_string field, |
199 eap_config_string field, |
177 const u32_t field_length, |
200 const u32_t field_length, |
178 eap_variable_data_c * const data); |
201 eap_variable_data_c * const data); |
179 |
202 |
180 EAP_FUNC_IMPORT eap_status_e type_configure_write( |
203 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H eap_status_e type_configure_write( |
181 const eap_configuration_field_c * const field, |
204 const eap_configuration_field_c * const field, |
182 eap_variable_data_c * const data); |
205 eap_variable_data_c * const data); |
183 |
206 |
184 EAP_FUNC_IMPORT eap_status_e shutdown(); |
207 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H eap_status_e shutdown(); |
185 |
208 |
186 EAP_FUNC_IMPORT eap_status_e read_auth_failure_string(eap_mschapv2_error_e error_code, eap_variable_data_c &string); |
209 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H eap_status_e read_auth_failure_string(eap_mschapv2_error_e error_code, eap_variable_data_c &string); |
187 |
210 |
188 EAP_FUNC_IMPORT eap_status_e get_memory_store_key(eap_variable_data_c * const memory_store_key); |
211 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H eap_status_e get_memory_store_key(eap_variable_data_c * const memory_store_key); |
189 |
212 |
190 /** |
213 /** |
191 * Returns true if the full authenticated session is valid. |
214 * Returns true if the full authenticated session is valid. |
192 * It finds the difference between current time and the |
215 * It finds the difference between current time and the |
193 * last full authentication time. If the difference is less than the |
216 * last full authentication time. If the difference is less than the |
202 * in the database by calling the leaving function store_authentication_time_L. |
225 * in the database by calling the leaving function store_authentication_time_L. |
203 * Returns appropriate error if storing fails. eap_status_ok for successful storing. |
226 * Returns appropriate error if storing fails. eap_status_ok for successful storing. |
204 */ |
227 */ |
205 eap_status_e store_authentication_time(); |
228 eap_status_e store_authentication_time(); |
206 |
229 |
207 EAP_FUNC_IMPORT void DlgComplete( TInt aStatus ); |
230 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H void DlgComplete( TInt aStatus ); |
|
231 |
|
232 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H TBool IsMasterKeyAndPasswordMatchingL( |
|
233 const TDesC16 & aPassword8); |
208 |
234 |
209 TInt IsDlgReadyToCompleteL(); |
235 TInt IsDlgReadyToCompleteL(); |
210 |
236 |
211 }; // class eap_am_type_mschapv2_symbian_c |
237 }; // class eap_am_type_mschapv2_symbian_c |
212 |
238 |