changeset 21621:4e137a17cfd7

lib-imap: imap-bodystructure: Renamed struct message_part_body_data to message_part_data.
author Stephan Bosch <stephan.bosch@dovecot.fi>
date Sun, 23 Oct 2016 13:10:11 +0200
parents 6846d715fd87
children b6b198961bc6
files src/lib-imap/imap-bodystructure.c src/lib-imap/imap-bodystructure.h src/lib-storage/index/index-mail.c
diffstat 3 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-imap/imap-bodystructure.c	Sun Oct 23 12:10:44 2016 +0200
+++ b/src/lib-imap/imap-bodystructure.c	Sun Oct 23 13:10:11 2016 +0200
@@ -28,7 +28,7 @@
 	return p_strdup(pool, str_c(str));
 }
 
-static void parse_content_type(struct message_part_body_data *data,
+static void parse_content_type(struct message_part_data *data,
 			       struct message_header_line *hdr)
 {
 	struct rfc822_parser_context parser;
@@ -91,7 +91,7 @@
 	}
 }
 
-static void parse_content_transfer_encoding(struct message_part_body_data *data,
+static void parse_content_transfer_encoding(struct message_part_data *data,
 					    struct message_header_line *hdr)
 {
 	struct rfc822_parser_context parser;
@@ -108,7 +108,7 @@
 	}
 }
 
-static void parse_content_disposition(struct message_part_body_data *data,
+static void parse_content_disposition(struct message_part_data *data,
 				      struct message_header_line *hdr)
 {
 	struct rfc822_parser_context parser;
@@ -139,7 +139,7 @@
 }
 
 static void parse_content_language(const unsigned char *value, size_t value_len,
-				   struct message_part_body_data *data)
+				   struct message_part_data *data)
 {
 	struct rfc822_parser_context parser;
 	string_t *str;
@@ -170,7 +170,7 @@
 	}
 }
 
