summaryrefslogtreecommitdiffstats
path: root/src/libserver/rspamd_symcache.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-14 19:47:34 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-14 19:47:34 +0000
commitdf1377662731d3f071510a7884ff6f8c759404a8 (patch)
tree14854583033d262955fad45b7495a64873cc8404 /src/libserver/rspamd_symcache.h
parente3e85d63f18aaf7fae817704af79b39ddb938706 (diff)
downloadrspamd-df1377662731d3f071510a7884ff6f8c759404a8.tar.gz
rspamd-df1377662731d3f071510a7884ff6f8c759404a8.zip
[Minor] Core: Add methods to enable/disable symbols
Diffstat (limited to 'src/libserver/rspamd_symcache.h')
-rw-r--r--src/libserver/rspamd_symcache.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/libserver/rspamd_symcache.h b/src/libserver/rspamd_symcache.h
index 0542f86b4..df495fc8e 100644
--- a/src/libserver/rspamd_symcache.h
+++ b/src/libserver/rspamd_symcache.h
@@ -227,16 +227,16 @@ void rspamd_symcache_add_delayed_dependency (struct rspamd_symcache *cache,
* @param cache
* @param symbol
*/
-void rspamd_symcache_disable_symbol (struct rspamd_symcache *cache,
- const gchar *symbol);
+void rspamd_symcache_disable_symbol_perm (struct rspamd_symcache *cache,
+ const gchar *symbol);
/**
* Enable specific symbol in the cache
* @param cache
* @param symbol
*/
-void rspamd_symcache_enable_symbol (struct rspamd_symcache *cache,
- const gchar *symbol);
+void rspamd_symcache_enable_symbol_perm (struct rspamd_symcache *cache,
+ const gchar *symbol);
/**
* Get abstract callback data for a symbol (or its parent symbol)
* @param cache cache object
@@ -285,6 +285,28 @@ guint64 rspamd_symcache_get_cksum (struct rspamd_symcache *cache);
gboolean rspamd_symcache_is_symbol_enabled (struct rspamd_task *task,
struct rspamd_symcache *cache,
const gchar *symbol);
+
+/**
+ * Enable this symbol for task
+ * @param task
+ * @param cache
+ * @param symbol
+ * @return TRUE if a symbol has been enabled (not executed before)
+ */
+gboolean rspamd_symcache_enable_symbol (struct rspamd_task *task,
+ struct rspamd_symcache *cache,
+ const gchar *symbol);
+
+/**
+ * Enable this symbol for task
+ * @param task
+ * @param cache
+ * @param symbol
+ * @return TRUE if a symbol has been disabled (not executed before)
+ */
+gboolean rspamd_symcache_disable_symbol (struct rspamd_task *task,
+ struct rspamd_symcache *cache,
+ const gchar *symbol);
/**
* Process specific function for each cache element (in order they are added)
* @param cache