1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

tools: New function mime_maker_add_body_data.

* tools/mime-maker.c (mime_maker_add_body_data): New.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2017-09-12 14:29:04 +02:00
parent a172759b50
commit 7d15ee8898
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
2 changed files with 14 additions and 1 deletions

View file

@ -478,7 +478,8 @@ add_body (mime_maker_t ctx, const void *data, size_t datalen)
/* Add STRING as body to the mail or the current MIME container. A
* second call to this function is not allowed.
* second call to this function or mime_make_add_body_data is not
* allowed.
*
* FIXME: We may want to have an append_body to add more data to a body.
*/
@ -489,6 +490,16 @@ mime_maker_add_body (mime_maker_t ctx, const char *string)
}
/* Add (DATA,DATALEN) as body to the mail or the current MIME
* container. Note that a second call to this function or to
* mime_make_add_body is not allowed. */
gpg_error_t
mime_maker_add_body_data (mime_maker_t ctx, const void *data, size_t datalen)
{
return add_body (ctx, data, datalen);
}
/* This is the same as mime_maker_add_body but takes a stream as
* argument. As of now the stream is copied to the MIME object but
* eventually we may delay that and read the stream only at the time