dovecot-2.2: lib-mail: Moved struct message_part to a separate m...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 17 14:13:34 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/63f12bb366b0
changeset: 17237:63f12bb366b0
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 17 16:04:13 2014 +0200
description:
lib-mail: Moved struct message_part to a separate message-part.h

diffstat:

 src/lib-mail/Makefile.am      |   1 +
 src/lib-mail/message-parser.h |  34 +---------------------------------
 src/lib-mail/message-part.h   |  38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 33 deletions(-)

diffs (104 lines):

diff -r 917946c08f83 -r 63f12bb366b0 src/lib-mail/Makefile.am
--- a/src/lib-mail/Makefile.am	Thu Apr 17 14:24:18 2014 +0200
+++ b/src/lib-mail/Makefile.am	Thu Apr 17 16:04:13 2014 +0200
@@ -51,6 +51,7 @@
 	message-header-parser.h \
 	message-id.h \
 	message-parser.h \
+	message-part.h \
 	message-part-serialize.h \
 	message-search.h \
 	message-size.h \
diff -r 917946c08f83 -r 63f12bb366b0 src/lib-mail/message-parser.h
--- a/src/lib-mail/message-parser.h	Thu Apr 17 14:24:18 2014 +0200
+++ b/src/lib-mail/message-parser.h	Thu Apr 17 16:04:13 2014 +0200
@@ -2,7 +2,7 @@
 #define MESSAGE_PARSER_H
 
 #include "message-header-parser.h"
-#include "message-size.h"
+#include "message-part.h"
 
 enum message_parser_flags {
 	/* Don't return message bodies in message_blocks. */
@@ -17,38 +17,6 @@
 	MESSAGE_PARSER_FLAG_INCLUDE_BOUNDARIES		= 0x08
 };
 
-/* Note that these flags are used directly by message-parser-serialize, so
-   existing flags can't be changed without breaking backwards compatibility */
-enum message_part_flags {
-	MESSAGE_PART_FLAG_MULTIPART		= 0x01,
-	MESSAGE_PART_FLAG_MULTIPART_DIGEST	= 0x02,
-	MESSAGE_PART_FLAG_MESSAGE_RFC822	= 0x04,
-
-	/* content-type: text/... */
-	MESSAGE_PART_FLAG_TEXT			= 0x08,
-
-	MESSAGE_PART_FLAG_UNUSED		= 0x10,
-
-	/* message part header or body contains NULs */
-	MESSAGE_PART_FLAG_HAS_NULS		= 0x20,
-
-	/* Mime-Version header exists. */
-	MESSAGE_PART_FLAG_IS_MIME		= 0x40
-};
-
-struct message_part {
-	struct message_part *parent;
-	struct message_part *next;
-	struct message_part *children;
-
-	uoff_t physical_pos; /* absolute position from beginning of message */
-	struct message_size header_size;
-	struct message_size body_size;
-
-	enum message_part_flags flags;
-	void *context;
-};
-
 struct message_parser_ctx;
 
 struct message_block {
diff -r 917946c08f83 -r 63f12bb366b0 src/lib-mail/message-part.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lib-mail/message-part.h	Thu Apr 17 16:04:13 2014 +0200
@@ -0,0 +1,38 @@
+#ifndef MESSAGE_PART_H
+#define MESSAGE_PART_H
+
+#include "message-size.h"
+
+/* Note that these flags are used directly by message-parser-serialize, so
+   existing flags can't be changed without breaking backwards compatibility */
+enum message_part_flags {
+	MESSAGE_PART_FLAG_MULTIPART		= 0x01,
+	MESSAGE_PART_FLAG_MULTIPART_DIGEST	= 0x02,
+	MESSAGE_PART_FLAG_MESSAGE_RFC822	= 0x04,
+
+	/* content-type: text/... */
+	MESSAGE_PART_FLAG_TEXT			= 0x08,
+
+	MESSAGE_PART_FLAG_UNUSED		= 0x10,
+
+	/* message part header or body contains NULs */
+	MESSAGE_PART_FLAG_HAS_NULS		= 0x20,
+
+	/* Mime-Version header exists. */
+	MESSAGE_PART_FLAG_IS_MIME		= 0x40
+};
+
+struct message_part {
+	struct message_part *parent;
+	struct message_part *next;
+	struct message_part *children;
+
+	uoff_t physical_pos; /* absolute position from beginning of message */
+	struct message_size header_size;
+	struct message_size body_size;
+
+	enum message_part_flags flags;
+	void *context;
+};
+
+#endif


More information about the dovecot-cvs mailing list