diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/config/config-parser.h | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/config/config-parser.h')
-rw-r--r-- | src/config/config-parser.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/config/config-parser.h b/src/config/config-parser.h new file mode 100644 index 0000000..e0a0a5b --- /dev/null +++ b/src/config/config-parser.h @@ -0,0 +1,33 @@ +#ifndef CONFIG_PARSER_H +#define CONFIG_PARSER_H + +#define CONFIG_MODULE_DIR MODULEDIR"/settings" + +#define IS_WHITE(c) ((c) == ' ' || (c) == '\t') + +struct config_module_parser { + const struct setting_parser_info *root; + struct setting_parser_context *parser; + void *settings; +}; +ARRAY_DEFINE_TYPE(config_module_parsers, struct config_module_parser *); + +extern struct config_module_parser *config_module_parsers; +extern struct config_filter_context *config_filter; +extern struct module *modules; + +int config_parse_net(const char *value, struct ip_addr *ip_r, + unsigned int *bits_r, const char **error_r); +int config_parse_file(const char *path, bool expand_values, + const char *const *modules, const char **error_r) + ATTR_NULL(3); + +void config_parse_load_modules(void); + +bool config_module_want_parser(struct config_module_parser *parsers, + const char *const *modules, + const struct setting_parser_info *root) + ATTR_NULL(2); +void config_parser_deinit(void); + +#endif |