[libsoup] Fixes and additions for new introspection scanner



commit 2cbd32b4073412634fcbef1be1297046feb70aba
Author: Dan Winship <danw gnome org>
Date:   Wed Sep 1 22:02:04 2010 -0400

    Fixes and additions for new introspection scanner

 libsoup/soup-address.c            |    4 ++--
 libsoup/soup-auth.c               |    4 ++--
 libsoup/soup-cookie-jar.c         |    3 ++-
 libsoup/soup-cookie.c             |   10 ++++++----
 libsoup/soup-form.c               |   28 ++++++++++++++--------------
 libsoup/soup-headers.c            |   23 +++++++++++++----------
 libsoup/soup-message-body.c       |    6 +++---
 libsoup/soup-message-headers.c    |    2 +-
 libsoup/soup-message.c            |    6 +++---
 libsoup/soup-misc.c               |    8 ++++----
 libsoup/soup-proxy-resolver.h     |   13 ++++++++-----
 libsoup/soup-proxy-uri-resolver.c |    2 +-
 libsoup/soup-proxy-uri-resolver.h |   13 ++++++++-----
 libsoup/soup-value-utils.c        |    6 ++++--
 libsoup/soup-xmlrpc.c             |    4 ++--
 15 files changed, 73 insertions(+), 59 deletions(-)
---
diff --git a/libsoup/soup-address.c b/libsoup/soup-address.c
index 2315cdc..0904687 100644
--- a/libsoup/soup-address.c
+++ b/libsoup/soup-address.c
@@ -456,7 +456,7 @@ soup_address_get_name (SoupAddress *addr)
  * soup_address_is_resolved() to safely test whether or not an address
  * is resolved before fetching its name or address.
  *
- * Return value: (allow-none): the sockaddr, or %NULL
+ * Return value: (allow-none) (transfer none): the sockaddr, or %NULL
  **/
 struct sockaddr *
 soup_address_get_sockaddr (SoupAddress *addr, int *len)
@@ -478,7 +478,7 @@ soup_address_get_sockaddr (SoupAddress *addr, int *len)
  * Creates a new #GSocketAddress corresponding to @addr (which is assumed
  * to only have one socket address associated with it).
  *
- * Return value: a new #GSocketAddress
+ * Return value: (transfer full): a new #GSocketAddress
  */
 GSocketAddress *
 soup_address_get_gsockaddr (SoupAddress *addr)
diff --git a/libsoup/soup-auth.c b/libsoup/soup-auth.c
index 8b4e52b..0b045a5 100644
--- a/libsoup/soup-auth.c
+++ b/libsoup/soup-auth.c
@@ -518,8 +518,8 @@ soup_auth_get_authorization (SoupAuth *auth, SoupMessage *msg)
  * of @auth's protection space, unless otherwise discovered not to
  * be.)
  *
- * Return value: (element-type utf8): the list of paths, which can be freed with
- * soup_auth_free_protection_space().
+ * Return value: (element-type utf8) (transfer full): the list of
+ * paths, which can be freed with soup_auth_free_protection_space().
  **/
 GSList *
 soup_auth_get_protection_space (SoupAuth *auth, SoupURI *source_uri)
diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c
index 8f0e62a..64afd9d 100644
--- a/libsoup/soup-cookie-jar.c
+++ b/libsoup/soup-cookie-jar.c
@@ -618,7 +618,8 @@ request_unqueued (SoupSessionFeature *feature, SoupSession *session,
  * The cookies in the list are a copy of the original, so
  * you have to free them when you are done with them.
  *
- * Return value: a #GSList with all the cookies in the @jar.
+ * Return value: (transfer full): a #GSList with all the cookies in
+ * the @jar.
  *
  * Since: 2.26
  **/
diff --git a/libsoup/soup-cookie.c b/libsoup/soup-cookie.c
index 19fbf66..d73e1b5 100644
--- a/libsoup/soup-cookie.c
+++ b/libsoup/soup-cookie.c
@@ -848,8 +848,9 @@ soup_cookie_free (SoupCookie *cookie)
  * #SoupCookie<!-- -->s. Cookies that do not specify "path" or
  * "domain" attributes will have their values defaulted from @msg.
  *
- * Return value: (element-type SoupCookie): a #GSList of
- * #SoupCookie<!-- -->s, which can be freed with soup_cookies_free().
+ * Return value: (element-type SoupCookie) (transfer full): a #GSList
+ * of #SoupCookie<!-- -->s, which can be freed with
+ * soup_cookies_free().
  *
  * Since: 2.24
  **/
@@ -891,8 +892,9 @@ soup_cookies_from_response (SoupMessage *msg)
  * pass a cookie returned from this method directly to
  * soup_cookies_to_response().)
  *
