|
1 /* |
|
2 * Copyright (c) 2005-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: Callback interface from core server |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef ABS_CORE_SERVER_CALLBACK_H |
|
20 #define ABS_CORE_SERVER_CALLBACK_H |
|
21 |
|
22 #include "am_platform_libraries.h" |
|
23 #include "core_types.h" |
|
24 |
|
25 class abs_wlan_eapol_callback_c; |
|
26 |
|
27 /** |
|
28 * Abstract adaptation layer interface for core server callbacks. |
|
29 * |
|
30 * This interface is implemented by the adaptation layer and a reference |
|
31 * to the class implementing it is passed as a parameter to the core server |
|
32 * constructor. |
|
33 * |
|
34 * @since S60 v3.1 |
|
35 * @see abs_core_server_c |
|
36 */ |
|
37 class abs_core_server_callback_c |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 virtual ~abs_core_server_callback_c() {}; |
|
45 |
|
46 /** |
|
47 * Notify about country information received from APs. |
|
48 * @param request_id An unique identification for the request. |
|
49 * @param found_region WLAN region information obtained from the AP's country information. |
|
50 * @param inconsistent_info Information whether different APs gave inconsistent country information. |
|
51 */ |
|
52 virtual void store_ap_country_info( |
|
53 u32_t request_id, |
|
54 const core_wlan_region_e& found_region, |
|
55 bool_t inconsistent_info ) = 0; |
|
56 |
|
57 /** |
|
58 * Get current regulatory domain. |
|
59 * |
|
60 * @since S60 v3.1 |
|
61 * @param request_id An unique identification for the request. |
|
62 * @param region Current regulatory domain. |
|
63 * @param mcc_known Information whether the WLAN region and MCC is currently known. |
|
64 */ |
|
65 virtual void get_regulatory_domain( |
|
66 u32_t request_id, |
|
67 core_wlan_region_e& region, |
|
68 bool_t& mcc_known ) = 0; |
|
69 |
|
70 /** |
|
71 * Send a notification to the adaptation layer. |
|
72 * |
|
73 * @since S60 v3.1 |
|
74 * @param notification The notification to be sent. |
|
75 * @param data_length Length of optional data. |
|
76 * @param data Pointer to optional data. |
|
77 */ |
|
78 virtual void notify( |
|
79 core_notification_e notification, |
|
80 int_t data_length, |
|
81 const u8_t* data ) = 0; |
|
82 |
|
83 /** |
|
84 * An asynchronous request from the adaptation layer has been completed. |
|
85 * |
|
86 * @since S60 v3.1 |
|
87 * @param request_id Identification of the corresponding request. |
|
88 * @param status Completion status of the request. |
|
89 */ |
|
90 virtual void request_complete( |
|
91 u32_t request_id, |
|
92 core_error_e status ) = 0; |
|
93 |
|
94 /** |
|
95 * Cancel a pending asynchronous request. |
|
96 * |
|
97 * @since S60 v3.1 |
|
98 * @param request_id Identification of the corresponding request. |
|
99 */ |
|
100 virtual void cancel_request( |
|
101 u32_t request_id ) = 0; |
|
102 |
|
103 /** |
|
104 * Initialize interface to EAPOL. |
|
105 * |
|
106 * @since S60 v3.2 |
|
107 * @param mode Operating mode to use. |
|
108 * @param partner Pointer to partner instance. |
|
109 * @return Status value of operation. |
|
110 */ |
|
111 virtual u32_t load_eapol( |
|
112 core_eapol_operating_mode_e mode, |
|
113 abs_wlan_eapol_callback_c* const partner ) = 0; |
|
114 |
|
115 /** |
|
116 * Shutdown EAPOL. |
|
117 * |
|
118 * @since S60 v3.2 |
|
119 * @return Status value of operation. |
|
120 */ |
|
121 virtual u32_t shutdown() = 0; |
|
122 |
|
123 /** |
|
124 * Configure EAPOL. |
|
125 * |
|
126 * @since S60 v3.2 |
|
127 * @param header_offset Offset of EAP-header in packet_send. |
|
128 * @param MTU Maximum transfer unit (MTU). |
|
129 * @param trailer_length Length of trailer needed by lower levels.. |
|
130 * @return Status value of operation. |
|
131 */ |
|
132 virtual u32_t configure( |
|
133 const u32_t header_offset, |
|
134 const u32_t MTU, |
|
135 const u32_t trailer_length ) = 0; |
|
136 |
|
137 /** |
|
138 * Send data to EAPOL. |
|
139 * |
|
140 * @since S60 v3.2 |
|
141 * @param data Pointer to data to be send. |
|
142 * @param length Length of data to be send. |
|
143 * @return Status value of operation. |
|
144 */ |
|
145 virtual u32_t process_data( |
|
146 const void* const data, |
|
147 const u32_t length ) = 0; |
|
148 |
|
149 }; |
|
150 |
|
151 #endif // ABS_CORE_SERVER_CALLBACK_H |