Data Structures | |
struct | ParsingContext |
Parsing Context. More... | |
Defines | |
#define | MAX_DEPTH 32 |
Maximum nesting depth. | |
#define | CDATA_BUF_SIZE 1024 |
Maximum amount of CDATA. | |
#define | MAX_KEY_SIZE 128 |
Max length of property key. | |
Enumerations | |
enum | { CURELEM_UNKNOWN = -1, CURELEM_DEVICE_INFO = 0, CURELEM_DEVICE = 1, CURELEM_MATCH = 2, CURELEM_MERGE = 3 } |
Possible elements the parser can process. More... | |
Functions | |
dbus_bool_t | handle_match (ParsingContext *pc, const char **attr) |
Called when the match element begins. | |
void | handle_merge (ParsingContext *pc, const char **attr) |
Called when the merge element begins. | |
void | parsing_abort (ParsingContext *pc) |
Abort parsing of document. | |
void | start (ParsingContext *pc, const char *el, const char **attr) |
Called by expat when an element begins. | |
void | end (ParsingContext *pc, const char *el) |
Called by expat when an element ends. | |
void | cdata (ParsingContext *pc, const char *s, int len) |
Called when there is CDATA. | |
dbus_bool_t | process_fdi_file (const char *dir, const char *filename, HalDevice *device) |
Process a device information info file. | |
int | scan_fdi_files (const char *dir, HalDevice *d) |
Scan all directories and subdirectories in the given directory and process each *.fdi file. | |
dbus_bool_t | di_search_and_merge (HalDevice *d) |
Search the device info file repository for a .fdi file to merge more information into the device object. |
|
Possible elements the parser can process.
Definition at line 62 of file device_info.c. |
|
Called when there is CDATA.
Definition at line 458 of file device_info.c. References ParsingContext::aborted, ParsingContext::cdata_buf, ParsingContext::cdata_buf_len, and CDATA_BUF_SIZE. Referenced by process_fdi_file(). |
|
Search the device info file repository for a .fdi file to merge more information into the device object.
Definition at line 679 of file device_info.c. References HalDevice, and scan_fdi_files(). Referenced by rename_and_merge(). |
|
Called by expat when an element ends.
Definition at line 386 of file device_info.c. References ParsingContext::aborted, ParsingContext::cdata_buf, ParsingContext::cdata_buf_len, ParsingContext::curelem, CURELEM_MERGE, ParsingContext::curelem_stack, ParsingContext::depth, ParsingContext::device, ParsingContext::device_matched, ds_property_set_bool(), ds_property_set_double(), ds_property_set_int(), ds_property_set_string(), ParsingContext::match_depth_first_fail, ParsingContext::match_ok, ParsingContext::merge_key, and ParsingContext::merge_type. Referenced by process_fdi_file(). |
|
Called when the match element begins.
Definition at line 137 of file device_info.c. References ParsingContext::device, ds_property_get_bool(), ds_property_get_int(), ds_property_get_string(), and ds_property_get_type(). Referenced by start(). |
|
Called when the merge element begins.
Definition at line 225 of file device_info.c. References MAX_KEY_SIZE, ParsingContext::merge_key, and ParsingContext::merge_type. Referenced by start(). |
|
Abort parsing of document.
Definition at line 269 of file device_info.c. References ParsingContext::aborted. Referenced by start(). |
|
Process a device information info file.
Definition at line 493 of file device_info.c. References ParsingContext::aborted, cdata(), ParsingContext::curelem, CURELEM_UNKNOWN, ParsingContext::depth, ParsingContext::device, ParsingContext::device_matched, end(), ParsingContext::file, HalDevice, ParsingContext::match_ok, ParsingContext::parser, and start(). Referenced by scan_fdi_files(). |
|
Scan all directories and subdirectories in the given directory and process each *.fdi file.
Definition at line 590 of file device_info.c. References HalDevice, and process_fdi_file(). Referenced by di_search_and_merge(). |
|
Called by expat when an element begins.
Definition at line 283 of file device_info.c. References ParsingContext::aborted, ParsingContext::cdata_buf_len, ParsingContext::curelem, CURELEM_DEVICE, CURELEM_DEVICE_INFO, CURELEM_MATCH, CURELEM_MERGE, ParsingContext::curelem_stack, CURELEM_UNKNOWN, ParsingContext::depth, ParsingContext::file, handle_match(), handle_merge(), ParsingContext::match_depth_first_fail, ParsingContext::match_ok, MAX_DEPTH, ParsingContext::parser, and parsing_abort(). Referenced by process_fdi_file(). |