[evolution-data-server/wip/camel-more-gobject] Rename camel_medium_get_headers() to camel_medium_dup_headers()



commit 7ddf0793569c06d2bf8e85c79a6316737a30bbfd
Author: Milan Crha <mcrha redhat com>
Date:   Tue Nov 1 12:39:39 2016 +0100

    Rename camel_medium_get_headers() to camel_medium_dup_headers()

 src/camel/camel-medium.c           |   10 +++++-----
 src/camel/camel-medium.h           |    4 ++--
 src/camel/camel-mime-part.c        |    4 ++--
 src/camel/camel-name-value-array.c |    6 +++---
 src/camel/camel-search-private.c   |    2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/camel/camel-medium.c b/src/camel/camel-medium.c
index 7a705b3..c4a9767 100644
--- a/src/camel/camel-medium.c
+++ b/src/camel/camel-medium.c
@@ -256,7 +256,7 @@ camel_medium_remove_header (CamelMedium *medium,
  *
  * If the header occurs more than once, only retrieve the first
  * instance of the header.  For multi-occuring headers, use
- * :get_headers().
+ * camel_medium_dup_headers().
  *
  * Returns: (nullable): the value of the named header, or %NULL
  **/
@@ -276,7 +276,7 @@ camel_medium_get_header (CamelMedium *medium,
 }
 
 /**
- * camel_medium_get_headers:
+ * camel_medium_dup_headers:
  * @medium: a #CamelMedium object
  *
  * Gets an array of all header name/value pairs. The values will be
@@ -285,16 +285,16 @@ camel_medium_get_header (CamelMedium *medium,
  * Returns: (transfer full): the array of headers, which must be freed with camel_name_value_array_free().
  **/
 CamelNameValueArray *
-camel_medium_get_headers (CamelMedium *medium)
+camel_medium_dup_headers (CamelMedium *medium)
 {
        CamelMediumClass *class;
 
        g_return_val_if_fail (CAMEL_IS_MEDIUM (medium), NULL);
 
        class = CAMEL_MEDIUM_GET_CLASS (medium);
-       g_return_val_if_fail (class->get_headers != NULL, NULL);
+       g_return_val_if_fail (class->dup_headers != NULL, NULL);
 
-       return class->get_headers (medium);
+       return class->dup_headers (medium);
 }
 
 /**
diff --git a/src/camel/camel-medium.h b/src/camel/camel-medium.h
index c3eef65..b509ae4 100644
--- a/src/camel/camel-medium.h
+++ b/src/camel/camel-medium.h
@@ -73,7 +73,7 @@ struct _CamelMediumClass {
        const gchar *   (*get_header)           (CamelMedium *medium,
                                                 const gchar *name);
        CamelNameValueArray *
-                       (*get_headers)          (CamelMedium *medium);
+                       (*dup_headers)          (CamelMedium *medium);
        CamelDataWrapper *
                        (*get_content)          (CamelMedium *medium);
        void            (*set_content)          (CamelMedium *medium,
@@ -92,7 +92,7 @@ void          camel_medium_remove_header      (CamelMedium *medium,
 const gchar *  camel_medium_get_header         (CamelMedium *medium,
                                                 const gchar *name);
 CamelNameValueArray *
-               camel_medium_get_headers        (CamelMedium *medium);
+               camel_medium_dup_headers        (CamelMedium *medium);
 CamelDataWrapper *
                camel_medium_get_content        (CamelMedium *medium);
 void           camel_medium_set_content        (CamelMedium *medium,
diff --git a/src/camel/camel-mime-part.c b/src/camel/camel-mime-part.c
index 8c5350c..ffc48e4 100644
--- a/src/camel/camel-mime-part.c
+++ b/src/camel/camel-mime-part.c
@@ -515,7 +515,7 @@ mime_part_get_header (CamelMedium *medium,
 }
 
 static CamelNameValueArray *
-mime_part_get_headers (CamelMedium *medium)
+mime_part_dup_headers (CamelMedium *medium)
 {
        CamelMimePart *part = (CamelMimePart *) medium;
        CamelNameValueArray *headers;
@@ -1035,7 +1035,7 @@ camel_mime_part_class_init (CamelMimePartClass *class)
        medium_class->set_header = mime_part_set_header;
        medium_class->remove_header = mime_part_remove_header;
        medium_class->get_header = mime_part_get_header;
-       medium_class->get_headers = mime_part_get_headers;
+       medium_class->dup_headers = mime_part_dup_headers;
        medium_class->set_content = mime_part_set_content;
 
        data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (class);
diff --git a/src/camel/camel-name-value-array.c b/src/camel/camel-name-value-array.c
index 4b76aeb..e66e1d8 100644
--- a/src/camel/camel-name-value-array.c
+++ b/src/camel/camel-name-value-array.c
@@ -53,7 +53,7 @@ free_name_value_content (gpointer ptr)
 /**
  * camel_name_value_array_new:
  *
- * Created a new #CamelNameValueArray. The returned pointer should be freed
+ * Creates a new #CamelNameValueArray. The returned pointer should be freed
  * with camel_name_value_array_free() when no longer needed.
  *
  * Returns: (transfer full): A new #CamelNameValueArray.
@@ -77,7 +77,7 @@ camel_name_value_array_new (void)
  * camel_name_value_array_new_sized:
  * @reserve_size: an array size to reserve
  *
- * Created a new #CamelNameValueArray, which has reserved @reserve_size
+ * Creates a new #CamelNameValueArray, which has reserved @reserve_size
  * elements. This value doesn't influence the camel_name_value_array_get_length(),
  * which returns zero on the array returned from this function. The returned
  * pointer should be freed with camel_name_value_array_free() when no longer needed.
@@ -103,7 +103,7 @@ camel_name_value_array_new_sized (guint reserve_size)
  * camel_name_value_array_copy:
  * @array: (nullable): a #CamelNameValueArray
  *
- * Created a new copy of the @array. The returned pointer should be freed
+ * Creates a new copy of the @array. The returned pointer should be freed
  * with camel_name_value_array_free() when no longer needed.
  *
  * Returns: (transfer full): A new copy of the @array.
diff --git a/src/camel/camel-search-private.c b/src/camel/camel-search-private.c
index 335b388..5d9412b 100644
--- a/src/camel/camel-search-private.c
+++ b/src/camel/camel-search-private.c
@@ -838,7 +838,7 @@ camel_search_get_all_headers_decoded (CamelMimeMessage *message)
        g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
 
        medium = CAMEL_MEDIUM (message);
-       headers = camel_medium_get_headers (medium);
+       headers = camel_medium_dup_headers (medium);
        if (!headers)
                return NULL;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]