|
|
|
@ -31,12 +31,12 @@ const unsigned MaxMultipartNestingLevel = 100;
|
|
|
|
|
// parameters:
|
|
|
|
|
// mime_text (in) : an "Internet Message"
|
|
|
|
|
// length (in) : length of the mime_text, because it might contain NUL bytes
|
|
|
|
|
// raise_attachment(out): if not nullptr, the value is set to true if the attachment needs to be raised (pEp message format 2.x)
|
|
|
|
|
// has_possible_pEp_msg(out): if not nullptr, the value is set to true if the attachment needs to be raised (pEp message format 2.x)
|
|
|
|
|
//
|
|
|
|
|
// return value:
|
|
|
|
|
// a message struct that must be freed via free_message() or NULL on error.
|
|
|
|
|
//
|
|
|
|
|
message* parse_message(const char* mime_text, size_t length, bool* raise_attachment = nullptr);
|
|
|
|
|
message* parse_message(const char* mime_text, size_t length, bool* has_possible_pEp_msg = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Generates an RFC 5322 compliant Internet Message from the given message struct.
|
|
|
|
@ -44,13 +44,13 @@ message* parse_message(const char* mime_text, size_t length, bool* raise_attachm
|
|
|
|
|
// parameters:
|
|
|
|
|
// msg (in) : the message that shall be serialized.
|
|
|
|
|
// omit_fields(in) : only encode message body and attachments
|
|
|
|
|
// transport_encode (in) : apply transport encoding (UTF-8 otherwise)
|
|
|
|
|
// has_pEp_msg_attachment(in) : set forwared="no" to 1st attachment, if mime_type=="message/rfc822"
|
|
|
|
|
//
|
|
|
|
|
// return value:
|
|
|
|
|
// a string holding an RFC-compliant "Internet Message", or NULL on error.
|
|
|
|
|
// the string must be freed via pEp_free().
|
|
|
|
|
//
|
|
|
|
|
char* generate_message(const message* msg, bool omit_fields, bool transport_encode=true);
|
|
|
|
|
char* generate_message(const message* msg, bool omit_fields, bool has_pEp_msg_attachment=false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // end of namespace pEpMIME
|
|
|
|
|