From ea4fd50f45b0bc0888070125c632ea2326eb18f7 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 27 Mar 2012 17:59:50 -0400 Subject: show/reply: Unify the code that extracts text parts Previously, show and reply had separate implementations of decoding and printing text parts. Now both use show's implementation, which was more complete. Show's implementation has been extended with an option to add reply quoting to the extracted part (this is implemented as a named flag to avoid naked booleans, even though it's the only flag it can take). --- notmuch-client.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'notmuch-client.h') diff --git a/notmuch-client.h b/notmuch-client.h index fa04fa2e..203ac496 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -197,6 +197,14 @@ format_part_json (const void *ctx, mime_node_t *node, notmuch_bool_t first); void format_headers_json (const void *ctx, GMimeMessage *message, notmuch_bool_t reply); +typedef enum { + NOTMUCH_SHOW_TEXT_PART_REPLY = 1 << 0, +} notmuch_show_text_part_flags; + +void +show_text_part_content (GMimeObject *part, GMimeStream *stream_out, + notmuch_show_text_part_flags flags); + char * json_quote_chararray (const void *ctx, const char *str, const size_t len); -- cgit v1.2.3