src/mime.h
changeset 89 aef5a4bc78f3
parent 87 060a95de62a8
child 101 d90b10cb193d
     1.1 --- a/src/mime.h	Wed Mar 04 13:32:07 2015 +0100
     1.2 +++ b/src/mime.h	Sat Mar 07 20:29:13 2015 +0100
     1.3 @@ -7,13 +7,10 @@
     1.4  #endif
     1.5  
     1.6  
     1.7 -// mime_encode_text() - encode a MIME message
     1.8 +// mime_encode_message() - encode a MIME message
     1.9  //
    1.10  //  parameters:
    1.11 -//      plaintext (in)          plaintext of message as UTF-8 string
    1.12 -//      htmltext (in)           optional HTML version of message as UTF-8
    1.13 -//                              string or NULL if it does not apply
    1.14 -//      attachments (in)        attatchments or NULL if there are none
    1.15 +//      msg (in)                message to encode
    1.16  //      mimetext (out)          the resulting encoded text or NULL on any error
    1.17  //
    1.18  //  return value:
    1.19 @@ -26,25 +23,20 @@
    1.20  //      PEP_OUT_OF_MEMORY       if not enough memory could be allocated
    1.21  //
    1.22  //  caveat:
    1.23 -//      the resulttext will go to the ownership of the caller; plaintext,
    1.24 -//      htmltext and attachments will remain in the ownership of the caller
    1.25 +//      the resulttext will go to the ownership of the caller
    1.26 +//      the message will remain in the ownership of the caller
    1.27  
    1.28 -DYNAMIC_API PEP_STATUS mime_encode_text(
    1.29 -        const char *plaintext,
    1.30 -        const char *htmltext,
    1.31 -        bloblist_t *attachments,
    1.32 +DYNAMIC_API PEP_STATUS mime_encode_message(
    1.33 +        const message * msg,
    1.34          char **mimetext
    1.35      );
    1.36  
    1.37  
    1.38 -// mime_decode_text() - decode a MIME message
    1.39 +// mime_decode_message() - decode a MIME message
    1.40  //
    1.41  //  parameters:
    1.42  //      mimetext (in)           MIME encoded text to decode
    1.43 -//      plaintext (out)         plaintext of message as UTF-8 string
    1.44 -//      htmltext (out)          optional HTML version of message as UTF-8
    1.45 -//                              string or NULL if it does not apply
    1.46 -//      attachments (out)       attatchments or NULL if there are none
    1.47 +//      msg (out)               decoded message
    1.48  //
    1.49  //  return value:
    1.50  //      PEP_STATUS_OK           if everything worked
    1.51 @@ -56,14 +48,12 @@
    1.52  //      PEP_OUT_OF_MEMORY       if not enough memory could be allocated
    1.53  //
    1.54  //  caveat:
    1.55 -//      plaintext, htmltext and attachments will go to the ownership of the
    1.56 -//      caller; mimetext will remain in the ownership of the caller
    1.57 +//      the decoded message will go to the ownership of the caller; mimetext
    1.58 +//      will remain in the ownership of the caller
    1.59  
    1.60 -DYNAMIC_API PEP_STATUS mime_decode_text(
    1.61 +DYNAMIC_API PEP_STATUS mime_decode_message(
    1.62          const char *mimetext,
    1.63 -        char **plaintext,
    1.64 -        char **htmltext,
    1.65 -        bloblist_t **attachments
    1.66 +        message **msg
    1.67      );
    1.68  
    1.69  #ifdef __cplusplus