diff options
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -1,12 +1,29 @@ #ifndef fooconfighfoo #define fooconfighfoo -void scfg_monitor_dir(struct cfg *cfg); +enum cfg_value_type { + CFG_VAL_TYPE_INVALID, + CFG_VAL_TYPE_STRING, + CFG_VAL_TYPE_UINT16, + CFG_VAL_TYPE_ADDRS, +}; -void inotify_refdump(struct inotify_ev *iev); +struct cfg_key_value_map { + const char *key_name; + int key_value; + enum cfg_value_type value_type; +}; -void scfg_stop_monitor_dir(struct cfg *cfg); +union cfg_value { + const char *str; + uint16_t uint16; + struct list_head addr_list; /* FIXME: addrs */ +}; -void scfg_read_all(struct cfg *cfg); +bool config_parse_line(struct cfg *cfg, char **buf, + struct cfg_key_value_map *kvmap, + int *key, union cfg_value *value); + +bool config_parse_header(struct cfg *cfg, const char *title, char **buf); #endif |