|
1 /* |
|
2 * Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: EAP and WLAN authentication protocols. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef EAP_AM_TYPE_LEAP_H |
|
21 #define EAP_AM_TYPE_LEAP_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "abs_eap_am_type_leap.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /// This class is interface to adaptation module of LEAP. |
|
29 class EAP_EXPORT eap_am_type_leap_c |
|
30 { |
|
31 public: // Methods |
|
32 |
|
33 // Constructors and destructor |
|
34 |
|
35 eap_am_type_leap_c(abs_eap_am_tools_c * const tools) |
|
36 : m_am_partner(0) |
|
37 , m_am_tools(tools) |
|
38 { |
|
39 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
40 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
41 } |
|
42 |
|
43 virtual ~eap_am_type_leap_c() |
|
44 { |
|
45 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
46 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
47 } |
|
48 |
|
49 virtual eap_status_e shutdown() = 0; |
|
50 |
|
51 /** Function returns partner object of adaptation module of LEAP. |
|
52 * Partner object is the LEAP object. |
|
53 */ |
|
54 abs_eap_am_type_leap_c * const get_am_partner() |
|
55 { |
|
56 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
57 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
58 return m_am_partner; |
|
59 } |
|
60 |
|
61 /** Function sets partner object of adaptation module of LEAP. |
|
62 * Partner object is the LEAP object. |
|
63 */ |
|
64 void set_am_partner(abs_eap_am_type_leap_c * const partner) |
|
65 { |
|
66 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
67 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
68 m_am_partner = partner; |
|
69 } |
|
70 |
|
71 virtual void set_is_valid() = 0; |
|
72 |
|
73 virtual bool get_is_valid() = 0; |
|
74 |
|
75 virtual eap_status_e type_configure_read( |
|
76 const eap_configuration_field_c * const field, |
|
77 eap_variable_data_c * const data) = 0; |
|
78 |
|
79 virtual eap_status_e type_configure_write( |
|
80 const eap_configuration_field_c * const field, |
|
81 eap_variable_data_c * const data) = 0; |
|
82 |
|
83 virtual eap_status_e configure() = 0; |
|
84 |
|
85 virtual eap_status_e reset() = 0; |
|
86 |
|
87 virtual eap_status_e show_username_password_dialog( |
|
88 eap_variable_data_c &username_utf8, |
|
89 eap_variable_data_c &password_utf8, |
|
90 bool &password_prompt_enabled, |
|
91 bool is_identity_query) = 0; |
|
92 |
|
93 virtual eap_status_e read_auth_failure_string(eap_variable_data_c &string) = 0; |
|
94 |
|
95 /// This function queries unique key for memory store object of this access. |
|
96 virtual eap_status_e get_memory_store_key(eap_variable_data_c * const memory_store_key) = 0; |
|
97 |
|
98 /** |
|
99 * Returns true if the full authenticated session is valid. |
|
100 * It finds the difference between current time and the |
|
101 * last full authentication time. If the difference is less than the |
|
102 * Maximum Session Validity Time, then session is valid, returns true. |
|
103 * Otherwise returns false. |
|
104 * Full authentication (using pw query) should be done if the session is not valid. |
|
105 */ |
|
106 virtual bool is_session_valid() = 0; |
|
107 |
|
108 /** |
|
109 * Stores current universal time as the the full authentication time |
|
110 * in the database. |
|
111 * Returns appropriate error if storing fails. eap_status_ok for successful storing. |
|
112 */ |
|
113 virtual eap_status_e store_authentication_time() = 0; |
|
114 |
|
115 private: // Data |
|
116 |
|
117 abs_eap_am_type_leap_c * m_am_partner; |
|
118 |
|
119 abs_eap_am_tools_c * m_am_tools; |
|
120 |
|
121 protected: |
|
122 |
|
123 }; |
|
124 |
|
125 |
|
126 EAP_C_FUNC_IMPORT eap_am_type_leap_c *new_eap_am_type_leap( |
|
127 abs_eap_am_tools_c * const tools, |
|
128 abs_eap_base_type_c * const partner, |
|
129 const bool is_client_when_true, |
|
130 const eap_am_network_id_c * const receive_network_id); |
|
131 |
|
132 #endif // EAP_AM_TYPE_LEAP_H |
|
133 |
|
134 // End of File |