diff options
| author | David Bremner <david@tethera.net> | 2022-07-01 18:45:44 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-07-30 08:41:50 -0300 |
| commit | 4612f3eb3dbf16bf98ccbadef77d7a6f6361e692 (patch) | |
| tree | 11f6350c5731fe3777d66cbb87e198377c0c342e /notmuch-client.h | |
| parent | cef5eaaef61b1f4dde6276ef267fb923f1b16680 (diff) | |
CLI/show: support --duplicate for structured output
This introduces a new mandatory key for message structures, namely
"duplicate". Per convention in devel/schemata this does _not_ increase
the format version. This means that clients are responsible for
checking that it exists, and not crashing if it does not.
The main functional change is teaching mime_node_open to understand a
'duplicate' argument.
Support for --duplicate in notmuch-reply would make sense, but we
defer it to a later commit.
Diffstat (limited to 'notmuch-client.h')
| -rw-r--r-- | notmuch-client.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/notmuch-client.h b/notmuch-client.h index f8f987e7..21b49908 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -230,6 +230,7 @@ show_one_part (const char *filename, int part); void format_part_sprinter (const void *ctx, struct sprinter *sp, mime_node_t *node, + int duplicate, bool output_body, bool include_html); @@ -389,7 +390,8 @@ struct mime_node { }; /* Construct a new MIME node pointing to the root message part of - * message. If crypto->verify is true, signed child parts will be + * message. Use the duplicate-th filename if that parameter is + * positive. If crypto->verify is true, signed child parts will be * verified. If crypto->decrypt is NOTMUCH_DECRYPT_TRUE, encrypted * child parts will be decrypted using either stored session keys or * asymmetric crypto. If crypto->decrypt is NOTMUCH_DECRYPT_AUTO, @@ -407,6 +409,7 @@ struct mime_node { */ notmuch_status_t mime_node_open (const void *ctx, notmuch_message_t *message, + int duplicate, _notmuch_crypto_t *crypto, mime_node_t **node_out); /* Return a new MIME node for the requested child part of parent. |
