1.1 --- a/src/mime.h Tue Mar 03 17:10:28 2015 +0100
1.2 +++ b/src/mime.h Wed Mar 04 10:39:29 2015 +0100
1.3 @@ -14,7 +14,7 @@
1.4 // htmltext (in) optional HTML version of message as UTF-8
1.5 // string or NULL if it does not apply
1.6 // attachments (in) attatchments or NULL if there are none
1.7 -// resulttext (out) the resulting encoded text or NULL on any error
1.8 +// mimetext (out) the resulting encoded text or NULL on any error
1.9 //
1.10 // return value:
1.11 // PEP_STATUS_OK if everything worked
1.12 @@ -33,7 +33,37 @@
1.13 const char *plaintext,
1.14 const char *htmltext,
1.15 bloblist_t *attachments,
1.16 - char **resulttext
1.17 + char **mimetext
1.18 + );
1.19 +
1.20 +
1.21 +// mime_decode_text() - decode a MIME message
1.22 +//
1.23 +// parameters:
1.24 +// mimetext (in) MIME encoded text to decode
1.25 +// plaintext (out) plaintext of message as UTF-8 string
1.26 +// htmltext (out) optional HTML version of message as UTF-8
1.27 +// string or NULL if it does not apply
1.28 +// attachments (out) attatchments or NULL if there are none
1.29 +//
1.30 +// return value:
1.31 +// PEP_STATUS_OK if everything worked
1.32 +// PEP_BUFFER_TOO_SMALL if encoded message size is too big to handle
1.33 +// PEP_CANNOT_CREATE_TEMP_FILE
1.34 +// if there are issues with temp files; in
1.35 +// this case errno will contain the underlying
1.36 +// error
1.37 +// PEP_OUT_OF_MEMORY if not enough memory could be allocated
1.38 +//
1.39 +// caveat:
1.40 +// plaintext, htmltext and attachments will go to the ownership of the
1.41 +// caller; mimetext will remain in the ownership of the caller
1.42 +
1.43 +DYNAMIC_API PEP_STATUS mime_decode_text(
1.44 + const char *mimetext,
1.45 + char **plaintext,
1.46 + char **htmltext,
1.47 + bloblist_t **attachments
1.48 );
1.49
1.50 #ifdef __cplusplus