mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
cli: expose message-wide crypto status from mime-node
The mime node context (a per-message context) gains a cryptographic status object, and the mime_node_t object itself can return a view on that status to an interested party. The status is not yet populated, and for now we can keep that view read-only, so that it can only be populated/modified during MIME tree traversal.
This commit is contained in:
parent
74919c226e
commit
2c08beb254
2 changed files with 10 additions and 0 deletions
|
@ -34,6 +34,7 @@ typedef struct mime_node_context {
|
||||||
GMimeStream *stream;
|
GMimeStream *stream;
|
||||||
GMimeParser *parser;
|
GMimeParser *parser;
|
||||||
GMimeMessage *mime_message;
|
GMimeMessage *mime_message;
|
||||||
|
_notmuch_message_crypto_t *msg_crypto;
|
||||||
|
|
||||||
/* Context provided by the caller. */
|
/* Context provided by the caller. */
|
||||||
_notmuch_crypto_t *crypto;
|
_notmuch_crypto_t *crypto;
|
||||||
|
@ -54,6 +55,12 @@ _mime_node_context_free (mime_node_context_t *res)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const _notmuch_message_crypto_t*
|
||||||
|
mime_node_get_message_crypto_status (mime_node_t *node)
|
||||||
|
{
|
||||||
|
return node->ctx->msg_crypto;
|
||||||
|
}
|
||||||
|
|
||||||
notmuch_status_t
|
notmuch_status_t
|
||||||
mime_node_open (const void *ctx, notmuch_message_t *message,
|
mime_node_open (const void *ctx, notmuch_message_t *message,
|
||||||
_notmuch_crypto_t *crypto, mime_node_t **root_out)
|
_notmuch_crypto_t *crypto, mime_node_t **root_out)
|
||||||
|
|
|
@ -439,6 +439,9 @@ mime_node_child (mime_node_t *parent, int child);
|
||||||
mime_node_t *
|
mime_node_t *
|
||||||
mime_node_seek_dfs (mime_node_t *node, int n);
|
mime_node_seek_dfs (mime_node_t *node, int n);
|
||||||
|
|
||||||
|
const _notmuch_message_crypto_t*
|
||||||
|
mime_node_get_message_crypto_status (mime_node_t *node);
|
||||||
|
|
||||||
typedef enum dump_formats {
|
typedef enum dump_formats {
|
||||||
DUMP_FORMAT_AUTO,
|
DUMP_FORMAT_AUTO,
|
||||||
DUMP_FORMAT_BATCH_TAG,
|
DUMP_FORMAT_BATCH_TAG,
|
||||||
|
|
Loading…
Reference in a new issue