aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_headers.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-10-14 17:57:08 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-10-14 17:57:08 +0100
commitd325b95656c091b75e0520d71ac865eb7bb047eb (patch)
treea2991edc39bb66f130afd7686dd3797c516f262b /src/libmime/mime_headers.h
parent88e8dc5fcb2a501728c0558501ed2345aff7a94f (diff)
downloadrspamd-d325b95656c091b75e0520d71ac865eb7bb047eb.tar.gz
rspamd-d325b95656c091b75e0520d71ac865eb7bb047eb.zip
[Minor] Add method to iterate through all headers
Diffstat (limited to 'src/libmime/mime_headers.h')
-rw-r--r--src/libmime/mime_headers.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libmime/mime_headers.h b/src/libmime/mime_headers.h
index 7174f9e8f..43dd26e87 100644
--- a/src/libmime/mime_headers.h
+++ b/src/libmime/mime_headers.h
@@ -167,6 +167,16 @@ struct rspamd_mime_headers_table* rspamd_message_headers_new (void);
*/
gsize rspamd_mime_headers_count (struct rspamd_mime_headers_table *hdrs);
+typedef bool(rspamd_hdr_traverse_func_t)(const gchar *, const struct rspamd_mime_header *, void *);
+/**
+ * Traverse all headers in a table
+ * @param func
+ * @param ud
+ * @return
+ */
+bool rspamd_mime_headers_foreach(const struct rspamd_mime_headers_table *,
+ rspamd_hdr_traverse_func_t func, void *ud);
+
/**
* Strip rfc822 CFWS sequences from a string in place
* @param input input