- * Return value: (element-type SoupCookie): a #GSList of
- * #SoupCookie<!-- -->s, which can be freed with soup_cookies_free().
+ * Return value: (element-type SoupCookie) (transfer full): a #GSList
+ * of #SoupCookie<!-- -->s, which can be freed with
+ * soup_cookies_free().
  *
  * Since: 2.24
  **/
diff --git a/libsoup/soup-form.c b/libsoup/soup-form.c
index 33978ed..1523f5a 100644
--- a/libsoup/soup-form.c
+++ b/libsoup/soup-form.c
@@ -78,9 +78,9 @@ form_decode (char *part)
  * Decodes @form, which is an urlencoded dataset as defined in the
  * HTML 4.01 spec.
  *
- * Return value: (element-type utf8 utf8): a hash table containing the
- * name/value pairs from @encoded_form, which you can free with
- * g_hash_table_destroy().
+ * Return value: (element-type utf8 utf8) (transfer full): a hash
+ * table containing the name/value pairs from @encoded_form, which you
+ * can free with g_hash_table_destroy().
  **/
 GHashTable *
 soup_form_decode (const char *encoded_form)
@@ -116,9 +116,9 @@ soup_form_decode (const char *encoded_form)
  * soup_form_decode_multipart:
  * @msg: a #SoupMessage containing a "multipart/form-data" request body
  * @file_control_name: the name of the HTML file upload control, or %NULL
- * @filename: return location for the name of the uploaded file
- * @content_type: return location for the MIME type of the uploaded file
- * @file: return location for the uploaded file data
+ * @filename: (out): return location for the name of the uploaded file
+ * @content_type: (out): return location for the MIME type of the uploaded file
+ * @file: (out): return location for the uploaded file data
  *
  * Decodes the "multipart/form-data" request in @msg; this is a
  * convenience method for the case when you have a single file upload
@@ -140,10 +140,10 @@ soup_form_decode (const char *encoded_form)
  * need to decode it manually, using soup_multipart_new_from_message()
  * and soup_multipart_get_part().
  *
- * Return value: (element-type utf8 utf8): a hash table containing the
- * name/value pairs (other than @file_control_name) from @msg, which
- * you can free with g_hash_table_destroy(). On error, it will return
- * %NULL.
+ * Return value: (element-type utf8 utf8) (transfer full): a hash
+ * table containing the name/value pairs (other than
+ * @file_control_name) from @msg, which you can free with
+ * g_hash_table_destroy(). On error, it will return %NULL.
  *
  * Since: 2.26
  **/
