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