aboutsummaryrefslogtreecommitdiff
path: root/util/gmime-extra.h
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2017-05-06 08:41:14 -0300
committerDavid Bremner <david@tethera.net>2017-07-14 17:58:09 -0300
commit32819f74d3ac2eee25cf234d988688cc82ecbc0a (patch)
tree588f5a3e0cb50f7aa66527ce454e459e7ca1c817 /util/gmime-extra.h
parentcbb2d5608ef6dd54d6e9e19b2bb570d3fe54b28b (diff)
cli: replace use of g_mime_message_get_recipients
This function, and associated enum, have been renamed and generalized in gmime-3.0.
Diffstat (limited to 'util/gmime-extra.h')
-rw-r--r--util/gmime-extra.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/util/gmime-extra.h b/util/gmime-extra.h
index 04d63026..fef4f425 100644
--- a/util/gmime-extra.h
+++ b/util/gmime-extra.h
@@ -6,6 +6,26 @@ GMimeStream *g_mime_stream_stdout_new(void);
#include <talloc.h>
+
+#if (GMIME_MAJOR_VERSION < 3)
+
+#define GMIME_ADDRESS_TYPE_TO GMIME_RECIPIENT_TYPE_TO
+#define GMIME_ADDRESS_TYPE_CC GMIME_RECIPIENT_TYPE_CC
+#define GMIME_ADDRESS_TYPE_BCC GMIME_RECIPIENT_TYPE_BCC
+
+
+#else /* GMime >= 3.0 */
+typedef GMimeAddressType GMimeRecipientType;
+#endif
+
+/**
+ * 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, GMimeRecipientType type);
+
+InternetAddressList * g_mime_message_get_addresses (GMimeMessage *message, GMimeRecipientType type);
+
/**
* return talloc allocated date string
*/
@@ -30,6 +50,4 @@ InternetAddressList * g_mime_message_get_reply_to_list (GMimeMessage *message);
* return talloc allocated reply-to string
*/
char * g_mime_message_get_reply_to_string (void *ctx, GMimeMessage *message);
-
-
#endif