aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_file.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-08-14 15:00:01 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-08-14 15:00:01 +0100
commitbb516b454ff9842c214e5cb77d984f7fd0ea2da7 (patch)
treee7d45399a61201b961996c9de8827beb83bfae66 /src/libserver/cfg_file.h
parent2778ec22a2ff4c81c7adcae657d39db08749851d (diff)
downloadrspamd-bb516b454ff9842c214e5cb77d984f7fd0ea2da7.tar.gz
rspamd-bb516b454ff9842c214e5cb77d984f7fd0ea2da7.zip
[Rework] More abstractions to hide C++ internals
Diffstat (limited to 'src/libserver/cfg_file.h')
-rw-r--r--src/libserver/cfg_file.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h
index 18388e642..8779f8edc 100644
--- a/src/libserver/cfg_file.h
+++ b/src/libserver/cfg_file.h
@@ -785,6 +785,32 @@ struct rspamd_action *rspamd_config_get_action(struct rspamd_config *cfg,
struct rspamd_action *rspamd_config_get_action_by_type(struct rspamd_config *cfg,
enum rspamd_action_type type);
+/**
+ * Iterate over all actions
+ * @param cfg
+ * @param func
+ * @param data
+ */
+void rspamd_config_actions_foreach(struct rspamd_config *cfg,
+ void (*func)(struct rspamd_action *act, void *d),
+ void *data);
+/**
+ * Iterate over all actions with index
+ * @param cfg
+ * @param func
+ * @param data
+ */
+void rspamd_config_actions_foreach_enumerate(struct rspamd_config *cfg,
+ void (*func)(int idx, struct rspamd_action *act, void *d),
+ void *data);
+
+/**
+ * Returns number of actions defined in the config
+ * @param cfg
+ * @return
+ */
+gsize rspamd_config_actions_size(struct rspamd_config *cfg);
+
int rspamd_config_ev_backend_get(struct rspamd_config *cfg);
const gchar *rspamd_config_ev_backend_to_string(int ev_backend, gboolean *effective);