[evolution-data-server/tintou/camel-medium-nullable] M!88 - Camel: Add missing nullable annotations to Medium and MimePart




commit 9938ffb58b645af2a0af4d5143784604feafadd8
Author: Corentin Noël <corentin noel collabora com>
Date:   Tue Nov 30 09:27:24 2021 +0100

    M!88 - Camel: Add missing nullable annotations to Medium and MimePart
    
    This allows the user to know that some function might return NULL and the
    introspected languages to actually handle the NULL cases.
    
    Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/88

 src/camel/camel-medium.c    |  6 +++---
 src/camel/camel-mime-part.c | 28 ++++++++++++++--------------
 2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/src/camel/camel-medium.c b/src/camel/camel-medium.c
index 799b07527..87144b783 100644
--- a/src/camel/camel-medium.c
+++ b/src/camel/camel-medium.c
@@ -188,7 +188,7 @@ camel_medium_add_header (CamelMedium *medium,
  * camel_medium_set_header:
  * @medium: a #CamelMedium object
  * @name: name of the header
- * @value: value of the header
+ * @value: (nullable): value of the header
  *
  * Sets the value of a header.  Any other occurances of the header
  * will be removed.  Setting a %NULL header can be used to remove
@@ -330,7 +330,7 @@ camel_medium_get_headers (CamelMedium *medium)
  * without its headers.
  *
  * Returns: (transfer none) (nullable): a #CamelDataWrapper containing
- * @medium's content. Can return NULL.
+ * @medium's content. Can return %NULL.
  **/
 CamelDataWrapper *
 camel_medium_get_content (CamelMedium *medium)
@@ -349,7 +349,7 @@ camel_medium_get_content (CamelMedium *medium)
 /**
  * camel_medium_set_content:
  * @medium: a #CamelMedium object
- * @content: a #CamelDataWrapper object
+ * @content: (nullable): a #CamelDataWrapper object
  *
  * Sets the content of @medium to be @content.
  **/
diff --git a/src/camel/camel-mime-part.c b/src/camel/camel-mime-part.c
index e6c5229f7..c1526d72b 100644
--- a/src/camel/camel-mime-part.c
+++ b/src/camel/camel-mime-part.c
@@ -1154,7 +1154,7 @@ camel_mime_part_set_content (CamelMimePart *mime_part,
  * Get the disposition of the MIME part as a structure.
  * Returned pointer is owned by @mime_part.
  *
- * Returns: the disposition structure
+ * Returns: (nullable): the disposition structure
  *
  * Since: 2.30
  **/
@@ -1172,7 +1172,7 @@ camel_mime_part_get_content_disposition (CamelMimePart *mime_part)
  *
  * Get the content-id field of a MIME part.
  *
- * Returns: the content-id field of the MIME part
+ * Returns: (nullable): the content-id field of the MIME part
  **/
 const gchar *
 camel_mime_part_get_content_id (CamelMimePart *mime_part)
@@ -1185,7 +1185,7 @@ camel_mime_part_get_content_id (CamelMimePart *mime_part)
 /**
  * camel_mime_part_set_content_id:
  * @mime_part: a #CamelMimePart
- * @contentid: content id
+ * @contentid: (nullable): content id
  *
  * Set the content-id field on a MIME part.
  **/
@@ -1220,7 +1220,7 @@ camel_mime_part_set_content_id (CamelMimePart *mime_part,
  *
  * Get the content-location field of a MIME part.
  *
- * Returns: the content-location field of a MIME part
+ * Returns: (nullable): the content-location field of a MIME part
  **/
 const gchar *
 camel_mime_part_get_content_location (CamelMimePart *mime_part)
@@ -1233,7 +1233,7 @@ camel_mime_part_get_content_location (CamelMimePart *mime_part)
 /**
  * camel_mime_part_set_content_location:
  * @mime_part: a #CamelMimePart
- * @location: the content-location value of the MIME part
+ * @location: (nullable): the content-location value of the MIME part
  *
  * Set the content-location field of the MIME part.
  **/
@@ -1259,7 +1259,7 @@ camel_mime_part_set_content_location (CamelMimePart *mime_part,
  *
  * Get the content-md5 field of the MIME part.
  *
- * Returns: the content-md5 field of the MIME part
+ * Returns: (nullable): the content-md5 field of the MIME part
  **/
 const gchar *
 camel_mime_part_get_content_md5 (CamelMimePart *mime_part)
@@ -1272,7 +1272,7 @@ camel_mime_part_get_content_md5 (CamelMimePart *mime_part)
 /**
  * camel_mime_part_set_content_md5:
  * @mime_part: a #CamelMimePart
- * @md5sum: the md5sum of the MIME part
+ * @md5sum: (nullable): the md5sum of the MIME part
  *
  * Set the content-md5 field of the MIME part.
  **/
@@ -1295,7 +1295,7 @@ camel_mime_part_set_content_md5 (CamelMimePart *mime_part,
  *
  * Get the Content-Languages set on the MIME part.
  *
- * Returns: (element-type utf8) (transfer none): a #GList of languages
+ * Returns: (element-type utf8) (transfer none) (nullable): a #GList of languages
  **/
 const GList *
 camel_mime_part_get_content_languages (CamelMimePart *mime_part)
@@ -1308,7 +1308,7 @@ camel_mime_part_get_content_languages (CamelMimePart *mime_part)
 /**
  * camel_mime_part_set_content_languages:
  * @mime_part: a #CamelMimePart
- * @content_languages: (element-type utf8): list of languages
+ * @content_languages: (element-type utf8) (nullable): list of languages
  *
  * Set the Content-Languages field of a MIME part.
  **/
@@ -1333,7 +1333,7 @@ camel_mime_part_set_content_languages (CamelMimePart *mime_part,
  *
  * Get the Content-Type of a MIME part.
  *
- * Returns: (transfer none): the parsed #CamelContentType of the MIME part
+ * Returns: (transfer none) (nullable): the parsed #CamelContentType of the MIME part
  **/
 CamelContentType *
 camel_mime_part_get_content_type (CamelMimePart *mime_part)
@@ -1350,7 +1350,7 @@ camel_mime_part_get_content_type (CamelMimePart *mime_part)
 /**
  * camel_mime_part_set_content_type:
  * @mime_part: a #CamelMimePart
- * @content_type: content-type string
+ * @content_type: (nullable): content-type string
  *
  * Set the content-type on a MIME part.
  **/
@@ -1373,7 +1373,7 @@ camel_mime_part_set_content_type (CamelMimePart *mime_part,
  *
  * Get the description of the MIME part.
  *
- * Returns: the description
+ * Returns: (nullable): the description
  **/
 const gchar *
 camel_mime_part_get_description (CamelMimePart *mime_part)
@@ -1415,7 +1415,7 @@ camel_mime_part_set_description (CamelMimePart *mime_part,
  *
  * Get the disposition of the MIME part.
  *
- * Returns: the disposition
+ * Returns: (nullable): the disposition
  **/
 const gchar *
 camel_mime_part_get_disposition (CamelMimePart *mime_part)
@@ -1431,7 +1431,7 @@ camel_mime_part_get_disposition (CamelMimePart *mime_part)
 /**
  * camel_mime_part_set_disposition:
  * @mime_part: a #CamelMimePart
- * @disposition: disposition of the MIME part
+ * @disposition: (nullable): disposition of the MIME part
  *
  * Set a disposition on the MIME part.
  **/


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