X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=util%2Fgmime-extra.h;h=4407be3358a3576e49316386c5d5ebdc72cff99d;hp=90f230c1b514901da2cab24cec296f6387ba87db;hb=2b3224a6c4be6b6c038a9956448187e0a402687b;hpb=c7b9bdb81e49321170dc6f0a522301f28e791521 diff --git a/util/gmime-extra.h b/util/gmime-extra.h index 90f230c1..4407be33 100644 --- a/util/gmime-extra.h +++ b/util/gmime-extra.h @@ -13,6 +13,9 @@ GMimeStream *g_mime_stream_stdout_new(void); #define GMIME_ADDRESS_TYPE_CC GMIME_RECIPIENT_TYPE_CC #define GMIME_ADDRESS_TYPE_BCC GMIME_RECIPIENT_TYPE_BCC +#define g_mime_2_6_unref(obj) g_object_unref (obj) +#define g_mime_certificate_get_fpr16(cert) g_mime_certificate_get_key_id (cert) + #else /* GMime >= 3.0 */ typedef GMimeAddressType GMimeRecipientType; @@ -37,12 +40,27 @@ typedef GMimeAddressType GMimeRecipientType; #define g_mime_utils_header_decode_text(txt) g_mime_utils_header_decode_text (NULL, txt) #define internet_address_to_string(ia,encode) internet_address_to_string (ia,NULL,encode) #define internet_address_list_parse_string(str) internet_address_list_parse (NULL,str) + typedef GMimeAddressType GMimeRecipientType; typedef GMimeSignatureStatus GMimeSignatureError; +typedef GMimeTrust GMimeCertificateTrust; + +#define GMIME_CERTIFICATE_TRUST_UNKNOWN GMIME_TRUST_UNKNOWN +#define GMIME_CERTIFICATE_TRUST_UNDEFINED GMIME_TRUST_UNDEFINED +#define GMIME_CERTIFICATE_TRUST_NEVER GMIME_TRUST_NEVER +#define GMIME_CERTIFICATE_TRUST_MARGINAL GMIME_TRUST_MARGINAL +#define GMIME_CERTIFICATE_TRUST_FULLY GMIME_TRUST_FULL +#define GMIME_CERTIFICATE_TRUST_ULTIMATE GMIME_TRUST_ULTIMATE + +#define g_mime_2_6_unref(obj) /*ignore*/ #endif +/** + * 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 @@ -84,4 +102,6 @@ gboolean g_mime_signature_status_good (GMimeSignatureStatus status); gboolean g_mime_signature_status_bad (GMimeSignatureStatus status); gboolean g_mime_signature_status_error (GMimeSignatureError status); + +gint64 g_mime_utils_header_decode_date_unix (const char *date); #endif