From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH 10/16] gmime-cleanup: use GMime 3.0 data types
Date: Thu, 2 May 2019 01:16:47 -0400 [thread overview]
Message-ID: <20190502051653.8502-11-dkg@fifthhorseman.net> (raw)
In-Reply-To: <20190502051653.8502-1-dkg@fifthhorseman.net>
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
---
notmuch-reply.c | 4 ++--
notmuch-show.c | 8 ++++----
| 11 +++--------
3 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/notmuch-reply.c b/notmuch-reply.c
index f6ec3c07..35b6645b 100644
--- a/notmuch-reply.c
+++ b/notmuch-reply.c
@@ -176,7 +176,7 @@ static unsigned int
scan_address_list (InternetAddressList *list,
notmuch_config_t *config,
GMimeMessage *message,
- GMimeRecipientType type,
+ GMimeAddressType type,
const char **user_from)
{
InternetAddress *address;
@@ -331,7 +331,7 @@ add_recipients_from_message (GMimeMessage *reply,
*/
struct {
InternetAddressList * (*get_header)(GMimeMessage *message);
- GMimeRecipientType recipient_type;
+ GMimeAddressType recipient_type;
} reply_to_map[] = {
{ get_sender, GMIME_ADDRESS_TYPE_TO },
{ get_to, GMIME_ADDRESS_TYPE_TO },
diff --git a/notmuch-show.c b/notmuch-show.c
index 789e1986..108505d0 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -363,13 +363,13 @@ signature_status_to_string (GMimeSignatureStatus status)
/* Print signature flags */
struct key_map_struct {
- GMimeSignatureError bit;
+ GMimeSignatureStatus bit;
const char * string;
};
static void
do_format_signature_errors (sprinter_t *sp, struct key_map_struct *key_map,
- unsigned int array_map_len, GMimeSignatureError errors) {
+ unsigned int array_map_len, GMimeSignatureStatus errors) {
sp->map_key (sp, "errors");
sp->begin_map (sp);
@@ -386,7 +386,7 @@ do_format_signature_errors (sprinter_t *sp, struct key_map_struct *key_map,
static void
format_signature_errors (sprinter_t *sp, GMimeSignature *signature)
{
- GMimeSignatureError errors = g_mime_signature_get_errors (signature);
+ GMimeSignatureStatus errors = g_mime_signature_get_status (signature);
if (!(errors & GMIME_SIGNATURE_STATUS_ERROR_MASK))
return;
@@ -465,7 +465,7 @@ format_part_sigstatus_sprinter (sprinter_t *sp, GMimeSignatureList *siglist)
}
if (notmuch_format_version <= 3) {
- GMimeSignatureError errors = g_mime_signature_get_errors (signature);
+ GMimeSignatureStatus errors = g_mime_signature_get_status (signature);
if (g_mime_signature_status_error (errors)) {
sp->map_key (sp, "errors");
sp->integer (sp, errors);
--git a/util/gmime-extra.h b/util/gmime-extra.h
index e646efee..a183952d 100644
--- a/util/gmime-extra.h
+++ b/util/gmime-extra.h
@@ -18,15 +18,10 @@ GMimeStream *g_mime_stream_stdout_new(void);
#define g_mime_object_set_header(o,h,v) g_mime_object_set_header (o,h,v,NULL)
#define g_mime_parser_construct_message(p) g_mime_parser_construct_message (p, g_mime_parser_options_get_default ())
#define g_mime_part_get_content_object(p) g_mime_part_get_content (p)
-#define g_mime_signature_get_errors(sig) g_mime_signature_get_status (sig)
#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;
-
/**
* Get last 16 hex digits of fingerprint ("keyid")
*/
@@ -35,9 +30,9 @@ 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
*/
-char *g_mime_message_get_address_string (GMimeMessage *message, GMimeRecipientType type);
+char *g_mime_message_get_address_string (GMimeMessage *message, GMimeAddressType type);
-InternetAddressList * g_mime_message_get_addresses (GMimeMessage *message, GMimeRecipientType type);
+InternetAddressList * g_mime_message_get_addresses (GMimeMessage *message, GMimeAddressType type);
/**
* return talloc allocated date string
@@ -71,7 +66,7 @@ gboolean g_mime_signature_status_good (GMimeSignatureStatus status);
gboolean g_mime_signature_status_bad (GMimeSignatureStatus status);
-gboolean g_mime_signature_status_error (GMimeSignatureError status);
+gboolean g_mime_signature_status_error (GMimeSignatureStatus status);
gint64 g_mime_utils_header_decode_date_unix (const char *date);
--
2.20.1
next prev parent reply other threads:[~2019-05-02 5:17 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 10:46 [PATCH] build: drop support for gmime-2.6 David Bremner
2019-05-01 19:58 ` Tomi Ollila
2019-05-01 20:37 ` David Bremner
2019-05-01 20:14 ` Daniel Kahn Gillmor
2019-05-01 20:35 ` David Bremner
2019-05-01 20:41 ` Rollins, Jameson
2019-05-02 1:07 ` David Bremner
2019-05-02 2:21 ` Rollins, Jameson
2019-05-02 5:16 ` Dropping GMime 2.6 compatibility layer Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 01/16] gmime-cleanup: drop unused gmime 2.6 content_type from _index_encrypted_mime_part Daniel Kahn Gillmor
2019-05-02 9:40 ` David Bremner
2019-05-02 5:16 ` [PATCH 02/16] gmime-cleanup: remove GMime 2.6 variant codeblocks Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 03/16] gmime-cleanup: remove obsolete gpg_path configuration option and crypto contexts Daniel Kahn Gillmor
2019-05-02 9:50 ` David Bremner
2019-05-02 13:01 ` Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 04/16] gmime-cleanup: always support session keys Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 05/16] gmime-cleanup: tests should only care about gmime 3 Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 06/16] gmime-cleanup: simplify T355-smime.sh Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 07/16] gmime-cleanup: drop g_mime_2_6_unref Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 08/16] gmime-cleanup: drop all unused GMimeCryptoContext arguments Daniel Kahn Gillmor
2019-05-02 10:03 ` David Bremner
2019-05-02 5:16 ` [PATCH 09/16] gmime-cleanup: drop unused gmime #defines and simplify g_mime_init () Daniel Kahn Gillmor
2019-05-02 9:24 ` David Bremner
2019-05-02 5:16 ` Daniel Kahn Gillmor [this message]
2019-05-02 5:16 ` [PATCH 11/16] gmime-cleanup: use GMime 3.0 function names Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 12/16] gmime-cleanup: pass NULL arguments explicitly where GMime 3.0 expects it Daniel Kahn Gillmor
2019-05-02 10:06 ` David Bremner
2019-05-02 5:16 ` [PATCH 13/16] gmime-cleanup: pass NULL as default GMimeParserOptions Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 14/16] gmime-cleanup: no longer need to use GMime major version during build Daniel Kahn Gillmor
2019-05-02 10:10 ` David Bremner
2019-05-02 13:09 ` Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 15/16] gmime-cleanup: use GMIME_MINVER instead of GMIME3_MINVER Daniel Kahn Gillmor
2019-05-02 5:16 ` [PATCH 16/16] gmime-cleanup: strip remaining references to GMime 2.6 Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 01/15] build: drop support for gmime-2.6 Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 02/15] gmime-cleanup: drop unused gmime 2.6 content_type from _index_encrypted_mime_part Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 03/15] gmime-cleanup: remove GMime 2.6 variant codeblocks Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 04/15] gmime-cleanup: remove obsolete gpg_path configuration option and crypto contexts Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 05/15] gmime-cleanup: always support session keys Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 06/15] gmime-cleanup: tests should only care about gmime 3 Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 07/15] gmime-cleanup: simplify T355-smime.sh Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 08/15] gmime-cleanup: drop g_mime_2_6_unref Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 09/15] gmime-cleanup: drop all arguments unused in GMime 3 Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 10/15] gmime-cleanup: drop unused gmime #defines and simplify g_mime_init () Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 11/15] gmime-cleanup: use GMime 3.0 data types Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 12/15] gmime-cleanup: use GMime 3.0 function names Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 13/15] gmime-cleanup: pass NULL arguments explicitly where GMime 3.0 expects it Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 14/15] gmime-cleanup: pass NULL as default GMimeParserOptions Daniel Kahn Gillmor
2019-05-02 13:19 ` [PATCH v2 15/15] gmime-cleanup: no longer need to use GMime major version during build Daniel Kahn Gillmor
2019-05-03 10:43 ` [PATCH v2 01/15] build: drop support for gmime-2.6 David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190502051653.8502-11-dkg@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).