diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2019-05-25 14:04:04 -0400 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2019-05-26 08:20:23 -0300 |
commit | 2c08beb2546156940e30526fc6759f4ee74b4fed (patch) | |
tree | e2d6067ba69ed6f73ec5576e330ef9cccb20b5f0 /mime-node.c | |
parent | 74919c226eafad4de6b3a823f83a8be970e77e24 (diff) |
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.
Diffstat (limited to 'mime-node.c')
-rw-r--r-- | mime-node.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mime-node.c b/mime-node.c index e33336bb..66ff7446 100644 --- a/mime-node.c +++ b/mime-node.c @@ -34,6 +34,7 @@ typedef struct mime_node_context { GMimeStream *stream; GMimeParser *parser; GMimeMessage *mime_message; + _notmuch_message_crypto_t *msg_crypto; /* Context provided by the caller. */ _notmuch_crypto_t *crypto; @@ -54,6 +55,12 @@ _mime_node_context_free (mime_node_context_t *res) 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 mime_node_open (const void *ctx, notmuch_message_t *message, _notmuch_crypto_t *crypto, mime_node_t **root_out) |