-typedef struct _MsgInfo MsgInfo;
-typedef struct _MsgFlags MsgFlags;
-
-#include "folder.h"
-
-typedef enum
-{
- MSG_NEW = 1 << 0,
- MSG_UNREAD = 1 << 1,
- MSG_MARKED = 1 << 2,
- MSG_DELETED = 1 << 3,
- MSG_REPLIED = 1 << 4,
- MSG_FORWARDED = 1 << 5,
-
- MSG_REALLY_DELETED = 1 << 6, /* mbox stuff */
-
-#define MSG_LABEL_SBIT (7) /* start bit message label */
-#define MAKE_MSG_LABEL(h, m, l) (((h) << (MSG_LABEL_SBIT+2)) | \
- ((m) << (MSG_LABEL_SBIT+1)) | \
- ((l) << (MSG_LABEL_SBIT+0)))
-
- MSG_LABEL = MAKE_MSG_LABEL(1, 1, 1),
- MSG_LABEL_NONE = MAKE_MSG_LABEL(0, 0, 0),
- MSG_LABEL_1 = MAKE_MSG_LABEL(0, 0, 1),
- MSG_LABEL_2 = MAKE_MSG_LABEL(0, 1, 0),
- MSG_LABEL_3 = MAKE_MSG_LABEL(0, 1, 1),
- MSG_LABEL_4 = MAKE_MSG_LABEL(1, 0, 0),
- MSG_LABEL_5 = MAKE_MSG_LABEL(1, 0, 1),
- MSG_LABEL_6 = MAKE_MSG_LABEL(1, 1, 0),
- MSG_LABEL_7 = MAKE_MSG_LABEL(1, 1, 1),
-
-#define MSG_LABEL_ORANGE (MSG_LABEL_1)
-#define MSG_LABEL_RED (MSG_LABEL_2)
-#define MSG_LABEL_PINK (MSG_LABEL_3)
-#define MSG_LABEL_SKYBLUE (MSG_LABEL_4)
-#define MSG_LABEL_BLUE (MSG_LABEL_5)
-#define MSG_LABEL_GREEN (MSG_LABEL_6)
-#define MSG_LABEL_BROWN (MSG_LABEL_7)
-
- /*MSG_IGNORE_THREAD = 1 << 10,*/ /* ignore threads */
-
- /* RESERVED */
- MSG_RESERVED_CLAWS = 1 << 30, /* for sylpheed-claws */
- MSG_RESERVED_MAIN = 1 << 31 /* for sylpheed-main */
-} MsgPermFlags;
-
-typedef enum
-{
- MSG_MOVE = 1 << 0,
- MSG_COPY = 1 << 1,
-
- MSG_QUEUED = 1 << 16,
- MSG_DRAFT = 1 << 17,
- MSG_ENCRYPTED = 1 << 18,
- MSG_IMAP = 1 << 19,
- MSG_NEWS = 1 << 20,
-
- MSG_FILTERING = 1 << 25, /* claws: re/set by filtering */
-
- MSG_MIME = 1 << 29,
- MSG_CACHED = 1 << 31
-} MsgTmpFlags;
-
-#define MSG_CACHED_FLAG_MASK (MSG_MIME)
+typedef struct _MsgInfo MsgInfo;
+typedef struct _MsgFlags MsgFlags;
+typedef struct _MsgInfoUpdate MsgInfoUpdate;
+typedef struct _MailFilteringData MailFilteringData;
+
+typedef GSList MsgInfoList;
+typedef GSList MsgNumberList;
+
+#define MSG_NEW (1U << 0)
+#define MSG_UNREAD (1U << 1)
+#define MSG_MARKED (1U << 2)
+#define MSG_DELETED (1U << 3)
+#define MSG_REPLIED (1U << 4)
+#define MSG_FORWARDED (1U << 5)
+#define MSG_REALLY_DELETED (1U << 6) /* mbox stuff */
+
+#define MSG_CLABEL_SBIT (7) /* start bit of color label */
+#define MAKE_MSG_CLABEL(h, m, l) (((h) << (MSG_CLABEL_SBIT + 2)) | \
+ ((m) << (MSG_CLABEL_SBIT + 1)) | \
+ ((l) << (MSG_CLABEL_SBIT + 0)))
+
+#define MSG_CLABEL_NONE MAKE_MSG_CLABEL(0U, 0U, 0U)
+#define MSG_CLABEL_1 MAKE_MSG_CLABEL(0U, 0U, 1U)
+#define MSG_CLABEL_2 MAKE_MSG_CLABEL(0U, 1U, 0U)
+#define MSG_CLABEL_3 MAKE_MSG_CLABEL(0U, 1U, 1U)
+#define MSG_CLABEL_4 MAKE_MSG_CLABEL(1U, 0U, 0U)
+#define MSG_CLABEL_5 MAKE_MSG_CLABEL(1U, 0U, 1U)
+#define MSG_CLABEL_6 MAKE_MSG_CLABEL(1U, 1U, 0U)
+#define MSG_CLABEL_7 MAKE_MSG_CLABEL(1U, 1U, 1U)
+
+#define MSG_CLABEL_ORANGE MSG_CLABEL_1
+#define MSG_CLABEL_RED MSG_CLABEL_2
+#define MSG_CLABEL_PINK MSG_CLABEL_3
+#define MSG_CLABEL_SKYBLUE MSG_CLABEL_4
+#define MSG_CLABEL_BLUE MSG_CLABEL_5
+#define MSG_CLABEL_GREEN MSG_CLABEL_6
+#define MSG_CLABEL_BROWN MSG_CLABEL_7
+
+#define MSG_IGNORE_THREAD (1U << 10) /* ignore threads */
+#define MSG_LOCKED (1U << 11) /* msg is locked */
+#define MSG_RETRCPT_PENDING (1U << 12) /* return receipt pending */
+/* RESERVED */
+#define MSG_RESERVED_CLAWS (1U << 30) /* for sylpheed-claws */
+#define MSG_RESERVED (1U << 31)
+
+typedef guint32 MsgPermFlags;
+
+#define MSG_CLABEL_FLAG_MASK (MSG_CLABEL_7)
+
+#define MSG_MOVE (1U << 0)
+#define MSG_COPY (1U << 1)
+#define MSG_QUEUED (1U << 16)
+#define MSG_DRAFT (1U << 17)
+#define MSG_ENCRYPTED (1U << 18)
+#define MSG_IMAP (1U << 19)
+#define MSG_NEWS (1U << 20)
+#define MSG_SIGNED (1U << 21)
+#define MSG_MIME (1U << 29)
+#define MSG_CACHED (1U << 31)
+
+typedef guint32 MsgTmpFlags;
+
+#define MSG_CACHED_FLAG_MASK (MSG_MIME | MSG_ENCRYPTED | MSG_SIGNED)