From fbddd1b83f1e21068e1b287af1861fb40649eab8 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 13 Dec 2016 16:19:02 +0000 Subject: [Feature] Start import of the optimized base64 decode --- src/libmime/message.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/libmime/message.h') diff --git a/src/libmime/message.h b/src/libmime/message.h index ff7ebafc9..3dd32c4db 100644 --- a/src/libmime/message.h +++ b/src/libmime/message.h @@ -11,6 +11,7 @@ #include "addr.h" #include "cryptobox.h" #include "mime_headers.h" +#include "content_type.h" #include struct rspamd_task; @@ -24,13 +25,26 @@ enum rspamd_mime_part_flags { RSPAMD_MIME_PART_ARCHIVE = (1 << 3) }; +enum rspamd_cte { + RSPAMD_CTE_UNKNOWN = 0, + RSPAMD_CTE_7BIT = 1, + RSPAMD_CTE_8BIT = 2, + RSPAMD_CTE_QP = 3, + RSPAMD_CTE_B64 = 4, +}; + struct rspamd_mime_part { GMimeContentType *type; + struct rspamd_content_type *ct; + rspamd_ftok_t raw_data; + rspamd_ftok_t parsed_data; + enum rspamd_cte cte; GByteArray *content; GMimeObject *parent; GMimeObject *mime; GHashTable *raw_headers; gchar *raw_headers_str; + gsize raw_headers_len; guchar digest[rspamd_cryptobox_HASHBYTES]; const gchar *filename; const gchar *boundary; -- cgit v1.2.3