26
|
1 |
/*
|
|
2 |
* Copyright (c) 2001-2010 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 |
* %version: 27 %
|
|
20 |
*/
|
|
21 |
|
|
22 |
#ifndef EAP_AM_STACK_SYMBIAN_H_
|
|
23 |
#define EAP_AM_STACK_SYMBIAN_H_
|
|
24 |
|
|
25 |
#include "eap_am_stack.h"
|
|
26 |
#include "abs_eap_am_stack.h"
|
|
27 |
#include "abs_eap_am_tools.h"
|
|
28 |
#include "eap_automatic_variable.h"
|
|
29 |
#include <e32base.h>
|
|
30 |
#include <e32std.h>
|
|
31 |
#include <d32dbms.h>
|
|
32 |
#include "eap_config.h"
|
|
33 |
#include "eap_file_config.h"
|
|
34 |
#include "eap_am_file_input_symbian.h"
|
|
35 |
#include "eap_type_selection.h"
|
|
36 |
#include "eapol_key_types.h"
|
|
37 |
|
|
38 |
#include "eapol_wlan_database_reference.h"
|
|
39 |
#include <EapTypePlugin.h>
|
|
40 |
#include "eap_base_type.h"
|
|
41 |
#include "abs_eap_configuration_if.h"
|
|
42 |
#include "eap_tlv_header.h"
|
49
|
43 |
#include "eap_am_export.h"
|
|
44 |
// Start: added by script change_export_macros.sh.
|
|
45 |
#if defined(EAP_NO_EXPORT_EAP_AM_STACK_SYMBIAN_H)
|
|
46 |
#define EAP_CLASS_VISIBILITY_EAP_AM_STACK_SYMBIAN_H EAP_NONSHARABLE
|
|
47 |
#define EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H
|
|
48 |
#define EAP_C_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H
|
|
49 |
#define EAP_FUNC_EXPORT_EAP_AM_STACK_SYMBIAN_H
|
|
50 |
#define EAP_C_FUNC_EXPORT_EAP_AM_STACK_SYMBIAN_H
|
|
51 |
#elif defined(EAP_EXPORT_EAP_AM_STACK_SYMBIAN_H)
|
|
52 |
#define EAP_CLASS_VISIBILITY_EAP_AM_STACK_SYMBIAN_H EAP_EXPORT
|
|
53 |
#define EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H EAP_FUNC_EXPORT
|
|
54 |
#define EAP_C_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H EAP_C_FUNC_EXPORT
|
|
55 |
#define EAP_FUNC_EXPORT_EAP_AM_STACK_SYMBIAN_H EAP_FUNC_EXPORT
|
|
56 |
#define EAP_C_FUNC_EXPORT_EAP_AM_STACK_SYMBIAN_H EAP_C_FUNC_EXPORT
|
|
57 |
#else
|
|
58 |
#define EAP_CLASS_VISIBILITY_EAP_AM_STACK_SYMBIAN_H EAP_IMPORT
|
|
59 |
#define EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H EAP_FUNC_IMPORT
|
|
60 |
#define EAP_C_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H EAP_C_FUNC_IMPORT
|
|
61 |
#define EAP_FUNC_EXPORT_EAP_AM_STACK_SYMBIAN_H
|
|
62 |
#define EAP_C_FUNC_EXPORT_EAP_AM_STACK_SYMBIAN_H
|
|
63 |
#endif
|
|
64 |
// End: added by script change_export_macros.sh.
|
26
|
65 |
|
49
|
66 |
|
|
67 |
class EAP_CLASS_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_am_stack_symbian_c
|
26
|
68 |
: public CActive
|
|
69 |
, public eap_am_stack_c
|
|
70 |
, public abs_eap_configuration_if_c
|
|
71 |
{
|
|
72 |
public:
|
|
73 |
|
49
|
74 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_am_stack_symbian_c(class abs_eap_am_tools_c * tools, bool is_client_when_true);
|
26
|
75 |
|
49
|
76 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H virtual ~eap_am_stack_symbian_c();
|
26
|
77 |
|
49
|
78 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H bool get_is_valid();
|
26
|
79 |
|
49
|
80 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e set_partner(
|
26
|
81 |
abs_eap_am_stack_c * const partner
|
|
82 |
, abs_eap_configuration_if_c * const configuration_if
|
|
83 |
);
|
|
84 |
|
|
85 |
// This is documented in abs_eap_stack_interface_c::configure().
|
49
|
86 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e configure(
|
26
|
87 |
const eap_variable_data_c * const client_configuration);
|
|
88 |
|
|
89 |
// This is documented in abs_eap_stack_interface_c::shutdown().
|
49
|
90 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e shutdown();
|
26
|
91 |
|
49
|
92 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e read_configure(
|
26
|
93 |
const eap_configuration_field_c * const field,
|
|
94 |
eap_variable_data_c * const data);
|
|
95 |
|
49
|
96 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e set_timer(
|
26
|
97 |
abs_eap_base_timer_c * const p_initializer,
|
|
98 |
const u32_t p_id,
|
|
99 |
void * const p_data,
|
|
100 |
const u32_t p_time_ms);
|
|
101 |
|
49
|
102 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e cancel_timer(
|
26
|
103 |
abs_eap_base_timer_c * const p_initializer,
|
|
104 |
const u32_t p_id);
|
|
105 |
|
49
|
106 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e check_is_valid_eap_type(
|
26
|
107 |
const eap_type_value_e eap_type);
|
|
108 |
|
49
|
109 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e get_eap_type_list(
|
26
|
110 |
eap_array_c<eap_type_value_e> * const eap_type_list);
|
|
111 |
|
49
|
112 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e load_module(
|
26
|
113 |
const eap_type_value_e type,
|
|
114 |
const eap_type_value_e tunneling_type,
|
|
115 |
abs_eap_base_type_c * const partner,
|
|
116 |
eap_base_type_c ** const eap_type,
|
|
117 |
const bool is_client_when_true,
|
|
118 |
const eap_am_network_id_c * const receive_network_id);
|
|
119 |
|
49
|
120 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e save_simple_config_session(
|
26
|
121 |
const simple_config_state_e state,
|
|
122 |
EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
|
|
123 |
const eap_variable_data_c * const new_password,
|
|
124 |
const simple_config_Device_Password_ID_e Device_Password_ID,
|
|
125 |
const simple_config_payloads_c * const other_configuration);
|
|
126 |
|
49
|
127 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e set_eap_database_reference_values(
|
26
|
128 |
const eap_variable_data_c * const reference);
|
|
129 |
|
49
|
130 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_SYMBIAN_H eap_status_e get_802_11_authentication_mode(
|
26
|
131 |
const eap_am_network_id_c * const receive_network_id,
|
|
132 |
const eapol_key_authentication_type_e authentication_type);
|
|
133 |
|
|
134 |
private:
|
|
135 |
|
|
136 |
/// Function reads one configuration value from database.
|
|
137 |
void read_configureL(
|
|
138 |
const TDesC& aDbName,
|
|
139 |
const TDesC& aTableName,
|
|
140 |
eap_config_string field,
|
|
141 |
const u32_t /*field_length*/,
|
|
142 |
eap_variable_data_c * const data);
|
|
143 |
|
|
144 |
/// Control function of this active-object.
|
|
145 |
void RunL();
|
|
146 |
|
|
147 |
/// Cancel function for active-object.
|
|
148 |
void DoCancel();
|
|
149 |
|
|
150 |
/// RunError function for active-object.
|
|
151 |
TInt RunError(TInt aError);
|
|
152 |
|
|
153 |
|
|
154 |
void SetToTopPriorityL(const eap_type_value_e aEapType);
|
|
155 |
|
|
156 |
eap_status_e reset_eap_configuration();
|
|
157 |
|
|
158 |
void ReadEAPSettingsL();
|
|
159 |
|
|
160 |
eap_status_e reset_eap_plugins();
|
|
161 |
|
|
162 |
TInt get_current_eap_index();
|
|
163 |
|
|
164 |
void set_current_eap_index(const TInt ind);
|
|
165 |
|
|
166 |
|
|
167 |
abs_eap_am_tools_c * const iTools;
|
|
168 |
|
|
169 |
TBool iIsValid;
|
|
170 |
|
|
171 |
const TBool iIsClient;
|
|
172 |
|
|
173 |
abs_eap_am_stack_c* iPartner;
|
|
174 |
|
|
175 |
/// Handle of database session.
|
|
176 |
RDbs iSession;
|
|
177 |
|
|
178 |
/// Handle of database file.
|
|
179 |
RFs iFs;
|
|
180 |
|
|
181 |
eap_file_config_c m_client_config;
|
|
182 |
|
|
183 |
eap_file_config_c * iFileconfig;
|
|
184 |
|
|
185 |
RPointerArray<CEapTypePlugin> m_plugin_if_array;
|
|
186 |
|
|
187 |
|
|
188 |
eap_array_c<eap_type_value_e> iEnabledEapMethodsArray;
|
|
189 |
eap_array_c<eap_type_value_e> iDisabledEapMethodsArray;
|
|
190 |
|
|
191 |
|
|
192 |
/// Array which corresponds with m_plugin_if_array and indicates the types of the loaded EAP types.
|
|
193 |
eap_array_c<eap_type_value_e> m_eap_type_array;
|
|
194 |
|
|
195 |
abs_eap_configuration_if_c* iConfigurationIf;
|
|
196 |
|
|
197 |
TIndexType iIndexType;
|
|
198 |
|
|
199 |
TUint iIndex;
|
|
200 |
|
|
201 |
TInt iCurrentEapIndex;
|
|
202 |
|
|
203 |
/// WLAN authentication type.
|
|
204 |
eapol_key_authentication_type_e m_selected_eapol_key_authentication_type;
|
|
205 |
};
|
|
206 |
|
|
207 |
#endif /* EAP_AM_STACK_SYMBIAN_H_ */
|
|
208 |
|
|
209 |
// end
|