@@ -398,7 +398,7 @@ soup_form_request_for_data (const char *method, const char *uri_string,
  * the form data into @uri's query field, and if @method is "POST", it
  * will encode it into the %SoupMessage's request_body.)
  *
- * Return value: the new %SoupMessage
+ * Return value: (transfer full): the new %SoupMessage
  **/
 SoupMessage *
 soup_form_request_new (const char *method, const char *uri,
@@ -423,7 +423,7 @@ soup_form_request_new (const char *method, const char *uri,
  * Creates a new %SoupMessage and sets it up to send @form_data_set to
  * @uri via @method, as with soup_form_request_new().
  *
- * Return value: the new %SoupMessage
+ * Return value: (transfer full): the new %SoupMessage
  **/
 SoupMessage *
 soup_form_request_new_from_hash (const char *method, const char *uri,
@@ -442,7 +442,7 @@ soup_form_request_new_from_hash (const char *method, const char *uri,
  * Creates a new %SoupMessage and sets it up to send @form_data_set to
  * @uri via @method, as with soup_form_request_new().
  *
- * Return value: the new %SoupMessage
+ * Return value: (transfer full): the new %SoupMessage
  **/
 SoupMessage *
 soup_form_request_new_from_datalist (const char *method, const char *uri,
@@ -470,7 +470,7 @@ soup_form_request_new_from_datalist (const char *method, const char *uri,
  * soup_form_request_new_from_multipart() to serialize the multipart
  * structure and create a #SoupMessage.
  *
- * Return value: the new %SoupMessage
+ * Return value: (transfer full): the new %SoupMessage
  *
  * Since: 2.26
  **/
diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c
index 2340883..ecc3aec 100644
--- a/libsoup/soup-headers.c
+++ b/libsoup/soup-headers.c
@@ -479,7 +479,8 @@ parse_list (const char *header, char delim)
  * "#something", where "something" does not itself contain commas,
  * except as part of quoted-strings.
  *
- * Return value: a #GSList of list elements, as allocated strings
+ * Return value: (transfer full): a #GSList of list elements, as
+ * allocated strings
  **/
 GSList *
 soup_header_parse_list (const char *header)
@@ -511,8 +512,8 @@ sort_by_qval (const void *a, const void *b)
 /**
  * soup_header_parse_quality_list:
  * @header: a header value
- * @unacceptable: (out) (allow-none): on return, will contain a list of
- * unacceptable values
+ * @unacceptable: (out) (allow-none) (transfer full): on return, will
+ * contain a list of unacceptable values
  *
  * Parses a header whose content is a list of items with optional
  * "qvalue"s (eg, Accept, Accept-Charset, Accept-Encoding,
@@ -522,8 +523,8 @@ sort_by_qval (const void *a, const void *b)
  * items with qvalue 0. Either way, those items will be removed from
  * the main list.
  *
- * Return value: a #GSList of acceptable values (as allocated
- * strings), highest-qvalue first.
+ * Return value: (transfer full): a #GSList of acceptable values (as
+ * allocated strings), highest-qvalue first.
  **/
 GSList *
 soup_header_parse_quality_list (const char *header, GSList **unacceptable)
@@ -598,7 +599,7 @@ soup_header_parse_quality_list (const char *header, GSList **unacceptable)
 }
 
 /**
- * soup_header_free_list:
+ * soup_header_free_list: (skip)
  * @list: a #GSList returned from soup_header_parse_list() or
  * soup_header_parse_quality_list()
  *
@@ -748,8 +749,9 @@ parse_param_list (const char *header, char delim)
  * for giving UTF8-encoded filenames in the Content-Disposition
  * header).
  *
- * Return value: (element-type utf8 utf8): a #GHashTable of list elements, which can be freed
- * with soup_header_free_param_list().
+ * Return value: (element-type utf8 utf8) (transfer full): a
+ * #GHashTable of list elements, which can be freed with
+ * soup_header_free_param_list().
  **/
 GHashTable *
 soup_header_parse_param_list (const char *header)
@@ -773,8 +775,9 @@ soup_header_parse_param_list (const char *header)
  * for giving UTF8-encoded filenames in the Content-Disposition
  * header).
  *
- * Return value: (element-type utf8 utf8): a #GHashTable of list
- * elements, which can be freed with soup_header_free_param_list().
+ * Return value: (element-type utf8 utf8) (transfer full): a
+ * #GHashTable of list elements, which can be freed with
+ * soup_header_free_param_list().
  *
  * Since: 2.24
  **/
diff --git a/libsoup/soup-message-body.c b/libsoup/soup-message-body.c
index 7b4c3b4..a5974d0 100644
--- a/libsoup/soup-message-body.c
+++ b/libsoup/soup-message-body.c
@@ -56,7 +56,7 @@ enum {
 
 /**
  * SoupBuffer:
- * @data: (type pointer): the data
+ * @data: (type gpointer): the data
  * @length: length of @data
  *
  * A data buffer, generally used to represent a chunk of a
@@ -215,7 +215,7 @@ soup_buffer_new_with_owner (gconstpointer  data, gsize length,
  * Gets the "owner" object for a buffer created with
  * soup_buffer_new_with_owner().
  *
- * Return value: the owner pointer
+ * Return value: (transfer none): the owner pointer
  **/
 gpointer
 soup_buffer_get_owner (SoupBuffer *buffer)
@@ -457,7 +457,7 @@ append_buffer (SoupMessageBody *body, SoupBuffer *buffer)
  * soup_message_body_append:
  * @body: a #SoupMessageBody
  * @use: how to use @data
- * @data: (array length=length) (element-type uint8): data to append
+ * @data: (array length=length) (element-type guint8): data to append
  * @length: length of @data
  *
  * Appends @length bytes from @data to @body according to @use.
diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
index 4a72f6a..930a7de 100644
--- a/libsoup/soup-message-headers.c
+++ b/libsoup/soup-message-headers.c
@@ -468,7 +468,7 @@ soup_message_headers_iter_next (SoupMessageHeadersIter *iter,
 /**
  * soup_message_headers_foreach:
  * @hdrs: a #SoupMessageHeaders
- * @func: callback function to run for each header
+ * @func: (scope call): callback function to run for each header
  * @user_data: data to pass to @func
  * 
  * Calls @func once for each header value in @hdrs.
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index 54c96af..cd136a3 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -828,7 +828,7 @@ soup_message_set_request (SoupMessage    *msg,
  * @msg: the message
  * @content_type: (allow-none): MIME Content-Type of the body
  * @resp_use: a #SoupMemoryUse describing how to handle @resp_body
- * @resp_body: (array length=resp_length) (element-type uint8): a data buffer
+ * @resp_body: (array length=resp_length) (element-type guint8): a data buffer
  * containing the body of the message response.
  * @resp_length: the byte length of @resp_body.
  * 
@@ -1216,8 +1216,8 @@ soup_message_set_auth (SoupMessage *msg, SoupAuth *auth)
  *
  * Gets the #SoupAuth used by @msg for authentication.
  *
- * Return value: the #SoupAuth used by @msg for authentication, or
- * %NULL if @msg is unauthenticated.
+ * Return value: (transfer none): the #SoupAuth used by @msg for
+ * authentication, or %NULL if @msg is unauthenticated.
  **/
 SoupAuth *
 soup_message_get_auth (SoupMessage *msg)
diff --git a/libsoup/soup-misc.c b/libsoup/soup-misc.c
index e832c9a..3136645 100644
--- a/libsoup/soup-misc.c
+++ b/libsoup/soup-misc.c
@@ -57,7 +57,7 @@ soup_str_case_equal (gconstpointer v1,
 }
 
 /**
- * soup_add_io_watch:
+ * soup_add_io_watch: (skip)
  * @async_context: (allow-none): the #GMainContext to dispatch the I/O
  * watch in, or %NULL for the default context
  * @chan: the #GIOChannel to watch
@@ -84,7 +84,7 @@ soup_add_io_watch (GMainContext *async_context,
 }
 
 /**
- * soup_add_idle:
+ * soup_add_idle: (skip)
  * @async_context: (allow-none): the #GMainContext to dispatch the I/O
  * watch in, or %NULL for the default context
  * @function: the callback to invoke at idle time
@@ -112,7 +112,7 @@ soup_add_idle (GMainContext *async_context,
 }
 
 /**
- * soup_add_completion:
+ * soup_add_completion: (skip)
  * @async_context: (allow-none): the #GMainContext to dispatch the I/O
  * watch in, or %NULL for the default context
  * @function: the callback to invoke
@@ -140,7 +140,7 @@ soup_add_completion (GMainContext *async_context,
 }
 
 /**
- * soup_add_timeout:
+ * soup_add_timeout: (skip)
  * @async_context: (allow-none): the #GMainContext to dispatch the I/O
  * watch in, or %NULL for the default context
  * @interval: the timeout interval, in milliseconds
diff --git a/libsoup/soup-proxy-resolver.h b/libsoup/soup-proxy-resolver.h
index 161ae76..991219f 100644
--- a/libsoup/soup-proxy-resolver.h
+++ b/libsoup/soup-proxy-resolver.h
@@ -29,11 +29,14 @@ typedef struct {
 	GTypeInterface base;
 
 	/* virtual methods */
-	void (*get_proxy_async) (SoupProxyResolver *, SoupMessage *,
-				 GMainContext *, GCancellable *,
-				 SoupProxyResolverCallback, gpointer);
-	guint (*get_proxy_sync) (SoupProxyResolver *, SoupMessage *,
-				 GCancellable *, SoupAddress **);
+	void (*get_proxy_async) (SoupProxyResolver *proxy_resolver,
+				 SoupMessage *msg, GMainContext *async_context,
+				 GCancellable *cancellable,
+				 SoupProxyResolverCallback callaback,
+				 gpointer user_data);
+	guint (*get_proxy_sync) (SoupProxyResolver *proxy_resolver,
+				 SoupMessage *msg, GCancellable *cancellable,
+				 SoupAddress **addr);
 
 } SoupProxyResolverInterface;
 
diff --git a/libsoup/soup-proxy-uri-resolver.c b/libsoup/soup-proxy-uri-resolver.c
index 155ba66..9abdaf6 100644
--- a/libsoup/soup-proxy-uri-resolver.c
+++ b/libsoup/soup-proxy-uri-resolver.c
@@ -48,7 +48,7 @@ soup_proxy_uri_resolver_get_type (void)
  * @uri: the #SoupURI you want a proxy for
  * @async_context: (allow-none): the #GMainContext to invoke @callback in
  * @cancellable: a #GCancellable, or %NULL
- * @callback: callback to invoke with the proxy address
+ * @callback: (scope async): callback to invoke with the proxy address
  * @user_data: data for @callback
  *
  * Asynchronously determines a proxy URI to use for @msg and calls
diff --git a/libsoup/soup-proxy-uri-resolver.h b/libsoup/soup-proxy-uri-resolver.h
index 669d7f5..1d15b8d 100644
--- a/libsoup/soup-proxy-uri-resolver.h
+++ b/libsoup/soup-proxy-uri-resolver.h
@@ -27,11 +27,14 @@ typedef struct {
 	GTypeInterface base;
 
 	/* virtual methods */
-	void (*get_proxy_uri_async) (SoupProxyURIResolver *, SoupURI *,
-				     GMainContext *, GCancellable *,
-				     SoupProxyURIResolverCallback, gpointer);
-	guint (*get_proxy_uri_sync) (SoupProxyURIResolver *, SoupURI *,
-				     GCancellable *, SoupURI **);
+	void (*get_proxy_uri_async) (SoupProxyURIResolver *proxy_uri_resolver,
+				     SoupURI *uri, GMainContext *async_context,
+				     GCancellable *cancellable,
+				     SoupProxyURIResolverCallback callback,
+				     gpointer user_data);
+	guint (*get_proxy_uri_sync) (SoupProxyURIResolver *proxy_uri_resolver,
+				     SoupURI *uri, GCancellable *cancellable,
+				     SoupURI **proxy_uri);
 
 	/* Padding for future expansion */
 	void (*_libsoup_reserved1) (void);
diff --git a/libsoup/soup-value-utils.c b/libsoup/soup-value-utils.c
index 098dbdd..351b3da 100644
--- a/libsoup/soup-value-utils.c
+++ b/libsoup/soup-value-utils.c
@@ -56,7 +56,8 @@ soup_value_hash_value_free (gpointer val)
  * Creates a #GHashTable whose keys are strings and whose values
  * are #GValue.
  *
- * Return value: (element-type utf8 GValue): a new empty #GHashTable
+ * Return value: (element-type utf8 GValue) (transfer full): a new
+ * empty #GHashTable
  **/
 GHashTable *
 soup_value_hash_new (void)
@@ -94,7 +95,8 @@ soup_value_hash_insert_valist (GHashTable *hash, const char *first_key,
  * with soup_value_hash_insert(), the keys and values are copied
  * rather than being inserted directly.
  *
- * Return value: (element-type utf8 GValue): a new #GHashTable, initialized with the given values
+ * Return value: (element-type utf8 GValue) (transfer full): a new
+ * #GHashTable, initialized with the given values
  **/
 GHashTable *
 soup_value_hash_new_with_vals (const char *first_key, ...)
diff --git a/libsoup/soup-xmlrpc.c b/libsoup/soup-xmlrpc.c
index a3bd34d..ccd2568 100644
--- a/libsoup/soup-xmlrpc.c
+++ b/libsoup/soup-xmlrpc.c
@@ -223,8 +223,8 @@ soup_xmlrpc_request_newv (const char *uri, const char *method_name, va_list args
  * and then a value of the appropriate type, finally terminated by
  * %G_TYPE_INVALID.
  *
- * Return value: a #SoupMessage encoding the indicated XML-RPC
- * request.
+ * Return value: (transfer full): a #SoupMessage encoding the
+ * indicated XML-RPC request.
  **/
 SoupMessage *
 soup_xmlrpc_request_new (const char *uri, const char *method_name, ...)



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