|
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 #include "eap_am_export.h" |
|
21 #include "eap_am_types.h" |
|
22 #include "eap_status.h" |
|
23 #include "wlan_eap_if_send_status.h" |
|
24 |
|
25 /** @file */ |
|
26 |
|
27 EAP_FUNC_EXPORT_INTERFACE wlan_eap_if_send_status_e wlan_eap_if_send_status_conversion_c::convert(const eap_status_e status) |
|
28 { |
|
29 switch(status) |
|
30 { |
|
31 case eap_status_ok: |
|
32 return wlan_eap_if_send_status_ok; |
|
33 case eap_status_pending_request: |
|
34 return wlan_eap_if_send_status_pending_request; |
|
35 case eap_status_allocation_error: |
|
36 return wlan_eap_if_send_status_allocation_error; |
|
37 case eap_status_illegal_parameter: |
|
38 return wlan_eap_if_send_status_illegal_parameter; |
|
39 case eap_status_not_found: |
|
40 return wlan_eap_if_send_status_not_found; |
|
41 case eap_status_success: |
|
42 return wlan_eap_if_send_status_success; |
|
43 case eap_status_drop_packet_quietly: |
|
44 return wlan_eap_if_send_status_drop_packet_quietly; |
|
45 default: |
|
46 return wlan_eap_if_send_status_process_general_error; |
|
47 } |
|
48 } |
|
49 |
|
50 EAP_FUNC_EXPORT_INTERFACE eap_status_e wlan_eap_if_send_status_conversion_c::convert(const wlan_eap_if_send_status_e status) |
|
51 { |
|
52 switch(status) |
|
53 { |
|
54 case wlan_eap_if_send_status_ok: |
|
55 return eap_status_ok; |
|
56 case wlan_eap_if_send_status_pending_request: |
|
57 return eap_status_pending_request; |
|
58 case wlan_eap_if_send_status_allocation_error: |
|
59 return eap_status_allocation_error; |
|
60 case wlan_eap_if_send_status_illegal_parameter: |
|
61 return eap_status_illegal_parameter; |
|
62 case wlan_eap_if_send_status_not_found: |
|
63 return eap_status_not_found; |
|
64 case wlan_eap_if_send_status_success: |
|
65 return eap_status_success; |
|
66 case wlan_eap_if_send_status_drop_packet_quietly: |
|
67 return eap_status_drop_packet_quietly; |
|
68 default: |
|
69 return eap_status_process_general_error; |
|
70 } |
|
71 } |
|
72 |
|
73 //-------------------------------------------------- |
|
74 |
|
75 |
|
76 // End. |