} T_END;
}
+bool event_filter_remove_queries_with_context(struct event_filter *filter,
+ void *context)
+{
+ const struct event_filter_query_internal *int_query;
+ unsigned int idx;
+
+ array_foreach(&filter->queries, int_query) {
+ if (int_query->context == context) {
+ idx = array_foreach_idx(&filter->queries, int_query);
+ array_delete(&filter->queries, idx, 1);
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
void event_filter_merge(struct event_filter *dest,
const struct event_filter *src)
{
const struct event_filter *src,
void *new_context);
+/* Remove query with given context from filter.
+ Returns TRUE if query was removed, otherwise FALSE. */
+bool event_filter_remove_queries_with_context(struct event_filter *filter,
+ void *context);
+
/* Export the filter into a string. The context pointers aren't exported. */
void event_filter_export(struct event_filter *filter, string_t *dest);
/* Add queries to the filter from the given string. The string is expected to