summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Noël <corentin@elementary.io>2018-03-29 23:28:03 +0100
committerCorentin Noël <corentin@elementary.io>2018-03-29 23:31:22 +0100
commit7843320493f1cb2bdabd5fb6a57d7c967e6ba7f6 (patch)
treef68b8f17bb76e971a37e8688bbd450d7b83cbdf0
parentd28962ff4d5020a9b906f5492acad69b533be2d1 (diff)
downloadlibsoup-tintou/wip/auth-domain.tar.gz
SoupAuthDomain: assign right types to subclass methods and fix introspectiontintou/wip/auth-domain
-rw-r--r--libsoup/Soup-2.4-custom.vala10
-rw-r--r--libsoup/Soup-2.4.metadata5
-rw-r--r--libsoup/soup-auth-domain-basic.c14
-rw-r--r--libsoup/soup-auth-domain-digest.c14
-rw-r--r--libsoup/soup-auth-domain.c12
5 files changed, 36 insertions, 19 deletions
diff --git a/libsoup/Soup-2.4-custom.vala b/libsoup/Soup-2.4-custom.vala
index 95c2ad93..18e53a92 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 43b6d04d..f1b8ad77 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 aef2f68a..ea323d9a 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 8bdb5613..9e3a1213 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 06c9e643..8a55e67a 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
*