mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
ff3d873f0b
This is a utility function designed to make it easier to "fast-forward" past a legacy-display part associated with a cryptographic envelope, and show the user the intended message body. The bulk of the ugliness in here is in the test function _notmuch_crypto_payload_has_legacy_display, which tests all of the things we'd expect to be true in a a cryptographic payload that contains a legacy display part. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
34 lines
1,019 B
C
34 lines
1,019 B
C
#ifndef _REPAIR_H
|
|
#define _REPAIR_H
|
|
|
|
#include "gmime-extra.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* This is a collection of message structure and message format repair
|
|
* techniques that are designed to improve the user experience of
|
|
* notmuch */
|
|
|
|
/* If payload is a cryptographic payload within an encrypted message, and
|
|
* it has a "legacy display" part, then we can skip over it and jump
|
|
* to the actual content, because notmuch already handles protected
|
|
* headers appropriately.
|
|
*
|
|
* This function either returns payload directly (if it does not have
|
|
* a "legacy display" part), or it returns a pointer to its
|
|
* content-bearing subpart, with the "legacy display" part and the
|
|
* surrounding multipart/mixed object bypassed.
|
|
*
|
|
* No new objects are created by calling this function, and the
|
|
* returned object will only be released when the original part is
|
|
* disposed of.
|
|
*/
|
|
GMimeObject *
|
|
_notmuch_repair_crypto_payload_skip_legacy_display (GMimeObject *payload);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|