-static void parse_content_header(struct message_part_body_data *d,
+static void parse_content_header(struct message_part_data *d,
 				 struct message_header_line *hdr,
 				 pool_t pool)
 {
@@ -233,7 +233,7 @@
 void imap_bodystructure_parse_header(pool_t pool, struct message_part *part,
 				     struct message_header_line *hdr)
 {
-	struct message_part_body_data *part_data;
+	struct message_part_data *part_data;
 	struct message_part_envelope_data *envelope;
 	bool parent_rfc822;
 
@@ -242,7 +242,7 @@
 			/* no Content-* headers. add an empty context
 			   structure anyway. */
 			part->context = part_data =
-				p_new(pool, struct message_part_body_data, 1);
+				p_new(pool, struct message_part_data, 1);
 			part_data->pool = pool;
 		} else if ((part->flags & MESSAGE_PART_FLAG_IS_MIME) == 0) {
 			/* If there was no Mime-Version, forget all
@@ -268,7 +268,7 @@
 	if (part->context == NULL) {
 		/* initialize message part data */
 		part->context = part_data =
-			p_new(pool, struct message_part_body_data, 1);
+			p_new(pool, struct message_part_data, 1);
 		part_data->pool = pool;
 	}
 	part_data = part->context;
@@ -297,7 +297,7 @@
 }
 
 static void
-part_write_bodystructure_data_common(struct message_part_body_data *data,
+part_write_bodystructure_data_common(struct message_part_data *data,
 				     string_t *str)
 {
 	str_append_c(str, ' ');
@@ -334,7 +334,7 @@
 static void part_write_body_multipart(const struct message_part *part,
 				      string_t *str, bool extended)
 {
-	struct message_part_body_data *data = part->context;
+	struct message_part_data *data = part->context;
 
 	if (part->children != NULL)
 		imap_bodystructure_write_siblings(part->children, str, extended);
@@ -370,7 +370,7 @@
 static void part_write_body(const struct message_part *part,
 			    string_t *str, bool extended)
 {
-	struct message_part_body_data *data = part->context;
+	struct message_part_data *data = part->context;
 	bool text;
 
 	if (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) {
@@ -418,7 +418,7 @@
 		str_printfa(str, " %u", part->body_size.lines);
 	} else if (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) {
 		/* message/rfc822 contains envelope + body + line count */
-		struct message_part_body_data *child_data;
+		struct message_part_data *child_data;
 
 		i_assert(part->children != NULL);
 		i_assert(part->children->next == NULL);
@@ -450,7 +450,7 @@
 
 bool imap_bodystructure_is_plain_7bit(const struct message_part *part)
 {
-	const struct message_part_body_data *data = part->context;
+	const struct message_part_data *data = part->context;
 
 	i_assert(part->parent == NULL);
 
@@ -645,7 +645,7 @@
 }
 
 static int
-imap_bodystructure_parse_args_common(struct message_part_body_data *data,
+imap_bodystructure_parse_args_common(struct message_part_data *data,
 				     pool_t pool, string_t *tmpstr,
 				     const struct imap_arg *args,
 				     const char **error_r)
@@ -693,7 +693,7 @@
 			      struct message_part *part, string_t *tmpstr,
 			      const char **error_r)
 {
-	struct message_part_body_data *data;
+	struct message_part_data *data;
 	struct message_part *child_part;
 	const struct imap_arg *list_args;
 	const char *value, *content_type, *subtype;
@@ -702,7 +702,7 @@
 
 	i_assert(part->context == NULL);
 
-	part->context = data = p_new(pool, struct message_part_body_data, 1);
+	part->context = data = p_new(pool, struct message_part_data, 1);
 	data->pool = pool;
 
 	multipart = FALSE;
@@ -820,7 +820,7 @@
 		i_assert(part->children == NULL);
 	} else if (message_rfc822) {
 		/* message/rfc822 - envelope + bodystructure + text lines */
-		struct message_part_body_data *child_data;
+		struct message_part_data *child_data;
 
 		i_assert(part->children != NULL &&
 			 part->children->next == NULL);
--- a/src/lib-imap/imap-bodystructure.h	Sun Oct 23 12:10:44 2016 +0200
+++ b/src/lib-imap/imap-bodystructure.h	Sun Oct 23 13:10:11 2016 +0200
@@ -1,7 +1,7 @@
 #ifndef IMAP_BODYSTRUCTURE_H
 #define IMAP_BODYSTRUCTURE_H
 
-struct message_part_body_data {
+struct message_part_data {
 	pool_t pool;
 	/* NOTE: all the strings are stored via imap_quote(), so they contain
 	   "quoted-text" or {123}\r\nliterals */
@@ -34,7 +34,7 @@
 	ATTR_PURE;
 
 /* Write a BODY/BODYSTRUCTURE from given message_part. The
-   message_part->contexts must contain struct message_part_body_data.
+   message_part->contexts must contain struct message_part_data.
    part->body_size.virtual_size and .lines are also used for writing it. */
 void imap_bodystructure_write(const struct message_part *part,
 			      string_t *dest, bool extended);
--- a/src/lib-storage/index/index-mail.c	Sun Oct 23 12:10:44 2016 +0200
+++ b/src/lib-storage/index/index-mail.c	Sun Oct 23 13:10:11 2016 +0200
@@ -944,7 +944,7 @@
 static struct message_part *
 index_mail_find_first_text_mime_part(struct message_part *parts)
 {
-	struct message_part_body_data *body_data = parts->context;
+	struct message_part_data *body_data = parts->context;
 	struct message_part *part;
 
 	i_assert(body_data != NULL);
@@ -965,7 +965,7 @@
 		struct message_part *html_part = NULL, *text_part = NULL;
 
 		for (part = parts->children; part != NULL; part = part->next) {
-			struct message_part_body_data *sub_body_data =
+			struct message_part_data *sub_body_data =
 				part->context;
 
 			i_assert(sub_body_data != NULL);