]> git.notmuchmail.org Git - notmuch/blob - util/gmime-extra.h
Merge branch 'release'
[notmuch] / util / gmime-extra.h
1 #ifndef _GMIME_EXTRA_H
2 #define _GMIME_EXTRA_H
3 #include <gmime/gmime.h>
4 #include <talloc.h>
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10 GMimeStream *g_mime_stream_stdout_new (void);
11
12 /* Return a GMime stream for this open file descriptor, un-gzipping if
13  * necessary */
14 GMimeStream *g_mime_stream_gzfile_new (int fd);
15
16 /* Return a GMime stream for this path, un-gzipping if
17  * necessary */
18 GMimeStream *g_mime_stream_gzfile_open (const char *filename);
19
20 /**
21  * Get last 16 hex digits of fingerprint ("keyid")
22  */
23 const char *g_mime_certificate_get_fpr16 (GMimeCertificate *cert);
24 /**
25  * Return the contents of the appropriate address header as a string
26  * Should be freed using g_free
27  */
28 char *g_mime_message_get_address_string (GMimeMessage *message, GMimeAddressType type);
29
30 InternetAddressList *g_mime_message_get_addresses (GMimeMessage *message, GMimeAddressType type);
31
32 /**
33  * return talloc allocated date string
34  */
35
36 char *g_mime_message_get_date_string (void *ctx, GMimeMessage *message);
37
38 /**
39  * glib allocated list of From: addresses
40  */
41
42 InternetAddressList *g_mime_message_get_from (GMimeMessage *message);
43
44
45 /**
46  * return string for From: address
47  * (owned by gmime)
48  */
49 const char *g_mime_message_get_from_string (GMimeMessage *message);
50
51 InternetAddressList *g_mime_message_get_reply_to_list (GMimeMessage *message);
52
53 /**
54  * return talloc allocated reply-to string
55  */
56 char *g_mime_message_get_reply_to_string (void *ctx, GMimeMessage *message);
57
58 void g_mime_parser_set_scan_from (GMimeParser *parser, gboolean flag);
59
60 gboolean g_mime_signature_status_good (GMimeSignatureStatus status);
61
62 gboolean g_mime_signature_status_bad (GMimeSignatureStatus status);
63
64 gboolean g_mime_signature_status_error (GMimeSignatureStatus status);
65
66 gint64 g_mime_utils_header_decode_date_unix (const char *date);
67
68 /**
69  * Return string for valid User ID (or NULL if no valid User ID exists)
70  */
71 const char *g_mime_certificate_get_valid_userid (GMimeCertificate *cert);
72
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif