|
1 /* |
|
2 * Copyright (c) 2006-2007 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: Stub version of WPX adaptation. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 10 % |
|
20 */ |
|
21 |
|
22 #ifndef CORE_WPX_ADAPTATION_STUB_H |
|
23 #define CORE_WPX_ADAPTATION_STUB_H |
|
24 |
|
25 #include "abs_core_wpx_adaptation.h" |
|
26 |
|
27 /** |
|
28 * This class hides WPX specific functionality. |
|
29 * |
|
30 * @since S60 v3.1 |
|
31 */ |
|
32 NONSHARABLE_CLASS( core_wpx_adaptation_stub_c ) : public abs_core_wpx_adaptation_c |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Constructor. |
|
39 */ |
|
40 core_wpx_adaptation_stub_c(); |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 virtual ~core_wpx_adaptation_stub_c(); |
|
46 |
|
47 /** |
|
48 * Returns the WPX key management suite from the given OUI. |
|
49 * |
|
50 * @since S60 v3.1 |
|
51 * @param oui OUI to check for key management suite. |
|
52 * @return core_key_management_none if no supported WPX key management suite found, |
|
53 * otherwise the defined suite |
|
54 */ |
|
55 virtual core_key_management_e wpx_key_management_suite( |
|
56 const u8_t* oui ); |
|
57 |
|
58 /** |
|
59 * Convert the given key management suite to WPX specific OUI. |
|
60 * |
|
61 * @since S60 v3.1 |
|
62 * @param key_management Key management suite to convert. |
|
63 * @param data_length Length of the OUI element. |
|
64 * @param data Pointer to the buffer for storing the OUI element. |
|
65 * @return code_error_ok on success, an error code otherwise. |
|
66 * @note On successful execution data_length parameter is changed |
|
67 * to the size of data stored. |
|
68 */ |
|
69 virtual core_error_e get_wpx_key_management_oui( |
|
70 core_key_management_e key_management, |
|
71 u8_t& data_length, |
|
72 u8_t* data ); |
|
73 |
|
74 /** |
|
75 * Check whether the given AP has compatible WPX settings with the connection settings. |
|
76 * |
|
77 * @since S60 v3.1 |
|
78 * @param reason The reason AP failed the check. |
|
79 * @param ap_data AP data to compare. |
|
80 * @param iap_data IAP data to compare. |
|
81 * @return Whether further checking is allowed. |
|
82 */ |
|
83 virtual bool_t is_ap_wpx_compatible_with_iap( |
|
84 core_connect_status_e& reason, |
|
85 const core_ap_data_c& ap_data, |
|
86 const core_iap_data_c& iap_data ); |
|
87 |
|
88 /** |
|
89 * Process the given WPX frame. |
|
90 * |
|
91 * @since S60 v3.1 |
|
92 * @param frame_type Type of the frame. |
|
93 * @param frame_length Length of frame data. |
|
94 * @param frame_data Pointer to the frame data. |
|
95 * @return Whether the frame was handled. |
|
96 */ |
|
97 virtual bool_t handle_wpx_frame( |
|
98 core_frame_type_e frame_type, |
|
99 u16_t frame_length, |
|
100 const u8_t* frame_data ); |
|
101 |
|
102 /** |
|
103 * Handle a successful roam to WPX AP. |
|
104 * |
|
105 * @since S60 v3.1 |
|
106 * @param ap_data AP information. |
|
107 */ |
|
108 virtual void handle_wpx_roam_success( |
|
109 const core_ap_data_c& ap_data ); |
|
110 |
|
111 /** |
|
112 * Handle a connection stop. |
|
113 * |
|
114 * @since S60 v3.2 |
|
115 */ |
|
116 virtual void handle_wpx_connection_stop(); |
|
117 |
|
118 /** |
|
119 * Handle the starting of WPX fast-roam reassociation. |
|
120 * |
|
121 * @since S60 v3.1 |
|
122 * @param ap_data AP information. |
|
123 * @param assoc_ie_list IEs added to be added to reassociation request. |
|
124 * @return code_error_ok on success, an error code otherwise. |
|
125 */ |
|
126 virtual core_error_e handle_fast_roam_start_reassociation( |
|
127 core_ap_data_c& ap_data, |
|
128 core_type_list_c<core_frame_dot11_ie_c>& assoc_ie_list ); |
|
129 |
|
130 /** |
|
131 * Process the WPX fast-roam reassociation response frame. |
|
132 * |
|
133 * @since S60 v3.1 |
|
134 * @param server Pointer to the core_server instance. |
|
135 * @param frame Received reassociation response. |
|
136 */ |
|
137 virtual void handle_fast_roam_reassoc_resp( |
|
138 core_frame_assoc_resp_c* frame ); |
|
139 |
|
140 /** |
|
141 * Return the WPX specific IEs for the association request. |
|
142 * |
|
143 * @since S60 v3.1 |
|
144 * @param ap_data AP being connected to. |
|
145 * @param assoc_ie_list WPX IEs are added to this list. |
|
146 */ |
|
147 virtual void get_association_request_wpx_ie( |
|
148 core_ap_data_c& ap_data, |
|
149 core_type_list_c<core_frame_dot11_ie_c>& assoc_ie_list ); |
|
150 |
|
151 /** |
|
152 * Return the WPX version number. |
|
153 * |
|
154 * @since S60 v3.1 |
|
155 * @param frame Frame to search for WPX version number. |
|
156 * @return The WPX version number. Zero if none. |
|
157 */ |
|
158 virtual u8_t wpx_version( |
|
159 core_frame_beacon_c* frame ); |
|
160 |
|
161 /** |
|
162 * Return the maximum tx power level. |
|
163 * |
|
164 * @since S60 v3.1 |
|
165 * @param frame Frame to search for maximum tx power level. |
|
166 * @return Maximum tx power level, MAX_TX_POWER_LEVEL_NOT_DEFINED if none. |
|
167 */ |
|
168 virtual u8_t max_tx_power_level( |
|
169 core_frame_beacon_c* frame ); |
|
170 |
|
171 /** |
|
172 * Handle the WPX-specific features in traffic stream creation. |
|
173 * |
|
174 * @since S60 v3.2 |
|
175 * @param ap_data AP being connected to. |
|
176 * @param frame Frame containing the TSPEC parameters. |
|
177 * @param tid TID of the traffic stream. |
|
178 * @param tspec TSPEC parameters of the traffic stream. |
|
179 */ |
|
180 virtual void handle_ts_create_request( |
|
181 const core_ap_data_c& ap_data, |
|
182 core_frame_dot11_c* frame, |
|
183 u8_t tid, |
|
184 const core_traffic_stream_params_s& tspec ); |
|
185 |
|
186 /** |
|
187 * Get the WPX-specific traffic stream parameters. |
|
188 * |
|
189 * @since S60 v3.2 |
|
190 * @param frame Frame to be parsed. |
|
191 * @param tid TID of the traffic stream. |
|
192 * @param tspec Parameters are stored here. |
|
193 */ |
|
194 virtual void get_wpx_traffic_stream_params( |
|
195 core_frame_dot11_c* frame, |
|
196 u8_t tid, |
|
197 core_traffic_stream_params_s& tspec ); |
|
198 |
|
199 /** |
|
200 * Get the WPX-specific traffic stream status. |
|
201 * |
|
202 * @since S60 v3.2 |
|
203 * @param status Status Code field from the ADDTS Response. |
|
204 * @return The WPX-specific traffic stream status. |
|
205 */ |
|
206 virtual core_traffic_stream_status_e get_wpx_traffic_stream_status( |
|
207 u8_t status ); |
|
208 |
|
209 /** |
|
210 * Handle the WPX-specific features in association response. |
|
211 * |
|
212 * @since S60 v3.2 |
|
213 * @param ap_data AP being connected to. |
|
214 * @param frame Received reassociation response. |
|
215 */ |
|
216 virtual void handle_association_response( |
|
217 core_ap_data_c& ap_data, |
|
218 core_frame_assoc_resp_c* frame ); |
|
219 |
|
220 /** |
|
221 * Handle the WPX-specific operations after successful traffic stream creation. |
|
222 * |
|
223 * @since S60 v3.2 |
|
224 * @param frame Frame containing the TSPEC parameters. |
|
225 * @param tid TID of the traffic stream. |
|
226 * @param user_priority User Priority of the traffic stream. |
|
227 */ |
|
228 virtual void handle_ts_create_success( |
|
229 core_frame_dot11_c* frame, |
|
230 u8_t tid, |
|
231 u8_t user_priority ); |
|
232 |
|
233 /** |
|
234 * Handle the WPX-specific operations after traffic stream deletion. |
|
235 * |
|
236 * @since S60 v3.2 |
|
237 * @param tid TID of the traffic stream. |
|
238 * @param user_priority User Priority of the traffic stream. |
|
239 */ |
|
240 virtual void handle_ts_delete( |
|
241 u8_t tid, |
|
242 u8_t user_priority ); |
|
243 |
|
244 /** |
|
245 * Check whether the given management status code is WPX-specific. |
|
246 * |
|
247 * @since S60 v3.2 |
|
248 * @param management_status Management status code to check. |
|
249 * @return Whether the given status code is WPX-specific. |
|
250 */ |
|
251 virtual bool_t is_wpx_management_status( |
|
252 u32_t management_status ); |
|
253 |
|
254 /** |
|
255 * Check whether the given WPX-specific management status code is considered fatal. |
|
256 * |
|
257 * @since S60 v3.2 |
|
258 * @param management_status Management status code to check. |
|
259 * @return Whether the given status code is considered fatal. |
|
260 */ |
|
261 virtual bool_t is_fatal_wpx_management_status( |
|
262 u32_t management_status ); |
|
263 |
|
264 /** |
|
265 * Get the encryption mode used for connection. |
|
266 * |
|
267 * @since S60 v3.2 |
|
268 * @param ap_data AP being connected to. |
|
269 * @param mode Suggested encryption mode. |
|
270 * @return The encryption mode used for connection. |
|
271 */ |
|
272 virtual core_encryption_mode_e encryption_mode( |
|
273 core_ap_data_c& ap_data, |
|
274 core_encryption_mode_e mode ); |
|
275 |
|
276 /** |
|
277 * Get the authentication algorithm number used for connection. |
|
278 * |
|
279 * @since S60 v3.2 |
|
280 * @param eapol_auth_type The type of authentication. |
|
281 * @param eapol_auth_mode The authentication mode requested by EAPOL. |
|
282 * @return The authentication algorithm number used for connection. |
|
283 */ |
|
284 virtual u16_t authentication_algorithm( |
|
285 wlan_eapol_if_eapol_key_authentication_type_e eapol_auth_type, |
|
286 wlan_eapol_if_eapol_key_authentication_mode_e eapol_auth_mode ); |
|
287 |
|
288 /** |
|
289 * Return a WPX specific operation to be run during loading of drivers. |
|
290 * |
|
291 * @since S60 v3.2 |
|
292 * @return Pointer to the operation instance, NULL if none. |
|
293 */ |
|
294 virtual core_operation_base_c* get_wpx_load_drivers_operation(); |
|
295 |
|
296 }; |
|
297 |
|
298 #endif // CORE_WPX_ADAPTATION_STUB_H |