diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-10-14 17:57:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-10-14 17:57:08 +0100 |
commit | d325b95656c091b75e0520d71ac865eb7bb047eb (patch) | |
tree | a2991edc39bb66f130afd7686dd3797c516f262b /src/libmime/mime_headers.h | |
parent | 88e8dc5fcb2a501728c0558501ed2345aff7a94f (diff) | |
download | rspamd-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.h | 10 |
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 |