Functions | |
void | discover_conf_load (discover_error_t *status) |
int | discover_conf_name_to_bus (char *name, discover_error_t *status) |
discover_bus_map_t * | discover_conf_get_full_bus_map (discover_error_t *status) |
discover_bus_map_t * | discover_conf_get_bus_map_by_name (char *name, discover_error_t *status) |
discover_bus_map_t * | discover_conf_get_bus_map (discover_bus_t bus, discover_error_t *status) |
void | discover_conf_insert_url (char *url, discover_error_t *status) |
void | discover_conf_append_url (char *url, discover_error_t *status) |
discover_xml_url_t * | discover_conf_get_urls (discover_error_t *status) |
void | discover_conf_free (void) |
char * | discover_conf_get_bus_name (discover_bus_t bus) |
char * | discover_conf_get_filetype_name (discover_filetype_t filetype) |
|
Append the URL specified in url at the tail of the list of URLs where Discover data will be retrieved.
Definition at line 509 of file conf.c. References discover_error::code, discover_conf_load(), and discover_error_t. |
|
Free configuration data. This is mainly useful so that the next call to discover_conf_load will reload the configuration data. Definition at line 580 of file conf.c. References discover_xml_url_free(). |
|
Get the bus map for a single bus.
Definition at line 445 of file conf.c. References BUS_COUNT, discover_error::code, discover_bus_map_t, discover_conf_load(), DISCOVER_EBUSNOTFOUND, and discover_error_t. Referenced by discover_get_devices(). |
|
Get the bus map by name for a single bus.
Definition at line 422 of file conf.c. References _real_discover_conf_get_bus_map_by_name(), discover_error::code, discover_conf_load(), and discover_error_t. |
|
Translate an enum bus value into a string.
Definition at line 596 of file conf.c. References BUS_COUNT, and discover_bus_map::name. Referenced by discover_xml_get_data_urls(). |
|
Translate an enum filetype value into a string.
Definition at line 612 of file conf.c. Referenced by discover_xml_get_data_urls(). |
|
Get the full bus map, listing all buses.
Definition at line 409 of file conf.c. References discover_conf_load(), and discover_error_t. Referenced by discover_device_find(). |
|
Get the list of URLs from which XML data will be retrieved.
Definition at line 529 of file conf.c. References discover_error::code, discover_conf_load(), discover_error_t, discover_xml_url_new(), and discover_xml_url_t. Referenced by discover_xml_get_urls(). |
|
Insert the URL specified in url at the head of the list of URLs where Discover data will be retrieved.
Definition at line 470 of file conf.c. References discover_error::code, discover_conf_load(), discover_error_t, discover_xml_url_new(), and discover_xml_url_t. |
|
Ensure that the configuration file is loaded. Repeated calls to this function will not change anything, unless you call discover_conf_free. Technically, this function will lie to you if there is no conf file. Even though no configuration was loaded, repeated calls still will not change anything. However, if we don't do this and a config file is created between the time some long-lived caller first calls discover_conf_load and the time it calls it again, it will be loaded. This doesn't strike me as idempotent behavior. So, repeated calls even in this case will not change anything unless you call discover_conf_free.
Definition at line 319 of file conf.c. References discover_error::code, discover_error::create_message, discover_error_t, and DISCOVER_EXML. Referenced by discover_conf_append_url(), discover_conf_get_bus_map(), discover_conf_get_bus_map_by_name(), discover_conf_get_full_bus_map(), discover_conf_get_urls(), and discover_conf_insert_url(). |
|
Get the bus enumeration for a bus name.
Definition at line 390 of file conf.c. References discover_error::code, DISCOVER_EBUSNOTFOUND, discover_error_t, and discover_bus_map::name. Referenced by _real_discover_conf_get_bus_map_by_name(). |