4 #include "gmime-extra.h"
10 /* This is a collection of message structure and message format repair
11 * techniques that are designed to improve the user experience of
14 /* If payload is a cryptographic payload within an encrypted message, and
15 * it has a "legacy display" part, then we can skip over it and jump
16 * to the actual content, because notmuch already handles protected
17 * headers appropriately.
19 * This function either returns payload directly (if it does not have
20 * a "legacy display" part), or it returns a pointer to its
21 * content-bearing subpart, with the "legacy display" part and the
22 * surrounding multipart/mixed object bypassed.
24 * No new objects are created by calling this function, and the
25 * returned object will only be released when the original part is
30 _notmuch_repair_crypto_payload_skip_legacy_display (GMimeObject *payload);
32 /* Detecting and repairing "Mixed-Up MIME mangling". see
33 * https://tools.ietf.org/html/draft-dkg-openpgp-pgpmime-message-mangling-00#section-4.1
34 * If this returns NULL, the message was probably not "Mixed up". If
35 * it returns non-NULL, then there is a newly-allocated MIME part that
36 * represents the repaired version. The caller is responsible for
37 * ensuring that any returned object is freed with g_object_unref. */
39 _notmuch_repair_mixed_up_mangled (GMimeObject *part);