[libsoup] Clean up GI annotations and VAPI metadata



commit 9538e44f08f2d55e00ec57921143464c7d5b95ca
Author: Patrick Griffis <pgriffis igalia com>
Date:   Sun Aug 8 13:44:07 2021 -0500

    Clean up GI annotations and VAPI metadata

 libsoup/Soup-3.0.metadata                      | 41 +++++++++++---------------
 libsoup/auth/soup-auth.c                       |  2 +-
 libsoup/content-sniffer/soup-content-sniffer.c |  2 +-
 libsoup/server/soup-auth-domain-basic.c        |  2 +-
 libsoup/server/soup-auth-domain-digest.c       |  2 +-
 libsoup/server/soup-message-body.c             |  2 +-
 libsoup/soup-session.c                         | 18 +++++------
 7 files changed, 32 insertions(+), 37 deletions(-)
---
diff --git a/libsoup/Soup-3.0.metadata b/libsoup/Soup-3.0.metadata
index 1d8bf0d3..b5d6b075 100644
--- a/libsoup/Soup-3.0.metadata
+++ b/libsoup/Soup-3.0.metadata
@@ -1,32 +1,27 @@
-// Vala-specific
+// Behave like Soup.Form is a class with methods
 form_* parent="Soup.Form" name="form_(.+)"
+form_* skip=false
 form_encode_datalist.form_data_set type_arguments="string"
+
+// Enum prefix differs from type name
 HTTPVersion.http_* name="http_(.+)"
 
-// Report upstream
-Auth
-       // Factory method
-       .new symbol_type="function"
-AuthDomain
-       .accepts#method name="accepts_authorization"
+// Conflicts with signal method
+AuthDomain.accepts#method name="accepts_authorization"
+
+Message
+    // Vala can use these C style methods
+    .add_header_handler skip=false
+    .add_status_code_handler skip=false
+
+// Constructor overrides
+Server.new skip=false
+Session.new_with_options skip=false
 AuthDomainBasic.new skip=false
 AuthDomainDigest.new skip=false
-ContentSniffer.sniff.params nullable
-form_* skip=false
-Message
-       .add_header_handler skip=false
-       .add_status_code_handler skip=false
-       .request_*#property skip
-       .response_*#property skip
-Server
-       .new skip=false
-Session
-       .send_async.cancellable#parameter default=null
-Session*.new_with_options skip=false
+// Factory method
+Auth.new symbol_type="function"
 
-// Not enough GIR information
-MessageBody.data type="uint8[]" array_length_field="length"
 
 // Simplify memory management
