[gmime] Reverted GMimeMessage Resent-* API's for now (maybe in 3.4 or 4.0?)
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Reverted GMimeMessage Resent-* API's for now (maybe in 3.4 or 4.0?)
- Date: Wed, 28 Nov 2018 18:33:06 +0000 (UTC)
commit 4b8ba69fba3ec3db400f0b5fdd89e83f006f35cc
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date: Mon Nov 26 16:34:36 2018 -0500
Reverted GMimeMessage Resent-* API's for now (maybe in 3.4 or 4.0?)
docs/reference/gmime-sections.txt | 10 --
gmime/gmime-message.c | 318 +-------------------------------------
gmime/gmime-message.h | 30 ----
3 files changed, 1 insertion(+), 357 deletions(-)
---
diff --git a/docs/reference/gmime-sections.txt b/docs/reference/gmime-sections.txt
index a9b1e015..fed53402 100644
--- a/docs/reference/gmime-sections.txt
+++ b/docs/reference/gmime-sections.txt
@@ -1018,12 +1018,6 @@ g_mime_message_get_reply_to
g_mime_message_get_to
g_mime_message_get_cc
g_mime_message_get_bcc
-g_mime_message_get_resent_sender
-g_mime_message_get_resent_from
-g_mime_message_get_resent_reply_to
-g_mime_message_get_resent_to
-g_mime_message_get_resent_cc
-g_mime_message_get_resent_bcc
g_mime_message_add_mailbox
g_mime_message_get_addresses
g_mime_message_get_all_recipients
@@ -1031,12 +1025,8 @@ g_mime_message_set_subject
g_mime_message_get_subject
g_mime_message_set_date
g_mime_message_get_date
-g_mime_message_set_resent_date
-g_mime_message_get_resent_date
g_mime_message_set_message_id
g_mime_message_get_message_id
-g_mime_message_set_resent_message_id
-g_mime_message_get_resent_message_id
g_mime_message_set_mime_part
g_mime_message_get_mime_part
g_mime_message_foreach
diff --git a/gmime/gmime-message.c b/gmime/gmime-message.c
index 1dc117ee..a06dd214 100644
--- a/gmime/gmime-message.c
+++ b/gmime/gmime-message.c
@@ -72,13 +72,6 @@ static void to_list_changed (InternetAddressList *list, gpointer args, GMimeMess
static void cc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
static void bcc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
-static void resent_sender_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
-static void resent_from_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
-static void resent_reply_to_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
-static void resent_to_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
-static void resent_cc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
-static void resent_bcc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message);
-
static GMimeObjectClass *parent_class = NULL;
static struct {
@@ -91,12 +84,6 @@ static struct {
{ "To", (GMimeEventCallback) to_list_changed },
{ "Cc", (GMimeEventCallback) cc_list_changed },
{ "Bcc", (GMimeEventCallback) bcc_list_changed },
- { "Resent-Sender", (GMimeEventCallback) resent_sender_changed },
- { "Resent-From", (GMimeEventCallback) resent_from_changed },
- { "Resent-Reply-To", (GMimeEventCallback) resent_reply_to_changed },
- { "Resent-To", (GMimeEventCallback) resent_to_list_changed },
- { "Resent-Cc", (GMimeEventCallback) resent_cc_list_changed },
- { "Resent-Bcc", (GMimeEventCallback) resent_bcc_list_changed }
};
#define N_ADDRESS_TYPES G_N_ELEMENTS (address_types)
@@ -205,8 +192,6 @@ g_mime_message_init (GMimeMessage *message, GMimeMessageClass *klass)
message->addrlists = g_new (InternetAddressList *, N_ADDRESS_TYPES);
((GMimeObject *) message)->ensure_newline = TRUE;
- message->resent_message_id = NULL;
- message->resent_date = NULL;
message->message_id = NULL;
message->mime_part = NULL;
message->subject = NULL;
@@ -232,14 +217,10 @@ g_mime_message_finalize (GObject *object)
}
g_free (message->addrlists);
- g_free (message->resent_message_id);
g_free (message->message_id);
g_free (message->subject);
g_free (message->marker);
- if (message->resent_date)
- g_date_time_unref (message->resent_date);
-
if (message->date)
g_date_time_unref (message->date);
@@ -262,14 +243,6 @@ enum {
HEADER_DATE,
HEADER_MESSAGE_ID,
HEADER_MIME_VERSION,
- HEADER_RESENT_SENDER,
- HEADER_RESENT_FROM,
- HEADER_RESENT_REPLY_TO,
- HEADER_RESENT_TO,
- HEADER_RESENT_CC,
- HEADER_RESENT_BCC,
- HEADER_RESENT_DATE,
- HEADER_RESENT_MESSAGE_ID,
HEADER_UNKNOWN
};
@@ -283,15 +256,7 @@ static const char *message_headers[] = {
"Subject",
"Date",
"Message-Id",
- "MIME-Version",
- "Resent-Sender",
- "Resent-From",
- "Resent-Reply-To",
- "Resent-To",
- "Resent-Cc",
- "Resent-Bcc",
- "Resent-Date",
- "Resent-Message-Id"
+ "MIME-Version"
};
static void
@@ -386,40 +351,6 @@ process_header (GMimeObject *object, GMimeHeader *header)
else
message->message_id = NULL;
break;
- case HEADER_RESENT_SENDER:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_SENDER);
- break;
- case HEADER_RESENT_FROM:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_FROM);
- break;
- case HEADER_RESENT_REPLY_TO:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_REPLY_TO);
- break;
- case HEADER_RESENT_TO:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_TO);
- break;
- case HEADER_RESENT_CC:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_CC);
- break;
- case HEADER_RESENT_BCC:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_BCC);
- break;
- case HEADER_RESENT_DATE:
- if ((value = g_mime_header_get_value (header))) {
- if (message->resent_date)
- g_date_time_unref (message->resent_date);
-
- message->resent_date = g_mime_utils_header_decode_date (value);
- }
- break;
- case HEADER_RESENT_MESSAGE_ID:
- g_free (message->resent_message_id);
-
- if ((value = g_mime_header_get_value (header)))
- message->resent_message_id = g_mime_utils_decode_message_id (value);
- else
- message->resent_message_id = NULL;
- break;
}
}
@@ -487,34 +418,6 @@ message_header_removed (GMimeObject *object, GMimeHeader *header)
g_free (message->message_id);
message->message_id = NULL;
break;
- case HEADER_RESENT_SENDER:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_SENDER);
- break;
- case HEADER_RESENT_FROM:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_FROM);
- break;
- case HEADER_RESENT_REPLY_TO:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_REPLY_TO);
- break;
- case HEADER_RESENT_TO:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_TO);
- break;
- case HEADER_RESENT_CC:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_CC);
- break;
- case HEADER_RESENT_BCC:
- message_update_addresses (message, options, GMIME_ADDRESS_TYPE_RESENT_BCC);
- break;
- case HEADER_RESENT_DATE:
- if (message->resent_date) {
- g_date_time_unref (message->resent_date);
- message->resent_date = NULL;
- }
- break;
- case HEADER_RESENT_MESSAGE_ID:
- g_free (message->resent_message_id);
- message->resent_message_id = NULL;
- break;
}
GMIME_OBJECT_CLASS (parent_class)->header_removed (object, header);
@@ -532,18 +435,11 @@ message_headers_cleared (GMimeObject *object)
unblock_changed_event (message, i);
}
- g_free (message->resent_message_id);
- message->resent_message_id = NULL;
g_free (message->message_id);
message->message_id = NULL;
g_free (message->subject);
message->subject = NULL;
- if (message->resent_date) {
- g_date_time_unref (message->resent_date);
- message->resent_date = NULL;
- }
-
if (message->date) {
g_date_time_unref (message->date);
message->date = NULL;
@@ -850,108 +746,6 @@ g_mime_message_get_bcc (GMimeMessage *message)
}
-/**
- * g_mime_message_get_resent_sender:
- * @message: A #GMimeMessage
- *
- * Gets the parsed list of addresses in the Resent-Sender header.
- *
- * Returns: (transfer none): the parsed list of addresses in the Resent-Sender header.
- **/
-InternetAddressList *
-g_mime_message_get_resent_sender (GMimeMessage *message)
-{
- g_return_val_if_fail (GMIME_IS_MESSAGE (message), NULL);
-
- return message->addrlists[GMIME_ADDRESS_TYPE_RESENT_SENDER];
-}
-
-
-/**
- * g_mime_message_get_resent_from:
- * @message: A #GMimeMessage
- *
- * Gets the parsed list of addresses in the Resent-From header.
- *
- * Returns: (transfer none): the parsed list of addresses in the Resent-From header.
- **/
-InternetAddressList *
-g_mime_message_get_resent_from (GMimeMessage *message)
-{
- g_return_val_if_fail (GMIME_IS_MESSAGE (message), NULL);
-
- return message->addrlists[GMIME_ADDRESS_TYPE_RESENT_FROM];
-}
-
-
-/**
- * g_mime_message_get_resent_reply_to:
- * @message: A #GMimeMessage
- *
- * Gets the parsed list of addresses in the Resent-Reply-To header.
- *
- * Returns: (transfer none): the parsed list of addresses in the Resent-Reply-To header.
- **/
-InternetAddressList *
-g_mime_message_get_resent_reply_to (GMimeMessage *message)
-{
- g_return_val_if_fail (GMIME_IS_MESSAGE (message), NULL);
-
- return message->addrlists[GMIME_ADDRESS_TYPE_RESENT_REPLY_TO];
-}
-
-
-/**
- * g_mime_message_get_resent_to:
- * @message: A #GMimeMessage
- *
- * Gets combined list of parsed addresses in the Resent-To header(s).
- *
- * Returns: (transfer none): the parsed list of addresses in the resent-To header(s).
- **/
-InternetAddressList *
-g_mime_message_get_resent_to (GMimeMessage *message)
-{
- g_return_val_if_fail (GMIME_IS_MESSAGE (message), NULL);
-
- return message->addrlists[GMIME_ADDRESS_TYPE_RESENT_TO];
-}
-
-
-/**
- * g_mime_message_get_resent_cc:
- * @message: A #GMimeMessage
- *
- * Gets combined list of parsed addresses in the Resent-Cc header(s).
- *
- * Returns: (transfer none): the parsed list of addresses in the Resent-Cc header(s).
- **/
-InternetAddressList *
-g_mime_message_get_resent_cc (GMimeMessage *message)
-{
- g_return_val_if_fail (GMIME_IS_MESSAGE (message), NULL);
-
- return message->addrlists[GMIME_ADDRESS_TYPE_RESENT_CC];
-}
-
-
-/**
- * g_mime_message_get_resent_bcc:
- * @message: A #GMimeMessage
- *
- * Gets combined list of parsed addresses in the Resent-Bcc header(s).
- *
- * Returns: (transfer none): the parsed list of addresses in the Resent-Bcc header(s).
- **/
-InternetAddressList *
-g_mime_message_get_resent_bcc (GMimeMessage *message)
-{
- g_return_val_if_fail (GMIME_IS_MESSAGE (message), NULL);
-
- return message->addrlists[GMIME_ADDRESS_TYPE_RESENT_BCC];
-}
-
-
static void
sync_internet_address_list (InternetAddressList *list, GMimeMessage *message, const char *name)
{
@@ -1018,41 +812,6 @@ bcc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *messag
sync_address_header (message, GMIME_ADDRESS_TYPE_BCC);
}
-static void
-resent_sender_changed (InternetAddressList *list, gpointer args, GMimeMessage *message)
-{
- sync_address_header (message, GMIME_ADDRESS_TYPE_RESENT_SENDER);
-}
-
-static void
-resent_from_changed (InternetAddressList *list, gpointer args, GMimeMessage *message)
-{
- sync_address_header (message, GMIME_ADDRESS_TYPE_RESENT_FROM);
-}
-
-static void
-resent_reply_to_changed (InternetAddressList *list, gpointer args, GMimeMessage *message)
-{
- sync_address_header (message, GMIME_ADDRESS_TYPE_RESENT_REPLY_TO);
-}
-
-static void
-resent_to_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message)
-{
- sync_address_header (message, GMIME_ADDRESS_TYPE_RESENT_TO);
-}
-
-static void
-resent_cc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message)
-{
- sync_address_header (message, GMIME_ADDRESS_TYPE_RESENT_CC);
-}
-
-static void
-resent_bcc_list_changed (InternetAddressList *list, gpointer args, GMimeMessage *message)
-{
- sync_address_header (message, GMIME_ADDRESS_TYPE_RESENT_BCC);
-}
/**
* g_mime_message_add_mailbox:
@@ -1212,43 +971,6 @@ g_mime_message_get_date (GMimeMessage *message)
}
-/**
- * g_mime_message_set_resent_date:
- * @message: A #GMimeMessage
- * @date: a date to be used in the Resent-Date header
- *
- * Sets the Resent-Date header on a MIME Message.
- **/
-void
-g_mime_message_set_resent_date (GMimeMessage *message, GDateTime *date)
-{
- char *str;
-
- g_return_if_fail (GMIME_IS_MESSAGE (message));
-
- str = g_mime_utils_header_format_date (date);
- g_mime_object_set_header ((GMimeObject *) message, "Resent-Date", str, NULL);
- g_free (str);
-}
-
-
-/**
- * g_mime_message_get_resent_date:
- * @message: A #GMimeMessage
- *
- * Gets the parsed date and time value from the Resent-Date header.
- *
- * Returns: a #GDateTime on success or %NULL if the date could not be parsed.
- **/
-GDateTime *
-g_mime_message_get_resent_date (GMimeMessage *message)
-{
- g_return_val_if_fail (GMIME_IS_MESSAGE (message), NULL);
-
- return message->resent_date;
-}
-
-
/**
* g_mime_message_set_message_id:
* @message: A #GMimeMessage
@@ -1287,44 +1009,6 @@ g_mime_message_get_message_id (GMimeMessage *message)
}
-/**
- * g_mime_message_set_resent_message_id:
- * @message: A #GMimeMessage
- * @message_id: message-id (addr-spec portion)
- *
- * Set the Resent-Message-Id on a message.
- **/
-void
-g_mime_message_set_resent_message_id (GMimeMessage *message, const char *message_id)
-{
- char *msgid;
-
- g_return_if_fail (GMIME_IS_MESSAGE (message));
- g_return_if_fail (message_id != NULL);
-
- msgid = g_strdup_printf ("<%s>", message_id);
- g_mime_object_set_header ((GMimeObject *) message, "Resent-Message-Id", msgid, NULL);
- g_free (msgid);
-}
-
-
-/**
- * g_mime_message_get_resent_message_id:
- * @message: A #GMimeMessage
- *
- * Gets the Resent-Message-Id header of @message.
- *
- * Returns: the Resent-Message-Id of a message.
- **/
-const char *
-g_mime_message_get_resent_message_id (GMimeMessage *message)
-{
- g_return_val_if_fail (GMIME_IS_MESSAGE (message), NULL);
-
- return message->resent_message_id;
-}
-
-
/**
* g_mime_message_get_mime_part:
* @message: A #GMimeMessage
diff --git a/gmime/gmime-message.h b/gmime/gmime-message.h
index 6c8fa657..52427a6b 100644
--- a/gmime/gmime-message.h
+++ b/gmime/gmime-message.h
@@ -54,12 +54,6 @@ typedef struct _GMimeMessageClass GMimeMessageClass;
* @GMIME_ADDRESS_TYPE_TO: Represents the recipients in the To header.
* @GMIME_ADDRESS_TYPE_CC: Represents the recipients in the Cc header.
* @GMIME_ADDRESS_TYPE_BCC: Represents the recipients in the Bcc header.
- * @GMIME_ADDRESS_TYPE_RESENT_SENDER: Represents the addresses in the Resent-Sender header.
- * @GMIME_ADDRESS_TYPE_RESENT_FROM: Represents the addresses in the Resent-From header.
- * @GMIME_ADDRESS_TYPE_RESENT_REPLY_TO: Represents the addresses in the Resent-Reply-To header.
- * @GMIME_ADDRESS_TYPE_RESENT_TO: Represents the recipients in the Resent-To header.
- * @GMIME_ADDRESS_TYPE_RESENT_CC: Represents the recipients in the Resent-Cc header.
- * @GMIME_ADDRESS_TYPE_RESENT_BCC: Represents the recipients in the Resent-Bcc header.
*
* An address type.
**/
@@ -70,12 +64,6 @@ typedef enum _GMimeAddressType {
GMIME_ADDRESS_TYPE_TO,
GMIME_ADDRESS_TYPE_CC,
GMIME_ADDRESS_TYPE_BCC,
- GMIME_ADDRESS_TYPE_RESENT_SENDER,
- GMIME_ADDRESS_TYPE_RESENT_FROM,
- GMIME_ADDRESS_TYPE_RESENT_REPLY_TO,
- GMIME_ADDRESS_TYPE_RESENT_TO,
- GMIME_ADDRESS_TYPE_RESENT_CC,
- GMIME_ADDRESS_TYPE_RESENT_BCC
} GMimeAddressType;
@@ -87,8 +75,6 @@ typedef enum _GMimeAddressType {
* @message_id: Message-Id string
* @date: Date value
* @subject: Subject string
- * @resent_message_id: The Resent-Message-Id string
- * @resent_date: The Resent-Date value
*
* A MIME Message object.
**/
@@ -101,9 +87,6 @@ struct _GMimeMessage {
GDateTime *date;
char *subject;
- char *resent_message_id;
- GDateTime *resent_date;
-
/* <private> */
char *marker;
};
@@ -125,13 +108,6 @@ InternetAddressList *g_mime_message_get_to (GMimeMessage *message);
InternetAddressList *g_mime_message_get_cc (GMimeMessage *message);
InternetAddressList *g_mime_message_get_bcc (GMimeMessage *message);
-InternetAddressList *g_mime_message_get_resent_from (GMimeMessage *message);
-InternetAddressList *g_mime_message_get_resent_sender (GMimeMessage *message);
-InternetAddressList *g_mime_message_get_resent_reply_to (GMimeMessage *message);
-InternetAddressList *g_mime_message_get_resent_to (GMimeMessage *message);
-InternetAddressList *g_mime_message_get_resent_cc (GMimeMessage *message);
-InternetAddressList *g_mime_message_get_resent_bcc (GMimeMessage *message);
-
void g_mime_message_add_mailbox (GMimeMessage *message, GMimeAddressType type, const char *name, const char
*addr);
InternetAddressList *g_mime_message_get_addresses (GMimeMessage *message, GMimeAddressType type);
InternetAddressList *g_mime_message_get_all_recipients (GMimeMessage *message);
@@ -142,15 +118,9 @@ const char *g_mime_message_get_subject (GMimeMessage *message);
void g_mime_message_set_date (GMimeMessage *message, GDateTime *date);
GDateTime *g_mime_message_get_date (GMimeMessage *message);
-void g_mime_message_set_resent_date (GMimeMessage *message, GDateTime *date);
-GDateTime *g_mime_message_get_resent_date (GMimeMessage *message);
-
void g_mime_message_set_message_id (GMimeMessage *message, const char *message_id);
const char *g_mime_message_get_message_id (GMimeMessage *message);
-void g_mime_message_set_resent_message_id (GMimeMessage *message, const char *message_id);
-const char *g_mime_message_get_resent_message_id (GMimeMessage *message);
-
GMimeObject *g_mime_message_get_mime_part (GMimeMessage *message);
void g_mime_message_set_mime_part (GMimeMessage *message, GMimeObject *mime_part);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]