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"
|
|
43 |
|
|
44 |
class EAP_EXPORT eap_am_stack_symbian_c
|
|
45 |
: public CActive
|
|
46 |
, public eap_am_stack_c
|
|
47 |
, public abs_eap_configuration_if_c
|
|
48 |
{
|
|
49 |
public:
|
|
50 |
|
|
51 |
EAP_FUNC_IMPORT eap_am_stack_symbian_c(class abs_eap_am_tools_c * tools, bool is_client_when_true);
|
|
52 |
|
|
53 |
EAP_FUNC_IMPORT virtual ~eap_am_stack_symbian_c();
|
|
54 |
|
|
55 |
EAP_FUNC_IMPORT bool get_is_valid();
|
|
56 |
|
|
57 |
EAP_FUNC_IMPORT eap_status_e set_partner(
|
|
58 |
abs_eap_am_stack_c * const partner
|
|
59 |
, abs_eap_configuration_if_c * const configuration_if
|
|
60 |
);
|
|
61 |
|
|
62 |
// This is documented in abs_eap_stack_interface_c::configure().
|
|
63 |
EAP_FUNC_IMPORT eap_status_e configure(
|
|
64 |
const eap_variable_data_c * const client_configuration);
|
|
65 |
|
|
66 |
// This is documented in abs_eap_stack_interface_c::shutdown().
|
|
67 |
EAP_FUNC_IMPORT eap_status_e shutdown();
|
|
68 |
|
|
69 |
EAP_FUNC_IMPORT eap_status_e read_configure(
|
|
70 |
const eap_configuration_field_c * const field,
|
|
71 |
eap_variable_data_c * const data);
|
|
72 |
|
|
73 |
EAP_FUNC_IMPORT eap_status_e set_timer(
|
|
74 |
abs_eap_base_timer_c * const p_initializer,
|
|
75 |
const u32_t p_id,
|
|
76 |
void * const p_data,
|
|
77 |
const u32_t p_time_ms);
|
|
78 |
|
|
79 |
EAP_FUNC_IMPORT eap_status_e cancel_timer(
|
|
80 |
abs_eap_base_timer_c * const p_initializer,
|
|
81 |
const u32_t p_id);
|
|
82 |
|
|
83 |
EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(
|
|
84 |
const eap_type_value_e eap_type);
|
|
85 |
|
|
86 |
EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
|
|
87 |
eap_array_c<eap_type_value_e> * const eap_type_list);
|
|
88 |
|
|
89 |
EAP_FUNC_IMPORT eap_status_e load_module(
|
|
90 |
const eap_type_value_e type,
|
|
91 |
const eap_type_value_e tunneling_type,
|
|
92 |
abs_eap_base_type_c * const partner,
|
|
93 |
eap_base_type_c ** const eap_type,
|
|
94 |
const bool is_client_when_true,
|
|
95 |
const eap_am_network_id_c * const receive_network_id);
|
|
96 |
|
|
97 |
EAP_FUNC_IMPORT eap_status_e save_simple_config_session(
|
|
98 |
const simple_config_state_e state,
|
|
99 |
EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
|
|
100 |
const eap_variable_data_c * const new_password,
|
|
101 |
const simple_config_Device_Password_ID_e Device_Password_ID,
|
|
102 |
const simple_config_payloads_c * const other_configuration);
|
|
103 |
|
|
104 |
EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
|
|
105 |
const eap_variable_data_c * const reference);
|
|
106 |
|
|
107 |
EAP_FUNC_IMPORT eap_status_e get_802_11_authentication_mode(
|
|
108 |
const eap_am_network_id_c * const receive_network_id,
|
|
109 |
const eapol_key_authentication_type_e authentication_type);
|
|
110 |
|
|
111 |
private:
|
|
112 |
|
|
113 |
/// Function reads one configuration value from database.
|
|
114 |
void read_configureL(
|
|
115 |
const TDesC& aDbName,
|
|
116 |
const TDesC& aTableName,
|
|
117 |
eap_config_string field,
|
|
118 |
const u32_t /*field_length*/,
|
|
119 |
eap_variable_data_c * const data);
|
|
120 |
|
|
121 |
/// Control function of this active-object.
|
|
122 |
void RunL();
|
|
123 |
|
|
124 |
/// Cancel function for active-object.
|
|
125 |
void DoCancel();
|
|
126 |
|
|
127 |
/// RunError function for active-object.
|
|
128 |
TInt RunError(TInt aError);
|
|
129 |
|
|
130 |
|
|
131 |
void SetToTopPriorityL(const eap_type_value_e aEapType);
|
|
132 |
|
|
133 |
eap_status_e reset_eap_configuration();
|
|
134 |
|
|
135 |
void ReadEAPSettingsL();
|
|
136 |
|
|
137 |
eap_status_e reset_eap_plugins();
|
|
138 |
|
|
139 |
TInt get_current_eap_index();
|
|
140 |
|
|
141 |
void set_current_eap_index(const TInt ind);
|
|
142 |
|
|
143 |
|
|
144 |
abs_eap_am_tools_c * const iTools;
|
|
145 |
|
|
146 |
TBool iIsValid;
|
|
147 |
|
|
148 |
const TBool iIsClient;
|
|
149 |
|
|
150 |
abs_eap_am_stack_c* iPartner;
|
|
151 |
|
|
152 |
/// Handle of database session.
|
|
153 |
RDbs iSession;
|
|
154 |
|
|
155 |
/// Handle of database file.
|
|
156 |
RFs iFs;
|
|
157 |
|
|
158 |
eap_file_config_c m_client_config;
|
|
159 |
|
|
160 |
eap_file_config_c * iFileconfig;
|
|
161 |
|
|
162 |
RPointerArray<CEapTypePlugin> m_plugin_if_array;
|
|
163 |
|
|
164 |
|
|
165 |
eap_array_c<eap_type_value_e> iEnabledEapMethodsArray;
|
|
166 |
eap_array_c<eap_type_value_e> iDisabledEapMethodsArray;
|
|
167 |
|
|
168 |
|
|
169 |
/// Array which corresponds with m_plugin_if_array and indicates the types of the loaded EAP types.
|
|
170 |
eap_array_c<eap_type_value_e> m_eap_type_array;
|
|
171 |
|
|
172 |
abs_eap_configuration_if_c* iConfigurationIf;
|
|
173 |
|
|
174 |
TIndexType iIndexType;
|
|
175 |
|
|
176 |
TUint iIndex;
|
|
177 |
|
|
178 |
TInt iCurrentEapIndex;
|
|
179 |
|
|
180 |
/// WLAN authentication type.
|
|
181 |
eapol_key_authentication_type_e m_selected_eapol_key_authentication_type;
|
|
182 |
};
|
|
183 |
|
|
184 |
#endif /* EAP_AM_STACK_SYMBIAN_H_ */
|
|
185 |
|
|
186 |
// end
|