14 * Description: EAP and WLAN authentication protocols. |
14 * Description: EAP and WLAN authentication protocols. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 18 % |
19 * %version: 16.1.11 % |
20 */ |
20 */ |
21 |
21 |
22 #ifndef EAP_AM_TYPE_LEAP_SYMBIAN_H |
22 #ifndef EAP_AM_TYPE_LEAP_SYMBIAN_H |
23 #define EAP_AM_TYPE_LEAP_SYMBIAN_H |
23 #define EAP_AM_TYPE_LEAP_SYMBIAN_H |
|
24 |
|
25 // This flag is for testing memory leaks that occurs in QT notifier. |
|
26 #define USE_EAP_AUTH_NOTIFIER |
24 |
27 |
25 // INCLUDES |
28 // INCLUDES |
26 |
29 |
27 #include "eap_am_tools_symbian.h" |
30 #include "eap_am_tools_symbian.h" |
28 #include "abs_eap_base_type.h" |
31 #include "abs_eap_base_type.h" |
29 #include "eap_am_type_leap.h" |
32 #include "eap_am_type_leap.h" |
30 #include "eap_am_network_id.h" |
33 #include "eap_am_network_id.h" |
31 #include "EapLeapNotifierStructs.h" |
34 |
|
35 #if defined(USE_EAP_AUTH_NOTIFIER) |
|
36 #include "eap_auth_notifier.h" |
|
37 #endif //#if defined(USE_EAP_AUTH_NOTIFIER) |
|
38 |
32 #include <EapType.h> |
39 #include <EapType.h> |
33 #include <d32dbms.h> |
40 #include <d32dbms.h> |
34 |
41 |
35 const TUint KDefaultTimeoutLEAP = 120000; |
42 const TUint KDefaultTimeoutLEAP = 120000; |
36 |
43 |
40 * Class that implements the operating system dependent portion of EAP LEAP protocol. |
47 * Class that implements the operating system dependent portion of EAP LEAP protocol. |
41 * For Symbian OS. |
48 * For Symbian OS. |
42 */ |
49 */ |
43 class EAP_EXPORT eap_am_type_leap_symbian_c |
50 class EAP_EXPORT eap_am_type_leap_symbian_c |
44 : public CActive, public eap_am_type_leap_c |
51 : public CActive, public eap_am_type_leap_c |
|
52 #if defined(USE_EAP_AUTH_NOTIFIER) |
|
53 , public MNotificationCallback |
|
54 #endif //#if defined(USE_EAP_AUTH_NOTIFIER) |
|
55 |
45 { |
56 { |
46 private: |
57 private: |
47 //-------------------------------------------------- |
58 //-------------------------------------------------- |
48 |
59 |
49 eap_am_tools_symbian_c * const m_am_tools; |
60 eap_am_tools_symbian_c * const m_am_tools; |
50 |
61 |
51 abs_eap_base_type_c * const m_partner; |
62 abs_eap_base_type_c * const m_partner; |
52 |
63 |
53 RDbs m_session; |
64 RFs m_session; |
54 |
65 |
55 RDbNamedDatabase m_database; |
66 RDbNamedDatabase m_database; |
56 |
67 |
|
68 #if defined(USE_EAP_AUTH_NOTIFIER) |
57 RNotifier m_notifier; |
69 RNotifier m_notifier; |
58 |
70 |
59 TEapLeapUsernamePasswordInfo * m_input_output_data_ptr; |
71 CEapAuthNotifier::TEapDialogInfo * m_input_output_data_ptr; |
60 |
72 |
61 TPckg<TEapLeapUsernamePasswordInfo> * m_input_output_pckg_ptr; |
73 TPckg<CEapAuthNotifier::TEapDialogInfo> * m_input_output_pckg_ptr; |
|
74 #endif //#if defined(USE_EAP_AUTH_NOTIFIER) |
62 |
75 |
63 eap_am_network_id_c m_receive_network_id; |
76 eap_am_network_id_c m_receive_network_id; |
64 |
77 |
65 TIndexType m_index_type; |
78 TIndexType m_index_type; |
66 |
79 |
80 |
93 |
81 eap_variable_data_c * m_password_utf8; |
94 eap_variable_data_c * m_password_utf8; |
82 |
95 |
83 bool m_shutdown_was_called; |
96 bool m_shutdown_was_called; |
84 |
97 |
85 bool m_is_notifier_connected; // Tells if notifier server is connected. |
98 |
86 |
|
87 // This holds the max session time read from the configuration file. |
99 // This holds the max session time read from the configuration file. |
88 TInt64 m_max_session_time; |
100 TInt64 m_max_session_time; |
89 |
|
90 // This is the vendor-type for tunneling EAP type. |
|
91 // Valid for both expanded and non-expanded EAP types. |
|
92 // This is used since m_tunneling_type can not be used in the same way |
|
93 // in expanded and non-expanded cases. |
|
94 // Unlike EAP type, Tunneling type is still non-expanded |
|
95 // for both cases especially for using in the EAP databases. |
|
96 u32_t m_tunneling_vendor_type; |
|
97 |
101 |
98 void send_error_notification(const eap_status_e error); |
102 void send_error_notification(const eap_status_e error); |
99 |
103 |
100 /** |
104 /** |
101 * Stores current universal time as the the full authentication time |
105 * Stores current universal time as the the full authentication time |
103 */ |
107 */ |
104 void store_authentication_timeL(); |
108 void store_authentication_timeL(); |
105 |
109 |
106 bool is_session_validL(); |
110 bool is_session_validL(); |
107 |
111 |
|
112 #if defined(USE_EAP_AUTH_NOTIFIER) |
|
113 CEapAuthNotifier* iEapAuthNotifier; |
|
114 #endif //#if defined(USE_EAP_AUTH_NOTIFIER) |
108 |
115 |
109 //-------------------------------------------------- |
116 //-------------------------------------------------- |
110 protected: |
117 protected: |
111 //-------------------------------------------------- |
118 //-------------------------------------------------- |
112 |
119 |
195 * in the database by calling the leaving function store_authentication_time_L. |
202 * in the database by calling the leaving function store_authentication_time_L. |
196 * Returns appropriate error if storing fails. eap_status_ok for successful storing. |
203 * Returns appropriate error if storing fails. eap_status_ok for successful storing. |
197 */ |
204 */ |
198 eap_status_e store_authentication_time(); |
205 eap_status_e store_authentication_time(); |
199 |
206 |
|
207 void DlgComplete( TInt aStatus ); |
|
208 |
|
209 TInt IsDlgReadyToCompleteL(); |
|
210 |
200 }; // class eap_am_type_leap_symbian_c |
211 }; // class eap_am_type_leap_symbian_c |
201 |
212 |
202 |
213 |
203 #endif // EAP_AM_TYPE_LEAP_SYMBIAN_H |
214 #endif // EAP_AM_TYPE_LEAP_SYMBIAN_H |
204 |
215 |