[libsoup/wip/tintou/auth-domain] SoupAuthDomain: assign right types to subclass methods and fix introspection



commit 737477508fdb1e97787fe15a67d33873488d3d9b
Author: Corentin Noël <corentin elementary io>
Date:   Thu Mar 29 23:28:03 2018 +0100

    SoupAuthDomain: assign right types to subclass methods and fix introspection

 libsoup/Soup-2.4-custom.vala      |   10 ----------
 libsoup/Soup-2.4.metadata         |    5 +----
 libsoup/soup-auth-domain-basic.c  |   14 ++++++++++++--
 libsoup/soup-auth-domain-digest.c |   14 ++++++++++++--
 libsoup/soup-auth-domain.c        |   12 +++++++++++-
 5 files changed, 36 insertions(+), 19 deletions(-)
---
diff --git a/libsoup/Soup-2.4-custom.vala b/libsoup/Soup-2.4-custom.vala
index 95c2ad9..18e53a9 100644
--- a/libsoup/Soup-2.4-custom.vala
+++ b/libsoup/Soup-2.4-custom.vala
@@ -1,14 +1,4 @@
 namespace Soup {
-       [CCode (type_id = "soup_auth_domain_basic_get_type ()", cheader_filename = "libsoup/soup.h")]
-       public class AuthDomainBasic : Soup.AuthDomain {
-               public static void set_auth_callback (Soup.AuthDomain domain, owned 
Soup.AuthDomainBasicAuthCallback callback);
-       }
-
-       [CCode (type_id = "soup_auth_domain_digest_get_type ()", cheader_filename = "libsoup/soup.h")]
-       public class AuthDomainDigest : Soup.AuthDomain {
-               public static void set_auth_callback (Soup.AuthDomain domain, owned 
Soup.AuthDomainDigestAuthCallback callback);
-       }
-
        [Compact]
        [CCode (copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = 
"soup_buffer_get_type ()", cheader_filename = "libsoup/soup.h")]
        public class Buffer {
diff --git a/libsoup/Soup-2.4.metadata b/libsoup/Soup-2.4.metadata
index 43b6d04..f1b8ad7 100644
--- a/libsoup/Soup-2.4.metadata
+++ b/libsoup/Soup-2.4.metadata
@@ -21,10 +21,7 @@ Requester
 Soup cheader_filename="libsoup/soup.h"
 add_* skip=false type="unowned GLib.TimeoutSource"
 AuthDomain
-       .accepts#method skip
-       .challenge#virtual_method vfunc_name="challenge"
-       .basic_set_auth_callback skip
-       .digest_set_auth_callback skip
+       .accepts#method name="accepts_authorization"
 AuthDomainBasic.new skip=false
 AuthDomainDigest.new skip=false
 Buffer.new.data type="uint8[]" array_length_idx=2
diff --git a/libsoup/soup-auth-domain-basic.c b/libsoup/soup-auth-domain-basic.c
index aef2f68..97a65cc 100644
--- a/libsoup/soup-auth-domain-basic.c
+++ b/libsoup/soup-auth-domain-basic.c
@@ -130,7 +130,7 @@ soup_auth_domain_basic_new (const char *optname1, ...)
 
 /**
  * SoupAuthDomainBasicAuthCallback:
- * @domain: the domain
+ * @domain: (type SoupAuthDomainBasic): the domain
  * @msg: the message being authenticated
  * @username: the username provided by the client
  * @password: the password provided by the client
@@ -156,7 +156,7 @@ soup_auth_domain_basic_new (const char *optname1, ...)
 
 /**
  * soup_auth_domain_basic_set_auth_callback:
- * @domain: the domain
+ * @domain: (type SoupAuthDomainBasic): the domain
  * @callback: the callback
  * @user_data: data to pass to @auth_callback
  * @dnotify: destroy notifier to free @user_data when @domain
@@ -311,6 +311,11 @@ soup_auth_domain_basic_class_init (SoupAuthDomainBasicClass *basic_class)
         * Alias for the #SoupAuthDomainBasic:auth-callback property.
         * (The #SoupAuthDomainBasicAuthCallback.)
         **/
+       /**
+        * SoupAuthDomainBasic:auth-callback: (type SoupAuthDomainBasicAuthCallback)
+        *
+        * The #SoupAuthDomainBasicAuthCallback
+        */
        g_object_class_install_property (
                object_class, PROP_AUTH_CALLBACK,
                g_param_spec_pointer (SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK,
@@ -323,6 +328,11 @@ soup_auth_domain_basic_class_init (SoupAuthDomainBasicClass *basic_class)
         * Alias for the #SoupAuthDomainBasic:auth-data property.
         * (The data to pass to the #SoupAuthDomainBasicAuthCallback.)
         **/
+       /**
+        * SoupAuthDomainBasic:auth-data:
+        *
+        * The data to pass to the #SoupAuthDomainBasicAuthCallback
+        */
        g_object_class_install_property (
                object_class, PROP_AUTH_DATA,
                g_param_spec_pointer (SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA,
diff --git a/libsoup/soup-auth-domain-digest.c b/libsoup/soup-auth-domain-digest.c
index 8bdb561..9e3a121 100644
--- a/libsoup/soup-auth-domain-digest.c
+++ b/libsoup/soup-auth-domain-digest.c
@@ -133,7 +133,7 @@ soup_auth_domain_digest_new (const char *optname1, ...)
 
 /**
  * SoupAuthDomainDigestAuthCallback:
- * @domain: the domain
+ * @domain: (type SoupAuthDomainDigest): the domain
  * @msg: the message being authenticated
  * @username: the username provided by the client
  * @user_data: the data passed to soup_auth_domain_digest_set_auth_callback()
@@ -150,7 +150,7 @@ soup_auth_domain_digest_new (const char *optname1, ...)
 
 /**
  * soup_auth_domain_digest_set_auth_callback:
- * @domain: the domain
+ * @domain: (type SoupAuthDomainDigest): the domain
  * @callback: the callback
  * @user_data: data to pass to @auth_callback
  * @dnotify: destroy notifier to free @user_data when @domain
@@ -417,6 +417,11 @@ soup_auth_domain_digest_class_init (SoupAuthDomainDigestClass *digest_class)
         * Alias for the #SoupAuthDomainDigest:auth-callback property.
         * (The #SoupAuthDomainDigestAuthCallback.)
         **/
+       /**
+        * SoupAuthDomainDigest:auth-callback: (type SoupAuthDomainDigestAuthCallback)
+        *
+        * The #SoupAuthDomainDigestAuthCallback
+        */
        g_object_class_install_property (
                object_class, PROP_AUTH_CALLBACK,
                g_param_spec_pointer (SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK,
@@ -429,6 +434,11 @@ soup_auth_domain_digest_class_init (SoupAuthDomainDigestClass *digest_class)
         * Alias for the #SoupAuthDomainDigest:auth-callback property.
         * (The #SoupAuthDomainDigestAuthCallback.)
         **/
+       /**
+        * SoupAuthDomainDigest:auth-data:
+        *
+        * The data to pass to the #SoupAuthDomainDigestAuthCallback
+        */
        g_object_class_install_property (
                object_class, PROP_AUTH_DATA,
                g_param_spec_pointer (SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA,
diff --git a/libsoup/soup-auth-domain.c b/libsoup/soup-auth-domain.c
index 06c9e64..8a55e67 100644
--- a/libsoup/soup-auth-domain.c
+++ b/libsoup/soup-auth-domain.c
@@ -242,6 +242,11 @@ soup_auth_domain_class_init (SoupAuthDomainClass *auth_domain_class)
         * Alias for the #SoupAuthDomain:filter property. (The
         * #SoupAuthDomainFilter for the domain.)
         **/
+       /**
+        * SoupAuthDomain:filter: (type SoupAuthDomainFilter)
+        *
+        * The #SoupAuthDomainFilter for the domain
+        */
        g_object_class_install_property (
                object_class, PROP_FILTER,
                g_param_spec_pointer (SOUP_AUTH_DOMAIN_FILTER,
@@ -254,6 +259,11 @@ soup_auth_domain_class_init (SoupAuthDomainClass *auth_domain_class)
         * Alias for the #SoupAuthDomain:filter-data property. (Data
         * to pass to the #SoupAuthDomainFilter.)
         **/
+       /**
+        * SoupAuthDomain:generic-auth-callback: (type SoupAuthDomainGenericAuthCallback)
+        *
+        * The #SoupAuthDomainGenericAuthCallback for the domain
+        */
        g_object_class_install_property (
                object_class, PROP_FILTER_DATA,
                g_param_spec_pointer (SOUP_AUTH_DOMAIN_FILTER_DATA,
@@ -587,7 +597,7 @@ soup_auth_domain_accepts (SoupAuthDomain *domain, SoupMessage *msg)
 }
 
 /**
- * soup_auth_domain_challenge:
+ * soup_auth_domain_challenge: (virtual challenge)
  * @domain: a #SoupAuthDomain
  * @msg: a #SoupMessage
  *


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