aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/message.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmime/message.h')
-rw-r--r--src/libmime/message.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libmime/message.h b/src/libmime/message.h
index ef881ebd1..0f3a0ccb4 100644
--- a/src/libmime/message.h
+++ b/src/libmime/message.h
@@ -21,12 +21,18 @@ struct mime_part {
const gchar *filename;
};
+#define RSPAMD_MIME_PART_FLAG_UTF (1 << 0)
+#define RSPAMD_MIME_PART_FLAG_BALANCED (1 << 1)
+#define RSPAMD_MIME_PART_FLAG_EMPTY (1 << 2)
+#define RSPAMD_MIME_PART_FLAG_HTML (1 << 3)
+
+#define IS_PART_EMPTY(part) ((part)->flags & RSPAMD_MIME_PART_FLAG_EMPTY)
+#define IS_PART_UTF(part) ((part)->flags & RSPAMD_MIME_PART_FLAG_UTF)
+#define IS_PART_RAW(part) (!((part)->flags & RSPAMD_MIME_PART_FLAG_UTF))
+#define IS_PART_HTML(part) ((part)->flags & RSPAMD_MIME_PART_FLAG_HTML)
+
struct mime_text_part {
- gboolean is_html;
- gboolean is_raw;
- gboolean is_balanced;
- gboolean is_empty;
- gboolean is_utf;
+ guint flags;
GUnicodeScript script;
const gchar *lang_code;
const gchar *language;