-MessageBody
-  .append deprecated_since="2.32" replacement="MessageBody.append_take"
+MessageBody.append deprecated_since="2.32" replacement="MessageBody.append_take"
diff --git a/libsoup/auth/soup-auth.c b/libsoup/auth/soup-auth.c
index ff47113a..d9bf4afe 100644
--- a/libsoup/auth/soup-auth.c
+++ b/libsoup/auth/soup-auth.c
@@ -243,7 +243,7 @@ soup_auth_class_init (SoupAuthClass *auth_class)
 }
 
 /**
- * soup_auth_new:
+ * soup_auth_new: (constructor)
  * @type: the type of auth to create (a subtype of #SoupAuth)
  * @msg: the #SoupMessage the auth is being created for
  * @auth_header: the WWW-Authenticate/Proxy-Authenticate header
diff --git a/libsoup/content-sniffer/soup-content-sniffer.c b/libsoup/content-sniffer/soup-content-sniffer.c
index 7721b8c2..243d52e8 100644
--- a/libsoup/content-sniffer/soup-content-sniffer.c
+++ b/libsoup/content-sniffer/soup-content-sniffer.c
@@ -784,7 +784,7 @@ sniff_feed_or_html (SoupContentSniffer *sniffer, GBytes *buffer)
  * @sniffer: a #SoupContentSniffer
  * @msg: the message to sniff
  * @buffer: a buffer containing the start of @msg's response body
- * @params: (element-type utf8 utf8) (out) (transfer full) (allow-none): return
+ * @params: (element-type utf8 utf8) (out) (transfer full) (nullable): return
  *   location for Content-Type parameters (eg, "charset"), or %NULL
  *
  * Sniffs @buffer to determine its Content-Type. The result may also
diff --git a/libsoup/server/soup-auth-domain-basic.c b/libsoup/server/soup-auth-domain-basic.c
index 5e9f49c1..24a3c22d 100644
--- a/libsoup/server/soup-auth-domain-basic.c
+++ b/libsoup/server/soup-auth-domain-basic.c
@@ -114,7 +114,7 @@ soup_auth_domain_basic_get_property (GObject *object, guint prop_id,
 }
 
 /**
- * soup_auth_domain_basic_new:
+ * soup_auth_domain_basic_new: (constructor)
  * @optname1: name of first option, or %NULL
  * @...: option name/value pairs
  *
diff --git a/libsoup/server/soup-auth-domain-digest.c b/libsoup/server/soup-auth-domain-digest.c
index 7968b3b7..4011babf 100644
--- a/libsoup/server/soup-auth-domain-digest.c
+++ b/libsoup/server/soup-auth-domain-digest.c
@@ -118,7 +118,7 @@ soup_auth_domain_digest_get_property (GObject *object, guint prop_id,
 }
 
 /**
- * soup_auth_domain_digest_new:
+ * soup_auth_domain_digest_new: (constructor)
  * @optname1: name of first option, or %NULL
  * @...: option name/value pairs
  *
diff --git a/libsoup/server/soup-message-body.c b/libsoup/server/soup-message-body.c
index ba451fd8..2ab837bc 100644
--- a/libsoup/server/soup-message-body.c
+++ b/libsoup/server/soup-message-body.c
@@ -39,7 +39,7 @@
 
 /**
  * SoupMessageBody:
- * @data: the data
+ * @data: (array length=length) (element-type guint8): the data
  * @length: length of @data
  *
  * A #SoupMessage request or response body.
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index 89183195..bc595faa 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -3328,8 +3328,8 @@ soup_session_return_error_if_message_already_in_queue (SoupSession         *sess
  * @session: a #SoupSession
  * @msg: a #SoupMessage
  * @io_priority: the I/O priority of the request
- * @cancellable: a #GCancellable
- * @callback: the callback to invoke
+ * @cancellable: (nullable): a #GCancellable
+ * @callback: (scope async): the callback to invoke
  * @user_data: data for @callback
  *
  * Asynchronously sends @msg and waits for the beginning of a
@@ -3418,7 +3418,7 @@ soup_session_send_finish (SoupSession   *session,
  * soup_session_send:
  * @session: a #SoupSession
  * @msg: a #SoupMessage
- * @cancellable: a #GCancellable
+ * @cancellable: (nullable): a #GCancellable
  * @error: return location for a #GError, or %NULL
  *
  * Synchronously sends @msg and waits for the beginning of a response.
@@ -3607,8 +3607,8 @@ send_and_read_stream_ready_cb (SoupSession  *session,
  * @session: a #SoupSession
  * @msg: a #SoupMessage
  * @io_priority: the I/O priority of the request
- * @cancellable: a #GCancellable
- * @callback: the callback to invoke
+ * @cancellable: (nullable): a #GCancellable
+ * @callback: (scope async): the callback to invoke
  * @user_data: data for @callback
  *
  * Asynchronously sends @msg and reads the response body.
@@ -3670,7 +3670,7 @@ soup_session_send_and_read_finish (SoupSession  *session,
  * soup_session_send_and_read:
  * @session: a #SoupSession
  * @msg: a #SoupMessage
- * @cancellable: a #GCancellable
+ * @cancellable: (nullable): a #GCancellable
  * @error: return location for a #GError, or %NULL
  *
  * Synchronously sends @msg and reads the response body.
@@ -3874,8 +3874,8 @@ websocket_connect_async_stop (SoupMessage *msg, gpointer user_data)
  * @protocols: (allow-none) (array zero-terminated=1): a
  *   %NULL-terminated array of protocols supported
  * @io_priority: the I/O priority of the request
- * @cancellable: a #GCancellable
- * @callback: the callback to invoke
+ * @cancellable: (nullable): a #GCancellable
+ * @callback: (scope async): the callback to invoke
  * @user_data: data for @callback
  *
  * Asynchronously creates a #SoupWebsocketConnection to communicate
@@ -4009,7 +4009,7 @@ preconnect_async_complete (SoupMessage *msg,
  * @session: a #SoupSession
  * @msg: a #SoupMessage
  * @io_priority: the I/O priority of the request
- * @cancellable: a #GCancellable
+ * @cancellable: (nullable): a #GCancellable
  * @callback: (allow-none) (scope async): the callback to invoke when the operation finishes
  * @user_data: data for @progress_callback and @callback
  *


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