X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-client.h;h=880b153e70875a7cd0165fae989a5203f86015c8;hb=903327279c38d6750e8347eba23262fa487c6951;hp=a220fe4654f14599bcd18cacf1c4646d9ecdba7e;hpb=6a4df1b796ea82545fa0861d341aa6769f72ac02;p=notmuch diff --git a/notmuch-client.h b/notmuch-client.h index a220fe46..880b153e 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -62,7 +62,7 @@ #define STRINGIFY(s) STRINGIFY_(s) #define STRINGIFY_(s) #s -struct mime_node; +typedef struct mime_node mime_node_t; struct notmuch_show_params; typedef struct notmuch_show_format { @@ -99,6 +99,7 @@ typedef struct notmuch_show_format { typedef struct notmuch_show_params { notmuch_bool_t entire_thread; + notmuch_bool_t omit_excluded; notmuch_bool_t raw; int part; #ifdef GMIME_ATLEAST_26 @@ -191,6 +192,20 @@ show_message_body (notmuch_message_t *message, notmuch_status_t show_one_part (const char *filename, int part); +void +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); @@ -288,7 +303,7 @@ debugger_is_active (void); * parts. Message-type parts have one child, multipart-type parts * have multiple children, and leaf parts have zero children. */ -typedef struct mime_node { +struct mime_node { /* The MIME object of this part. This will be a GMimeMessage, * GMimePart, GMimeMultipart, or a subclass of one of these. * @@ -351,7 +366,7 @@ typedef struct mime_node { * number to assign it (or -1 if unknown). */ int next_child; int next_part_num; -} mime_node_t; +}; /* Construct a new MIME node pointing to the root message part of * message. If cryptoctx is non-NULL, it will be used to verify