X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=util%2Fgmime-extra.h;h=b0c8d3d84a07429a44d84c5c7f1c03780b3bee51;hp=04d630260259094ee5e7e527a24b4417d3c86275;hb=a6b0772b60d9191fcc291358eec3d78bfea31f1c;hpb=cbb2d5608ef6dd54d6e9e19b2bb570d3fe54b28b diff --git a/util/gmime-extra.h b/util/gmime-extra.h index 04d63026..b0c8d3d8 100644 --- a/util/gmime-extra.h +++ b/util/gmime-extra.h @@ -1,10 +1,33 @@ #ifndef _GMIME_EXTRA_H #define _GMIME_EXTRA_H #include +#include + +#ifdef __cplusplus +extern "C" { +#endif GMimeStream *g_mime_stream_stdout_new(void); -#include +/* Return a GMime stream for this open file descriptor, un-gzipping if + * necessary */ +GMimeStream *g_mime_stream_gzfile_new (int fd); + +/* Return a GMime stream for this path, un-gzipping if + * necessary */ +GMimeStream *g_mime_stream_gzfile_open (const char *filename); + +/** + * Get last 16 hex digits of fingerprint ("keyid") + */ +const char *g_mime_certificate_get_fpr16 (GMimeCertificate *cert); +/** + * Return the contents of the appropriate address header as a string + * Should be freed using g_free + */ +char *g_mime_message_get_address_string (GMimeMessage *message, GMimeAddressType type); + +InternetAddressList * g_mime_message_get_addresses (GMimeMessage *message, GMimeAddressType type); /** * return talloc allocated date string @@ -18,6 +41,7 @@ char *g_mime_message_get_date_string (void *ctx, GMimeMessage *message); InternetAddressList * g_mime_message_get_from (GMimeMessage *message); + /** * return string for From: address * (owned by gmime) @@ -31,5 +55,23 @@ InternetAddressList * g_mime_message_get_reply_to_list (GMimeMessage *message); */ char * g_mime_message_get_reply_to_string (void *ctx, GMimeMessage *message); +void g_mime_parser_set_scan_from (GMimeParser *parser, gboolean flag); + +gboolean g_mime_signature_status_good (GMimeSignatureStatus status); + +gboolean g_mime_signature_status_bad (GMimeSignatureStatus status); + +gboolean g_mime_signature_status_error (GMimeSignatureStatus status); + +gint64 g_mime_utils_header_decode_date_unix (const char *date); + +/** + * Return string for valid User ID (or NULL if no valid User ID exists) + */ +const char * g_mime_certificate_get_valid_userid (GMimeCertificate *cert); + +#ifdef __cplusplus +} +#endif #endif