annotate src/config/config-parser.h @ 22656:1789bf2a1e01

director: Make sure HOST-RESET-USERS isn't used with max_moving_users=0 The reset command would just hang in that case. doveadm would never have sent this, so this is just an extra sanity check.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sun, 05 Nov 2017 23:51:56 +0200
parents 680f59741e5e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9138
3c8e0e094139 Code cleanup: Don't use __ prefix in header #defines.
Timo Sirainen <tss@iki.fi>
parents: 9087
diff changeset
1 #ifndef CONFIG_PARSER_H
3c8e0e094139 Code cleanup: Don't use __ prefix in header #defines.
Timo Sirainen <tss@iki.fi>
parents: 9087
diff changeset
2 #define CONFIG_PARSER_H
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3
10181
4dc080520769 config: Added support for dynamically loaded settings.
Timo Sirainen <tss@iki.fi>
parents: 10107
diff changeset
4 #define CONFIG_MODULE_DIR MODULEDIR"/settings"
4dc080520769 config: Added support for dynamically loaded settings.
Timo Sirainen <tss@iki.fi>
parents: 10107
diff changeset
5
12067
31387c9d5b88 doveconf: Quote output values when necessary.
Timo Sirainen <tss@iki.fi>
parents: 11510
diff changeset
6 #define IS_WHITE(c) ((c) == ' ' || (c) == '\t')
31387c9d5b88 doveconf: Quote output values when necessary.
Timo Sirainen <tss@iki.fi>
parents: 11510
diff changeset
7
9856
6103d925e018 config: Code cleanups.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
8 struct config_module_parser {
10107
dcda7c495eb6 struct setting_parser_info now specifies the module name.
Timo Sirainen <tss@iki.fi>
parents: 9856
diff changeset
9 const struct setting_parser_info *root;
9793
d7ccdbb58a03 config: If master module requests configuration, reread it before replying.
Timo Sirainen <tss@iki.fi>
parents: 9274
diff changeset
10 struct setting_parser_context *parser;
d7ccdbb58a03 config: If master module requests configuration, reread it before replying.
Timo Sirainen <tss@iki.fi>
parents: 9274
diff changeset
11 void *settings;
d7ccdbb58a03 config: If master module requests configuration, reread it before replying.
Timo Sirainen <tss@iki.fi>
parents: 9274
diff changeset
12 };
9856
6103d925e018 config: Code cleanups.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
13 ARRAY_DEFINE_TYPE(config_module_parsers, struct config_module_parser *);
9793
d7ccdbb58a03 config: If master module requests configuration, reread it before replying.
Timo Sirainen <tss@iki.fi>
parents: 9274
diff changeset
14
9856
6103d925e018 config: Code cleanups.
Timo Sirainen <tss@iki.fi>
parents: 9793
diff changeset
15 extern struct config_module_parser *config_module_parsers;
9263
5d0a69504867 config handling fixes and improvements. Separated module/service lookups. Added support for per-lip/rip settings.
Timo Sirainen <tss@iki.fi>
parents: 9229
diff changeset
16 extern struct config_filter_context *config_filter;
11265
3fc759d5e736 config: Unload modules at exit.
Timo Sirainen <tss@iki.fi>
parents: 10981
diff changeset
17 extern struct module *modules;
9263
5d0a69504867 config handling fixes and improvements. Separated module/service lookups. Added support for per-lip/rip settings.
Timo Sirainen <tss@iki.fi>
parents: 9229
diff changeset
18
11510
c147a2653f9c doveconf: Renamed lip/rip filters to local/remote, which also support DNS lookups now.
Timo Sirainen <tss@iki.fi>
parents: 11265
diff changeset
19 int config_parse_net(const char *value, struct ip_addr *ip_r,
c147a2653f9c doveconf: Renamed lip/rip filters to local/remote, which also support DNS lookups now.
Timo Sirainen <tss@iki.fi>
parents: 11265
diff changeset
20 unsigned int *bits_r, const char **error_r);
15087
8c003fe6f5a6 config: Support looking up config for multiple modules at the same time.
Timo Sirainen <tss@iki.fi>
parents: 12067
diff changeset
21 int config_parse_file(const char *path, bool expand_values,
8c003fe6f5a6 config: Support looking up config for multiple modules at the same time.
Timo Sirainen <tss@iki.fi>
parents: 12067
diff changeset
22 const char *const *modules, const char **error_r)
8c003fe6f5a6 config: Support looking up config for multiple modules at the same time.
Timo Sirainen <tss@iki.fi>
parents: 12067
diff changeset
23 ATTR_NULL(3);
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
24
10181
4dc080520769 config: Added support for dynamically loaded settings.
Timo Sirainen <tss@iki.fi>
parents: 10107
diff changeset
25 void config_parse_load_modules(void);
4dc080520769 config: Added support for dynamically loaded settings.
Timo Sirainen <tss@iki.fi>
parents: 10107
diff changeset
26
10981
02e0d6f0e1d4 doveconf: When module is given, ignore checks for non-required settings.
Timo Sirainen <tss@iki.fi>
parents: 10952
diff changeset
27 bool config_module_want_parser(struct config_module_parser *parsers,
15087
8c003fe6f5a6 config: Support looking up config for multiple modules at the same time.
Timo Sirainen <tss@iki.fi>
parents: 12067
diff changeset
28 const char *const *modules,
8c003fe6f5a6 config: Support looking up config for multiple modules at the same time.
Timo Sirainen <tss@iki.fi>
parents: 12067
diff changeset
29 const struct setting_parser_info *root)
8c003fe6f5a6 config: Support looking up config for multiple modules at the same time.
Timo Sirainen <tss@iki.fi>
parents: 12067
diff changeset
30 ATTR_NULL(2);
20015
680f59741e5e doveconf, config: Free all memory at deinit
Timo Sirainen <timo.sirainen@dovecot.fi>
parents: 15087
diff changeset
31 void config_parser_deinit(void);
10952
30e2d65eb67a config: Send client a services names that have more specific settings.
Timo Sirainen <tss@iki.fi>
parents: 10704
diff changeset
32
9002
9d0037a997f4 Initial commit for config rewrite.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
33 #endif