diff options
Diffstat (limited to 'common/ini/ini_config_priv.h')
-rw-r--r-- | common/ini/ini_config_priv.h | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/common/ini/ini_config_priv.h b/common/ini/ini_config_priv.h index 9dff6cd..9185e14 100644 --- a/common/ini/ini_config_priv.h +++ b/common/ini/ini_config_priv.h @@ -25,15 +25,51 @@ #include "collection.h" /* Configuration object */ -struct configobj { +struct ini_cfgobj { /* For now just a collection */ struct collection_item *cfg; - /* Boundary ? */ + /* Boundary */ + uint32_t boundary; /*... */ /* Statistics? Timestamps? When created? Modified? - TBD */ /*... */ }; + +/* Configuration file object */ +struct ini_cfgfile { + /***********************************/ + /* Externally controlled variables */ + /***********************************/ + /* File name for the configuration file */ + char *filename; + /* File stream */ + FILE *file; + /* File descriptor that is passed in */ + int fd; + /* Error level */ + int error_level; + /* Collision flags - define how to merge things */ + uint32_t collision_flags; + /* Collision flags - define how to merge things */ + uint32_t metadata_flags; + /**********************/ + /* Internal variables */ + /**********************/ + /* Collection of errors detected during parsing */ + struct collection_item *error_list; + /* Metadata about the file */ + struct collection_item *metadata; + /* Count of error lines */ + unsigned count; +}; + +/* Parsing error */ +struct ini_parse_error { + unsigned line; + int error; +}; + /* Internal cleanup callback */ void ini_cleanup_cb(const char *property, int property_len, |