diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-30 16:19:47 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-30 16:19:47 +0100 |
commit | 9a682abae79a10b3d9ebba9e4c4a285888082073 (patch) | |
tree | fa0d68a8d8ba0196cc72ab5a26dd55dab21b4979 /src/libserver/cfg_rcl.h | |
parent | 4cd0397b0c9d1a7d91be65237ad5d991ed63c7d5 (diff) | |
download | rspamd-9a682abae79a10b3d9ebba9e4c4a285888082073.tar.gz rspamd-9a682abae79a10b3d9ebba9e4c4a285888082073.zip |
Make section functions public.
Diffstat (limited to 'src/libserver/cfg_rcl.h')
-rw-r--r-- | src/libserver/cfg_rcl.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/libserver/cfg_rcl.h b/src/libserver/cfg_rcl.h index fe06d95a0..278c69473 100644 --- a/src/libserver/cfg_rcl.h +++ b/src/libserver/cfg_rcl.h @@ -76,7 +76,36 @@ typedef gboolean (*rspamd_rcl_handler_t) (rspamd_mempool_t *pool, */ typedef void (*rspamd_rcl_section_fin_t)(rspamd_mempool_t *pool, gpointer ud); +/** + * Add a default handler for a section + * @param section section pointer + * @param name name of param + * @param handler handler of param + * @param offset offset in a structure + * @param flags flags for the parser + * @return newly created structure + */ +struct rspamd_rcl_default_handler_data * rspamd_rcl_add_default_handler ( + struct rspamd_rcl_section *section, + const gchar *name, + rspamd_rcl_handler_t handler, + gsize offset, + gint flags); +/** + * Add new section to the configuration + * @param top top section + * @param name the name of the section + * @param handler handler function for all attributes + * @param type type of object handled by a handler + * @param required whether at least one of these sections is required + * @param strict_type turn on strict check for types for this section + * @return newly created structure + */ +struct rspamd_rcl_section * rspamd_rcl_add_section ( + struct rspamd_rcl_section **top, + const gchar *name, rspamd_rcl_handler_t handler, + enum ucl_type type, gboolean required, gboolean strict_type); /** * Init common sections known to rspamd |