[gmime] Revert the g_mime_header_list_get/set rename
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Revert the g_mime_header_list_get/set rename
- Date: Mon, 13 Mar 2017 00:49:29 +0000 (UTC)
commit 0f0d5cd7bd512a3e1d71e7343aa1f4bac708e2e9
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date: Sun Mar 12 09:13:11 2017 -0400
Revert the g_mime_header_list_get/set rename
PORTING | 3 ---
docs/reference/gmime-sections.txt | 4 ++--
gmime/gmime-header.c | 12 ++++++------
gmime/gmime-header.h | 4 ++--
gmime/gmime-internal.h | 2 +-
gmime/gmime-message.c | 6 +++---
gmime/gmime-object.c | 10 +++++-----
gmime/gmime-part.c | 10 +++++-----
tests/test-headers.c | 8 ++++----
9 files changed, 28 insertions(+), 31 deletions(-)
---
diff --git a/PORTING b/PORTING
index 4b6a6ab..4669de7 100644
--- a/PORTING
+++ b/PORTING
@@ -126,9 +126,6 @@ Porting from GMime 2.6 to GMime 3.0
argument nor does it return int. Instead, this function now returns a newly
allocated GMimeMultipartSigned.
-- g_mime_header_list_[get,set]() have been renamed to
- g_mime_header_list_[get,set]_value().
-
Porting from GMime 2.4 to GMime 2.6
-----------------------------------
diff --git a/docs/reference/gmime-sections.txt b/docs/reference/gmime-sections.txt
index 1b4d25f..02bf83c 100644
--- a/docs/reference/gmime-sections.txt
+++ b/docs/reference/gmime-sections.txt
@@ -602,8 +602,8 @@ g_mime_header_list_prepend
g_mime_header_list_append
g_mime_header_list_remove
g_mime_header_list_remove_at
-g_mime_header_list_set_value
-g_mime_header_list_get_value
+g_mime_header_list_set
+g_mime_header_list_get
g_mime_header_list_register_writer
g_mime_header_list_write_to_stream
g_mime_header_list_to_string
diff --git a/gmime/gmime-header.c b/gmime/gmime-header.c
index 9044fd6..64105bc 100644
--- a/gmime/gmime-header.c
+++ b/gmime/gmime-header.c
@@ -503,7 +503,7 @@ g_mime_header_list_append (GMimeHeaderList *headers, const char *name, const cha
/**
- * g_mime_header_list_get_value:
+ * g_mime_header_list_get:
* @headers: a #GMimeHeaderList
* @name: header name
*
@@ -515,7 +515,7 @@ g_mime_header_list_append (GMimeHeaderList *headers, const char *name, const cha
* g_mime_utils_header_decode_text() before displaying to the user.
**/
const char *
-g_mime_header_list_get_value (GMimeHeaderList *headers, const char *name)
+g_mime_header_list_get (GMimeHeaderList *headers, const char *name)
{
GMimeHeader *header;
@@ -530,7 +530,7 @@ g_mime_header_list_get_value (GMimeHeaderList *headers, const char *name)
void
-_g_mime_header_list_set_value (GMimeHeaderList *headers, const char *name, const char *value, const char
*raw_value, gint64 offset)
+_g_mime_header_list_set (GMimeHeaderList *headers, const char *name, const char *value, const char
*raw_value, gint64 offset)
{
GMimeHeader *header, *hdr;
guint i;
@@ -565,7 +565,7 @@ _g_mime_header_list_set_value (GMimeHeaderList *headers, const char *name, const
/**
- * g_mime_header_list_set_value:
+ * g_mime_header_list_set:
* @headers: a #GMimeHeaderList
* @name: header name
* @value: header value
@@ -583,12 +583,12 @@ _g_mime_header_list_set_value (GMimeHeaderList *headers, const char *name, const
* g_mime_utils_header_encode_text().
**/
void
-g_mime_header_list_set_value (GMimeHeaderList *headers, const char *name, const char *value)
+g_mime_header_list_set (GMimeHeaderList *headers, const char *name, const char *value)
{
g_return_if_fail (headers != NULL);
g_return_if_fail (name != NULL);
- _g_mime_header_list_set_value (headers, name, value, NULL, -1);
+ _g_mime_header_list_set (headers, name, value, NULL, -1);
}
diff --git a/gmime/gmime-header.h b/gmime/gmime-header.h
index bc3d5b9..ae49ec9 100644
--- a/gmime/gmime-header.h
+++ b/gmime/gmime-header.h
@@ -77,8 +77,8 @@ int g_mime_header_list_get_count (GMimeHeaderList *headers);
gboolean g_mime_header_list_contains (GMimeHeaderList *headers, const char *name);
void g_mime_header_list_prepend (GMimeHeaderList *headers, const char *name, const char *value);
void g_mime_header_list_append (GMimeHeaderList *headers, const char *name, const char *value);
-void g_mime_header_list_set_value (GMimeHeaderList *headers, const char *name, const char *value);
-const char *g_mime_header_list_get_value (GMimeHeaderList *headers, const char *name);
+void g_mime_header_list_set (GMimeHeaderList *headers, const char *name, const char *value);
+const char *g_mime_header_list_get (GMimeHeaderList *headers, const char *name);
GMimeHeader *g_mime_header_list_get_header (GMimeHeaderList *headers, int index);
gboolean g_mime_header_list_remove (GMimeHeaderList *headers, const char *name);
void g_mime_header_list_remove_at (GMimeHeaderList *headers, int index);
diff --git a/gmime/gmime-internal.h b/gmime/gmime-internal.h
index 9400551..1e20552 100644
--- a/gmime/gmime-internal.h
+++ b/gmime/gmime-internal.h
@@ -44,7 +44,7 @@ G_GNUC_INTERNAL void _g_mime_header_list_set_options (GMimeHeaderList *headers,
G_GNUC_INTERNAL gboolean _g_mime_header_list_has_raw_value (GMimeHeaderList *headers, const char *name);
G_GNUC_INTERNAL void _g_mime_header_list_prepend (GMimeHeaderList *headers, const char *name, const char
*value, const char *raw_value, gint64 offset);
G_GNUC_INTERNAL void _g_mime_header_list_append (GMimeHeaderList *headers, const char *name, const char
*value, const char *raw_value, gint64 offset);
-G_GNUC_INTERNAL void _g_mime_header_list_set_value (GMimeHeaderList *headers, const char *name, const char
*value, const char *raw_value, gint64 offset);
+G_GNUC_INTERNAL void _g_mime_header_list_set (GMimeHeaderList *headers, const char *name, const char *value,
const char *raw_value, gint64 offset);
G_GNUC_INTERNAL GMimeEvent *_g_mime_header_list_get_changed_event (GMimeHeaderList *headers);
/* GMimeObject */
diff --git a/gmime/gmime-message.c b/gmime/gmime-message.c
index 0337643..70eac15 100644
--- a/gmime/gmime-message.c
+++ b/gmime/gmime-message.c
@@ -805,7 +805,7 @@ message_set_header (GMimeObject *object, const char *header, const char *value,
if (!process_header (object, SET, header, value))
GMIME_OBJECT_CLASS (parent_class)->set_header (object, header, value, raw_value, offset);
else
- _g_mime_header_list_set_value (object->headers, header, value, raw_value, offset);
+ _g_mime_header_list_set (object->headers, header, value, raw_value, offset);
}
static const char *
@@ -1045,7 +1045,7 @@ g_mime_message_new (gboolean pretty_headers)
/* Populate with the "standard" rfc822 headers so we can have a standard order */
headers = ((GMimeObject *) message)->headers;
for (i = 0; i < G_N_ELEMENTS (rfc822_headers); i++)
- g_mime_header_list_set_value (headers, rfc822_headers[i], NULL);
+ g_mime_header_list_set (headers, rfc822_headers[i], NULL);
}
return message;
@@ -1161,7 +1161,7 @@ sync_internet_address_list (InternetAddressList *list, GMimeMessage *message, co
char *string;
string = internet_address_list_to_string (list, TRUE);
- g_mime_header_list_set_value (object->headers, name, string);
+ g_mime_header_list_set (object->headers, name, string);
g_free (string);
}
diff --git a/gmime/gmime-object.c b/gmime/gmime-object.c
index faf7773..7965d3e 100644
--- a/gmime/gmime-object.c
+++ b/gmime/gmime-object.c
@@ -213,7 +213,7 @@ content_type_changed (GMimeContentType *content_type, gpointer args, GMimeObject
g_string_free (string, FALSE);
type = p + strlen ("Content-Type: ");
- g_mime_header_list_set_value (object->headers, "Content-Type", type);
+ g_mime_header_list_set (object->headers, "Content-Type", type);
g_free (p);
}
@@ -246,7 +246,7 @@ content_disposition_changed (GMimeContentDisposition *disposition, gpointer args
if (object->disposition) {
str = g_mime_content_disposition_to_string (object->disposition, FALSE);
- g_mime_header_list_set_value (object->headers, "Content-Disposition", str);
+ g_mime_header_list_set (object->headers, "Content-Disposition", str);
g_free (str);
} else {
g_mime_header_list_remove (object->headers, "Content-Disposition");
@@ -775,7 +775,7 @@ process_header (GMimeObject *object, const char *header, const char *value, cons
return FALSE;
}
- _g_mime_header_list_set_value (object->headers, header, value, raw_value, offset);
+ _g_mime_header_list_set (object->headers, header, value, raw_value, offset);
return TRUE;
}
@@ -857,7 +857,7 @@ static void
object_set_header (GMimeObject *object, const char *header, const char *value, const char *raw_value, gint64
offset)
{
if (!process_header (object, header, value, raw_value, offset))
- _g_mime_header_list_set_value (object->headers, header, value, raw_value, offset);
+ _g_mime_header_list_set (object->headers, header, value, raw_value, offset);
}
@@ -893,7 +893,7 @@ g_mime_object_set_header (GMimeObject *object, const char *header, const char *v
static const char *
object_get_header (GMimeObject *object, const char *header)
{
- return g_mime_header_list_get_value (object->headers, header);
+ return g_mime_header_list_get (object->headers, header);
}
diff --git a/gmime/gmime-part.c b/gmime/gmime-part.c
index 8f3ff42..fa14161 100644
--- a/gmime/gmime-part.c
+++ b/gmime/gmime-part.c
@@ -240,7 +240,7 @@ mime_part_set_header (GMimeObject *object, const char *header, const char *value
if (!process_header (object, header, value))
GMIME_OBJECT_CLASS (parent_class)->set_header (object, header, value, raw_value, offset);
else
- _g_mime_header_list_set_value (object->headers, header, value, raw_value, offset);
+ _g_mime_header_list_set (object->headers, header, value, raw_value, offset);
}
static gboolean
@@ -500,7 +500,7 @@ g_mime_part_set_content_description (GMimePart *mime_part, const char *descripti
g_free (mime_part->content_description);
mime_part->content_description = g_strdup (description);
- g_mime_header_list_set_value (GMIME_OBJECT (mime_part)->headers, "Content-Description", description);
+ g_mime_header_list_set (GMIME_OBJECT (mime_part)->headers, "Content-Description", description);
}
@@ -613,7 +613,7 @@ g_mime_part_set_content_md5 (GMimePart *mime_part, const char *content_md5)
}
mime_part->content_md5 = g_strdup (content_md5);
- g_mime_header_list_set_value (GMIME_OBJECT (mime_part)->headers, "Content-Md5", content_md5);
+ g_mime_header_list_set (GMIME_OBJECT (mime_part)->headers, "Content-Md5", content_md5);
}
@@ -711,7 +711,7 @@ g_mime_part_set_content_location (GMimePart *mime_part, const char *content_loca
g_free (mime_part->content_location);
mime_part->content_location = g_strdup (content_location);
- g_mime_header_list_set_value (GMIME_OBJECT (mime_part)->headers, "Content-Location",
content_location);
+ g_mime_header_list_set (GMIME_OBJECT (mime_part)->headers, "Content-Location", content_location);
}
@@ -750,7 +750,7 @@ g_mime_part_set_content_encoding (GMimePart *mime_part, GMimeContentEncoding enc
value = g_mime_content_encoding_to_string (encoding);
mime_part->encoding = encoding;
- g_mime_header_list_set_value (GMIME_OBJECT (mime_part)->headers, "Content-Transfer-Encoding", value);
+ g_mime_header_list_set (GMIME_OBJECT (mime_part)->headers, "Content-Transfer-Encoding", value);
}
diff --git a/tests/test-headers.c b/tests/test-headers.c
index a4b47a6..99310a4 100644
--- a/tests/test-headers.c
+++ b/tests/test-headers.c
@@ -135,7 +135,7 @@ test_remove (void)
throw (exception_new ("expected second Received header"));
/* make sure that the internal hash table was properly updated */
- if (!(value = g_mime_header_list_get_value (list, "Received")))
+ if (!(value = g_mime_header_list_get (list, "Received")))
throw (exception_new ("lookup of Received header failed"));
if (strcmp (initial[1].value, value) != 0)
@@ -151,7 +151,7 @@ test_remove (void)
/* remove the last header */
g_mime_header_list_remove (list, "Message-Id");
- if ((value = g_mime_header_list_get_value (list, "Message-Id")) != NULL)
+ if ((value = g_mime_header_list_get (list, "Message-Id")) != NULL)
throw (exception_new ("lookup of Message-Id should have failed"));
testsuite_check_passed ();
@@ -188,7 +188,7 @@ test_remove_at (void)
throw (exception_new ("expected second Received header"));
/* make sure that the internal hash table was properly updated */
- if (!(value = g_mime_header_list_get_value (list, "Received")))
+ if (!(value = g_mime_header_list_get (list, "Received")))
throw (exception_new ("lookup of Received header failed"));
if (strcmp (initial[1].value, value) != 0)
@@ -205,7 +205,7 @@ test_remove_at (void)
count = g_mime_header_list_get_count (list);
g_mime_header_list_remove_at (list, count - 1);
- if ((value = g_mime_header_list_get_value (list, "Message-Id")) != NULL)
+ if ((value = g_mime_header_list_get (list, "Message-Id")) != NULL)
throw (exception_new ("lookup of Message-Id should have failed"));
testsuite_check_passed ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]