From 54781dd54db908d90b7d1e4acee46c89cbd6aeb0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 28 Mar 2016 14:20:39 +0100 Subject: [Feature] Add tracking for rspamd expressions --- src/libutil/expression.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/libutil/expression.h') 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 @@ -95,6 +95,17 @@ gboolean rspamd_parse_expression (const gchar *line, gsize len, 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 -- cgit v1.2.3