- if (jo == NULL || !json_object_object_get_ex(jo, "canbus", &canbus))
- {
- ERROR(binder_interface, "Can't find canbus node in the configuration file. Please review it.");
- devices_name_.clear();
- }
- else if (json_object_get_type(canbus) != json_type_array)
- {
- taxi = json_object_get_string(canbus);
- DEBUG(binder_interface, "Can bus found: %s", taxi);
- devices_name_.push_back(std::string(taxi));
- }
- else
- {
- int n, i;
- n = json_object_array_length(canbus);
- for (i = 0 ; i < n ; i++)
- devices_name_.push_back(json_object_get_string(json_object_array_get_idx(canbus, i)));
- }
+ /// @brief read the conf_file_ and parse it into an INIReader object
+ /// to search into later.
+ bool config_parser_t::check_conf()
+ {
+ if (config_content_.size() <= 0)
+ {
+ AFB_ERROR("Can't load the INI config file: /etc/dev-mapping.conf.");
+ return false;
+ }
+ AFB_DEBUG("Configuration file parsed");
+ return true;