]> git.notmuchmail.org Git - notmuch/blob - util/gmime-extra.h
d2636b7854621d69c63c8127caffa05ca2e9a164
[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 #define g_mime_parser_construct_message(p) g_mime_parser_construct_message (p, g_mime_parser_options_get_default ())
13
14 /**
15  * Get last 16 hex digits of fingerprint ("keyid")
16  */
17 const char *g_mime_certificate_get_fpr16 (GMimeCertificate *cert);
18 /**
19  * Return the contents of the appropriate address header as a string
20  * Should be freed using g_free
21  */
22 char *g_mime_message_get_address_string (GMimeMessage *message, GMimeAddressType type);
23
24 InternetAddressList * g_mime_message_get_addresses (GMimeMessage *message, GMimeAddressType type);
25
26 /**
27  * return talloc allocated date string
28  */
29
30 char *g_mime_message_get_date_string (void *ctx, GMimeMessage *message);
31
32 /**
33  * glib allocated list of From: addresses
34  */
35
36 InternetAddressList * g_mime_message_get_from (GMimeMessage *message);
37
38
39 /**
40  * return string for From: address
41  * (owned by gmime)
42  */
43 const char * g_mime_message_get_from_string (GMimeMessage *message);
44
45 InternetAddressList * g_mime_message_get_reply_to_list (GMimeMessage *message);
46
47 /**
48  * return talloc allocated reply-to string
49  */
50 char * g_mime_message_get_reply_to_string (void *ctx, GMimeMessage *message);
51
52 void g_mime_parser_set_scan_from (GMimeParser *parser, gboolean flag);
53
54 gboolean g_mime_signature_status_good (GMimeSignatureStatus status);
55
56 gboolean g_mime_signature_status_bad (GMimeSignatureStatus status);
57
58 gboolean g_mime_signature_status_error (GMimeSignatureStatus status);
59
60 gint64 g_mime_utils_header_decode_date_unix (const char *date);
61
62 /**
63  * Return string for valid User ID (or NULL if no valid User ID exists)
64  */
65 const char * g_mime_certificate_get_valid_userid (GMimeCertificate *cert);
66
67 #ifdef __cplusplus
68 }
69 #endif
70
71 #endif