diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-28 14:20:39 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-28 14:20:39 +0100 |
commit | 54781dd54db908d90b7d1e4acee46c89cbd6aeb0 (patch) | |
tree | 2a8e1527dc45be61fafa5dce9348e7b4c744b3c2 /src/libutil/expression.h | |
parent | 007242e0c37731ea0b4015bfb66dd9a71ba81bbb (diff) | |
download | rspamd-54781dd54db908d90b7d1e4acee46c89cbd6aeb0.tar.gz rspamd-54781dd54db908d90b7d1e4acee46c89cbd6aeb0.zip |
[Feature] Add tracking for rspamd expressions
Diffstat (limited to 'src/libutil/expression.h')
-rw-r--r-- | src/libutil/expression.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libutil/expression.h b/src/libutil/expression.h index 82c0c60c1..2c0ec7497 100644 --- a/src/libutil/expression.h +++ b/src/libutil/expression.h @@ -96,6 +96,17 @@ gint rspamd_process_expression (struct rspamd_expression *expr, gint flags, gpointer data); /** + * Process the expression and return its value using atom 'process' functions with the specified data pointer. + * This function also accepts `track` argument where it writes matched atoms (those whose value is more than 0) + * @param expr expression to process + * @param data opaque data pointer for all the atoms + * @param track pointer array to atoms tracking + * @return the value of expression + */ +gint rspamd_process_expression_track (struct rspamd_expression *expr, gint flags, + gpointer data, GPtrArray *track); + +/** * Shows string representation of an expression * @param expr expression to show * @return freshly allocated string with expression |