diff options
author | Werner Koch <[email protected]> | 2016-09-29 08:20:38 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-09-29 15:56:37 +0000 |
commit | 95d60c6ce9e8a7a7741553af957978c1f91547c5 (patch) | |
tree | bdcdfe5d0d41081bf53ec022f6a455b407a4c9ce /tools/mime-maker.h | |
parent | tools: Give mime parser callbacks access to the rfc822 parser. (diff) | |
download | gnupg-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.h | 3 |
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); |