2017-05-27 13:51:11 -03:00
|
|
|
#ifndef _GMIME_EXTRA_H
|
|
|
|
#define _GMIME_EXTRA_H
|
|
|
|
#include <gmime/gmime.h>
|
2017-05-04 08:48:44 -04:00
|
|
|
#include <talloc.h>
|
|
|
|
|
2019-03-02 16:26:06 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-06-13 07:33:13 -03:00
|
|
|
GMimeStream *g_mime_stream_stdout_new (void);
|
2017-05-06 08:41:14 -03:00
|
|
|
|
2019-03-30 10:03:01 -03:00
|
|
|
/* 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);
|
|
|
|
|
2017-06-02 20:57:01 -03:00
|
|
|
/**
|
|
|
|
* Get last 16 hex digits of fingerprint ("keyid")
|
|
|
|
*/
|
|
|
|
const char *g_mime_certificate_get_fpr16 (GMimeCertificate *cert);
|
2017-05-06 08:41:14 -03:00
|
|
|
/**
|
|
|
|
* Return the contents of the appropriate address header as a string
|
|
|
|
* Should be freed using g_free
|
|
|
|
*/
|
2019-05-02 09:19:43 -04:00
|
|
|
char *g_mime_message_get_address_string (GMimeMessage *message, GMimeAddressType type);
|
2017-05-06 08:41:14 -03:00
|
|
|
|
2019-06-13 07:33:13 -03:00
|
|
|
InternetAddressList *g_mime_message_get_addresses (GMimeMessage *message, GMimeAddressType type);
|
2017-05-06 08:41:14 -03:00
|
|
|
|
2017-05-04 08:48:44 -04:00
|
|
|
/**
|
|
|
|
* return talloc allocated date string
|
|
|
|
*/
|
2017-05-05 23:26:57 -03:00
|
|
|
|
2017-05-04 08:48:44 -04:00
|
|
|
char *g_mime_message_get_date_string (void *ctx, GMimeMessage *message);
|
2017-05-04 14:59:37 -04:00
|
|
|
|
|
|
|
/**
|
2017-05-05 23:26:57 -03:00
|
|
|
* glib allocated list of From: addresses
|
2017-05-04 14:59:37 -04:00
|
|
|
*/
|
|
|
|
|
2019-06-13 07:33:13 -03:00
|
|
|
InternetAddressList *g_mime_message_get_from (GMimeMessage *message);
|
2017-05-04 14:59:37 -04:00
|
|
|
|
2017-05-14 14:49:31 -03:00
|
|
|
|
2017-05-04 14:59:37 -04:00
|
|
|
/**
|
2017-05-05 23:26:57 -03:00
|
|
|
* return string for From: address
|
|
|
|
* (owned by gmime)
|
2017-05-04 14:59:37 -04:00
|
|
|
*/
|
2019-06-13 07:33:13 -03:00
|
|
|
const char *g_mime_message_get_from_string (GMimeMessage *message);
|
2017-05-05 23:26:57 -03:00
|
|
|
|
2019-06-13 07:33:13 -03:00
|
|
|
InternetAddressList *g_mime_message_get_reply_to_list (GMimeMessage *message);
|
2017-05-04 08:48:44 -04:00
|
|
|
|
2017-05-05 23:26:57 -03:00
|
|
|
/**
|
|
|
|
* return talloc allocated reply-to string
|
|
|
|
*/
|
2019-06-13 07:33:13 -03:00
|
|
|
char *g_mime_message_get_reply_to_string (void *ctx, GMimeMessage *message);
|
2017-05-14 14:49:31 -03:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2019-05-02 09:19:43 -04:00
|
|
|
gboolean g_mime_signature_status_error (GMimeSignatureStatus status);
|
2017-05-16 22:59:54 -03:00
|
|
|
|
|
|
|
gint64 g_mime_utils_header_decode_date_unix (const char *date);
|
2017-12-08 15:09:46 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return string for valid User ID (or NULL if no valid User ID exists)
|
|
|
|
*/
|
2019-06-13 07:33:13 -03:00
|
|
|
const char *g_mime_certificate_get_valid_userid (GMimeCertificate *cert);
|
2021-05-26 21:44:58 -04:00
|
|
|
/**
|
|
|
|
* Return string for valid e-mail address (or NULL if no valid e-mail address exists)
|
|
|
|
*/
|
|
|
|
const char *g_mime_certificate_get_valid_email (GMimeCertificate *cert);
|
2017-12-08 15:09:46 -05:00
|
|
|
|
2019-03-02 16:26:06 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-05-27 13:51:11 -03:00
|
|
|
#endif
|