src/mime.h
author vb
Mon, 09 Feb 2015 09:49:26 -0500
changeset 59 88429085f8da
parent 54 8f6b3a6b77a8
child 87 060a95de62a8
permissions -rw-r--r--
...
     1 #pragma once
     2 
     3 #include "transport.h"
     4 
     5 #ifdef __cplusplus
     6 extern "C" {
     7 #endif
     8 
     9 
    10 // mime_encode_text() - encode a MIME message
    11 //
    12 //  parameters:
    13 //      plaintext (in)          plaintext of message as UTF-8 string
    14 //      htmltext (in)           optional HTML version of message as UTF-8
    15 //                              string or NULL if it does not apply
    16 //      attachments (in)        attatchments or NULL if there are none
    17 //      resulttext (out)        the resulting encoded text or NULL on any error
    18 //
    19 //  return value:
    20 //      PEP_STATUS_OK           if everything worked
    21 //      PEP_BUFFER_TOO_SMALL    if encoded message size is too big to handle
    22 //      PEP_CANNOT_CREATE_TEMP_FILE
    23 //                              if there are issues with temp files; in
    24 //                              this case errno will contain the underlying
    25 //                              error
    26 //      PEP_OUT_OF_MEMORY       if not enough memory could be allocated
    27 //
    28 //  caveat:
    29 //      the resulttext will go to the ownership of the caller; plaintext,
    30 //      htmltext and attachments will remain in the ownership of the caller
    31 
    32 DYNAMIC_API PEP_STATUS mime_encode_text(
    33         const char *plaintext,
    34         const char *htmltext,
    35         bloblist_t *attachments,
    36         char **resulttext
    37     );
    38 
    39 #ifdef __cplusplus
    40 }
    41 #endif
    42