aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mime-maker.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-09-29 08:20:38 +0000
committerWerner Koch <[email protected]>2016-09-29 15:56:37 +0000
commit95d60c6ce9e8a7a7741553af957978c1f91547c5 (patch)
treebdcdfe5d0d41081bf53ec022f6a455b407a4c9ce /tools/mime-maker.h
parenttools: Give mime parser callbacks access to the rfc822 parser. (diff)
downloadgnupg-95d60c6ce9e8a7a7741553af957978c1f91547c5.tar.gz
gnupg-95d60c6ce9e8a7a7741553af957978c1f91547c5.zip
tools: Simplify the mime-maker container creation.
* tools/mime-maker.c (struct part_s): Remove field MEDIATYPE. (release_parts): Ditto. (dump_parts): Print a body line only if tehre is a body. (mime_maker_add_header): Check for body or container. (mime_maker_add_container): Remove arg MEDIATYPE. Change all callers. (mime_maker_end_container): New. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/mime-maker.h')
-rw-r--r--tools/mime-maker.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/mime-maker.h b/tools/mime-maker.h
index b21f7dd3d..39752db90 100644
--- a/tools/mime-maker.h
+++ b/tools/mime-maker.h
@@ -34,7 +34,8 @@ gpg_error_t mime_maker_add_header (mime_maker_t ctx,
const char *name, const char *value);
gpg_error_t mime_maker_add_body (mime_maker_t ctx, const char *string);
gpg_error_t mime_maker_add_stream (mime_maker_t ctx, estream_t *stream_addr);
-gpg_error_t mime_maker_add_container (mime_maker_t ctx, const char *mediatype);
+gpg_error_t mime_maker_add_container (mime_maker_t ctx);
+gpg_error_t mime_maker_end_container (mime_maker_t ctx);
gpg_error_t mime_maker_make (mime_maker_t ctx, estream_t fp);