diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-13 15:44:25 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-13 15:44:25 +0100 |
commit | d14307b475a7f08b1035df32c8b7da7d0898ff55 (patch) | |
tree | c436fd6878b3bab65ff6e99b0ce73b47ee2ea3cf /src/libserver/rspamd_symcache.h | |
parent | 5b66054e6fd0a822dd8571669140da590db5593d (diff) | |
download | rspamd-d14307b475a7f08b1035df32c8b7da7d0898ff55.tar.gz rspamd-d14307b475a7f08b1035df32c8b7da7d0898ff55.zip |
[Project] Add methods to manipulate with allowed ids
Diffstat (limited to 'src/libserver/rspamd_symcache.h')
-rw-r--r-- | src/libserver/rspamd_symcache.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/libserver/rspamd_symcache.h b/src/libserver/rspamd_symcache.h index 728b7636c..3be2ab2ec 100644 --- a/src/libserver/rspamd_symcache.h +++ b/src/libserver/rspamd_symcache.h @@ -423,4 +423,49 @@ void rspamd_symcache_composites_foreach (struct rspamd_task *task, struct rspamd_symcache *cache, GHFunc func, gpointer fd); + +/** + * Sets allowed settings ids for a symbol + * @param cache + * @param symbol + * @param ids + * @param nids + */ +bool rspamd_symcache_set_allowed_settings_ids (struct rspamd_symcache *cache, + const gchar *symbol, + const guint32 *ids, + guint nids); +/** + * Sets denied settings ids for a symbol + * @param cache + * @param symbol + * @param ids + * @param nids + */ +bool rspamd_symcache_set_forbidden_settings_ids (struct rspamd_symcache *cache, + const gchar *symbol, + const guint32 *ids, + guint nids); + +/** + * Returns allowed ids for a symbol as a constant array + * @param cache + * @param symbol + * @param nids + * @return + */ +const guint32* rspamd_symcache_get_allowed_settings_ids (struct rspamd_symcache *cache, + const gchar *symbol, + guint *nids); +/** + * Returns denied ids for a symbol as a constant array + * @param cache + * @param symbol + * @param nids + * @return + */ +const guint32* rspamd_symcache_get_forbidden_settings_ids (struct rspamd_symcache *cache, + const gchar *symbol, + guint *nids); + #endif |