diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-05 17:24:40 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-05 17:24:40 +0000 |
commit | aef5bd31e18f108c51e4e3fc78b889a2e7c51b33 (patch) | |
tree | 458173c5ea181a28be89cdb33ab890f2e76d9bd8 /src/libstat/backends/backends.h | |
parent | a142fd150c47668215f8cf9f75374b8e8434b7d9 (diff) | |
download | rspamd-aef5bd31e18f108c51e4e3fc78b889a2e7c51b33.tar.gz rspamd-aef5bd31e18f108c51e4e3fc78b889a2e7c51b33.zip |
Simplify learn and process functions
Diffstat (limited to 'src/libstat/backends/backends.h')
-rw-r--r-- | src/libstat/backends/backends.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libstat/backends/backends.h b/src/libstat/backends/backends.h index 42eba8d61..800030414 100644 --- a/src/libstat/backends/backends.h +++ b/src/libstat/backends/backends.h @@ -46,12 +46,14 @@ struct rspamd_stat_backend { struct rspamd_statfile *st); gpointer (*runtime)(struct rspamd_task *task, struct rspamd_statfile_config *stcf, gboolean learn, gpointer ctx); - gboolean (*process_token)(struct rspamd_task *task, struct token_node_s *tok, - struct rspamd_token_result *res, gpointer ctx); + gboolean (*process_tokens)(struct rspamd_task *task, GPtrArray *tokens, + gint id, + gpointer ctx); void (*finalize_process)(struct rspamd_task *task, gpointer runtime, gpointer ctx); - gboolean (*learn_token)(struct rspamd_task *task, struct token_node_s *tok, - struct rspamd_token_result *res, gpointer ctx); + gboolean (*learn_tokens)(struct rspamd_task *task, GPtrArray *tokens, + gint id, + gpointer ctx); gulong (*total_learns)(struct rspamd_task *task, gpointer runtime, gpointer ctx); void (*finalize_learn)(struct rspamd_task *task, @@ -73,16 +75,14 @@ struct rspamd_stat_backend { gpointer rspamd_##name##_runtime (struct rspamd_task *task, \ struct rspamd_statfile_config *stcf, \ gboolean learn, gpointer ctx); \ - gboolean rspamd_##name##_process_token (struct rspamd_task *task, \ - struct token_node_s *tok, \ - struct rspamd_token_result *res, \ + gboolean rspamd_##name##_process_tokens (struct rspamd_task *task, \ + GPtrArray *tokens, gint id, \ gpointer ctx); \ void rspamd_##name##_finalize_process (struct rspamd_task *task, \ gpointer runtime, \ gpointer ctx); \ - gboolean rspamd_##name##_learn_token (struct rspamd_task *task, \ - struct token_node_s *tok, \ - struct rspamd_token_result *res, \ + gboolean rspamd_##name##_learn_tokens (struct rspamd_task *task, \ + GPtrArray *tokens, gint id, \ gpointer ctx); \ void rspamd_##name##_finalize_learn (struct rspamd_task *task, \ gpointer runtime, \ |