diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-09-30 16:43:52 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-09-30 16:43:52 +0100 |
commit | 0f3bef042e866e967e41848ebd8bae85a86fef73 (patch) | |
tree | 809b692999a1ee85d5e31d513088e517bad50c52 /src/cfg_rcl.h | |
parent | 3d218a89ecaf7ff265a26f922d99d74ef6ef6108 (diff) | |
download | rspamd-0f3bef042e866e967e41848ebd8bae85a86fef73.tar.gz rspamd-0f3bef042e866e967e41848ebd8bae85a86fef73.zip |
Add rcl parsers for workers options.
Diffstat (limited to 'src/cfg_rcl.h')
-rw-r--r-- | src/cfg_rcl.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/cfg_rcl.h b/src/cfg_rcl.h index 223431d79..1b19783cf 100644 --- a/src/cfg_rcl.h +++ b/src/cfg_rcl.h @@ -26,7 +26,6 @@ #include "config.h" #include "rcl/rcl.h" -#include "main.h" #define CFG_RCL_ERROR cfg_rcl_error_quark () static inline GQuark @@ -36,6 +35,7 @@ cfg_rcl_error_quark (void) } struct rspamd_rcl_section; +struct config_file; struct rspamd_rcl_struct_parser { gpointer user_struct; @@ -198,4 +198,19 @@ gboolean rspamd_rcl_parse_struct_string_list (struct config_file *cfg, rspamd_cl gboolean rspamd_rcl_parse_struct_boolean (struct config_file *cfg, rspamd_cl_object_t *obj, gpointer ud, struct rspamd_rcl_section *section, GError **err); +/** + * Utility functions + */ + +/** + * Register new parser for a worker type of an option with the specified name + * @param cfg config structure + * @param type type of worker (GQuark) + * @param name name of option + * @param handler handler of option + * @param target opaque target structure + * @param offset offset inside a structure + */ +void rspamd_rcl_register_worker_option (struct config_file *cfg, gint type, const gchar *name, + rspamd_rcl_handler_t handler, gpointer target, gsize offset, gint flags); #endif /* CFG_RCL_H_ */ |