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