143 class EAP_EXPORT eap_file_config_c |
137 class EAP_EXPORT eap_file_config_c |
144 : public abs_eap_core_map_c |
138 : public abs_eap_core_map_c |
145 { |
139 { |
146 |
140 |
147 private: |
141 private: |
148 |
|
149 abs_eap_am_tools_c* const m_am_tools; |
142 abs_eap_am_tools_c* const m_am_tools; |
150 |
143 |
151 /// This stores eap_config_value_c objects using eap_variable_data selector. |
144 /// This stores eap_config_value_c objects using eap_variable_data selector. |
152 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> m_config_map; |
145 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> m_config_map; |
153 |
146 |
154 eap_variable_data_c m_value_buffer; |
|
155 |
|
156 bool m_is_valid; |
147 bool m_is_valid; |
157 |
148 |
158 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
149 EAP_FUNC_IMPORT eap_status_e expand_environment_variables( |
159 |
|
160 eap_status_e expand_environment_variables( |
|
161 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map, |
150 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map, |
162 const eap_variable_data_c * const value, |
151 const eap_variable_data_c * const value, |
163 eap_variable_data_c * const expanded_value |
152 eap_variable_data_c * const expanded_value |
164 ); |
153 ); |
165 |
154 |
166 eap_status_e remove_spaces(eap_variable_data_c * const buffer); |
155 EAP_FUNC_IMPORT eap_status_e remove_spaces(eap_variable_data_c * const buffer); |
167 |
156 |
168 eap_status_e remove_leading_spaces(eap_variable_data_c * const line); |
157 EAP_FUNC_IMPORT eap_status_e remove_leading_spaces(eap_variable_data_c * const line); |
169 |
158 |
170 eap_status_e read_section( |
159 EAP_FUNC_IMPORT eap_status_e read_section( |
171 abs_eap_am_file_input_c * const file, |
160 abs_eap_am_file_input_c * const file, |
172 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map); |
161 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map); |
173 |
162 |
174 eap_status_e read_subsections( |
163 EAP_FUNC_IMPORT eap_status_e read_subsections( |
175 abs_eap_am_file_input_c * const file, |
164 abs_eap_am_file_input_c * const file, |
176 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map); |
165 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map); |
177 |
166 |
178 eap_status_e get_subsect( |
167 EAP_FUNC_IMPORT eap_status_e get_subsect( |
179 abs_eap_am_file_input_c * const file, |
168 abs_eap_am_file_input_c * const file, |
180 eap_variable_data_c * const line); |
169 eap_variable_data_c * const line); |
181 |
170 |
182 eap_status_e convert_value( |
171 EAP_FUNC_IMPORT eap_status_e convert_value( |
183 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map, |
172 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map, |
184 const eap_variable_data_c * const value_buffer, |
173 const eap_variable_data_c * const value_buffer, |
185 const eap_configure_type_e type, |
174 const eap_configure_type_e type, |
186 eap_variable_data_c * const value_data); |
175 eap_variable_data_c * const value_data); |
187 |
176 |
188 eap_status_e store_configure( |
177 EAP_FUNC_IMPORT eap_status_e store_configure( |
189 abs_eap_am_file_input_c * const file, |
178 abs_eap_am_file_input_c * const file, |
190 const eap_variable_data_c * const line, |
179 const eap_variable_data_c * const line, |
191 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map); |
180 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map); |
192 |
181 |
193 eap_status_e cnf_parse_value( |
182 EAP_FUNC_IMPORT eap_status_e cnf_parse_value( |
194 const eap_variable_data_c * const found_type_value, |
183 const eap_variable_data_c * const found_type_value, |
195 const eap_variable_data_c * const found_type_name, |
184 const eap_variable_data_c * const found_type_name, |
196 eap_configure_type_e * const parsed_type, |
185 eap_configure_type_e * const parsed_type, |
197 eap_variable_data_c * const parsed_type_value, |
186 eap_variable_data_c * const parsed_type_value, |
198 const bool is_environment_variable); |
187 const bool is_environment_variable); |
199 |
188 |
200 eap_status_e cnf_get_string( |
189 EAP_FUNC_IMPORT eap_status_e cnf_get_string( |
201 const eap_variable_data_c * const param, |
190 const eap_variable_data_c * const param, |
202 eap_variable_data_c * const param_name, |
191 eap_variable_data_c * const param_name, |
203 eap_variable_data_c * const param_value, |
192 eap_variable_data_c * const param_value, |
204 eap_configure_type_e * const type); |
193 eap_configure_type_e * const type); |
205 |
194 |
206 eap_status_e find_rvalue( |
195 EAP_FUNC_IMPORT eap_status_e find_rvalue( |
207 const eap_variable_data_c * const config_param, |
196 const eap_variable_data_c * const config_param, |
208 bool * const read_env_value, |
197 bool * const read_env_value, |
209 eap_variable_data_c * const param_name, |
198 eap_variable_data_c * const param_name, |
210 eap_variable_data_c * const param_value |
199 eap_variable_data_c * const param_value |
211 ); |
200 ); |
212 |
201 |
213 u8_t * read_hex_byte( |
202 EAP_FUNC_IMPORT u8_t * read_hex_byte(u8_t * cursor, const u8_t * const end, u8_t * const hex_byte); |
214 u8_t * cursor, |
203 |
215 const u8_t * const end, |
204 EAP_FUNC_IMPORT u8_t * read_u32_t(u8_t * cursor, const u8_t * const end, u32_t * const hex_byte); |
216 u8_t * const hex_byte, |
205 |
217 const u32_t hex_byte_length); |
206 EAP_FUNC_IMPORT eap_status_e read_configure( |
218 |
|
219 u8_t * read_u32_t(u8_t * cursor, const u8_t * const end, u32_t * const hex_byte); |
|
220 |
|
221 eap_status_e read_configure( |
|
222 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map, |
207 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map, |
223 const eap_configuration_field_c * const field, |
208 const eap_configuration_field_c * const field, |
224 eap_variable_data_c* const data, |
209 eap_variable_data_c* const data, |
225 eap_configure_type_e * const configuration_data_type, |
210 eap_configure_type_e * const configuration_data_type, |
226 const bool existence_test); |
211 const bool existence_test); |
227 |
212 |
228 eap_status_e file_read_line( |
213 EAP_FUNC_IMPORT eap_status_e file_read_line( |
229 abs_eap_am_file_input_c * const file, |
214 abs_eap_am_file_input_c * const file, |
230 eap_variable_data_c * const line); |
215 eap_variable_data_c * const line); |
231 |
216 |
232 eap_status_e read_configure( |
217 EAP_FUNC_IMPORT eap_status_e read_configure( |
233 const eap_configuration_field_c * const field, |
218 const eap_configuration_field_c * const field, |
234 eap_variable_data_c* const data, |
219 eap_variable_data_c* const data, |
235 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map, |
220 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map, |
236 const bool check_subsection_when_true); |
221 const bool check_subsection_when_true); |
237 |
222 |
238 eap_status_e read_all_configurations( |
|
239 const eap_configuration_field_c * const field, |
|
240 eap_variable_data_c* const data, |
|
241 eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map); |
|
242 |
|
243 eap_status_e add_option( |
|
244 const eap_tlv_header_c * const option_header); |
|
245 |
|
246 public: |
223 public: |
247 |
224 |
248 EAP_FUNC_IMPORT eap_file_config_c( |
225 EAP_FUNC_IMPORT eap_file_config_c( |
249 abs_eap_am_tools_c* const tools); |
226 abs_eap_am_tools_c* const tools); |
250 |
227 |
251 EAP_FUNC_IMPORT virtual ~eap_file_config_c(); |
228 EAP_FUNC_IMPORT virtual ~eap_file_config_c(); |
252 |
229 |
253 EAP_FUNC_IMPORT eap_status_e configure( |
230 EAP_FUNC_IMPORT eap_status_e configure( |
254 abs_eap_am_file_input_c * const file); |
231 abs_eap_am_file_input_c * const file); |
255 |
|
256 EAP_FUNC_IMPORT eap_status_e read_configuration_message( |
|
257 const eap_variable_data_c * const configuration_message); |
|
258 |
232 |
259 EAP_FUNC_IMPORT eap_status_e read_configure( |
233 EAP_FUNC_IMPORT eap_status_e read_configure( |
260 const eap_configuration_field_c * const field, |
234 const eap_configuration_field_c * const field, |
261 eap_variable_data_c* const data); |
235 eap_variable_data_c* const data); |
262 |
236 |