diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-29 15:08:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-29 15:08:03 +0100 |
commit | 5a5db3970743bbee42c42d04a663fc3322acee77 (patch) | |
tree | 02c938dfcc502903bfd30b73ef1378e4642d4273 /src/libserver/symbols_cache.h | |
parent | 75a15b475697ffc606d5d2fec9dca7e9a7a2818a (diff) | |
download | rspamd-5a5db3970743bbee42c42d04a663fc3322acee77.tar.gz rspamd-5a5db3970743bbee42c42d04a663fc3322acee77.zip |
[Minor] Add auxiliary functions for symbols cache
Diffstat (limited to 'src/libserver/symbols_cache.h')
-rw-r--r-- | src/libserver/symbols_cache.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libserver/symbols_cache.h b/src/libserver/symbols_cache.h index dedcda4e6..f717b39b9 100644 --- a/src/libserver/symbols_cache.h +++ b/src/libserver/symbols_cache.h @@ -40,6 +40,7 @@ enum rspamd_symbol_type { SYMBOL_TYPE_EMPTY = (1 << 8), /* Allow execution on empty tasks */ SYMBOL_TYPE_PREFILTER = (1 << 9), SYMBOL_TYPE_POSTFILTER = (1 << 10), + SYMBOL_TYPE_NONSTAT = (1 << 11), /* Skip as statistical symbol */ }; /** @@ -290,4 +291,15 @@ guint64 rspamd_symbols_cache_get_cksum (struct symbols_cache *cache); */ gboolean rspamd_symbols_cache_is_symbol_enabled (struct rspamd_task *task, struct symbols_cache *cache, const gchar *symbol); +/** + * Process specific function for each cache element (in order they are added) + * @param cache + * @param func + * @param ud + */ +void rspamd_symbols_cache_foreach (struct symbols_cache *cache, + void (*func)(gint /* id */, const gchar * /* name */, + gint /* flags */, gpointer /* userdata */), + gpointer ud); + #endif |