1 // This file is under GNU General Public License 3.0
12 // is_PGP_message_text() - determine if text encodes a PGP message
15 // text (in) text to examine
18 // true if text is a PGP message, false otherwise
20 DYNAMIC_API bool is_PGP_message_text(const char *text);
23 // mime_encode_message() - encode a MIME message
26 // msg (in) message to encode
27 // omit_fields (in) only encode message body and attachments
28 // mimetext (out) the resulting encoded text or NULL on any error
31 // PEP_STATUS_OK if everything worked
32 // PEP_BUFFER_TOO_SMALL if encoded message size is too big to handle
33 // PEP_CANNOT_CREATE_TEMP_FILE
34 // if there are issues with temp files; in
35 // this case errno will contain the underlying
37 // PEP_OUT_OF_MEMORY if not enough memory could be allocated
40 // the resulttext will go to the ownership of the caller
41 // the message will remain in the ownership of the caller
42 // omit_fields is true for payload of PGP/MIME messages
44 // also: note that the encryption type will be used to determine what
45 // gets encoded from the message struct, so if using this on an
46 // already-encrypted message, set the enc_format of the msg to PEP_enc_none.
48 DYNAMIC_API PEP_STATUS mime_encode_message(
55 // mime_decode_message() - decode a MIME message
58 // mimetext (in) MIME encoded text to decode
59 // size (in) size of text to decode
60 // msg (out) decoded message
63 // PEP_STATUS_OK if everything worked
64 // PEP_BUFFER_TOO_SMALL if encoded message size is too big to handle
65 // PEP_CANNOT_CREATE_TEMP_FILE
66 // if there are issues with temp files; in
67 // this case errno will contain the underlying
69 // PEP_OUT_OF_MEMORY if not enough memory could be allocated
72 // the decoded message will go to the ownership of the caller; mimetext
73 // will remain in the ownership of the caller
75 DYNAMIC_API PEP_STATUS mime_decode_message(
81 /* sometimes we don't want to transport encode */
82 PEP_STATUS _mime_encode_message_internal(