]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap: Make imap_bodystructure_parse_args() public
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 24 Apr 2017 11:04:01 +0000 (14:04 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 24 Apr 2017 13:06:00 +0000 (16:06 +0300)
src/lib-imap/imap-bodystructure.c
src/lib-imap/imap-bodystructure.h

index 3f6a235f2e2e20d141ec455063dcefba1ad0a450..9a707c0565b8803cb76448fe6ac0486cc0000185 100644 (file)
@@ -351,7 +351,7 @@ imap_bodystructure_parse_args_common(struct message_part *part,
        return 0;
 }
 
-static int
+int
 imap_bodystructure_parse_args(const struct imap_arg *args, pool_t pool,
                              struct message_part **_part,
                              const char **error_r)
index f622561f7b0bfc6ab24e62e1bf7f7a4f7123f5f8..7b1390b40ac025a1845524b2fa1ec98f7177f6de 100644 (file)
@@ -3,6 +3,7 @@
 
 struct message_part;
 struct message_header_line;
+struct imap_arg;
 
 /* Write a BODY/BODYSTRUCTURE from given message_part. The message_part->data
    field must be set. part->body_size.virtual_size and .lines are also used
@@ -17,6 +18,11 @@ void imap_bodystructure_write(const struct message_part *part,
 int imap_bodystructure_parse_full(const char *bodystructure, pool_t pool,
                             struct message_part **parts, const char **error_r);
 
+/* Same as imap_bodystructure_parse_full(), but read the input from imap_args
+   instead of a string. */
+int imap_bodystructure_parse_args(const struct imap_arg *args, pool_t pool,
+                            struct message_part **parts, const char **error_r);
+
 /* Parse BODYSTRUCTURE and save the contents to message_part->data for each
    message tree node. The parts argument must point to an existing message_part
    tree. Returns 0 if ok, -1 if bodystructure wasn't valid. */