[vala/0.44] libsoup-2.4: soup_auth_new is not a constructor but a factory method



commit 4ec57de39cc0a452b4d6be10cb88116d11e8c110
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Aug 21 20:29:07 2019 +0200

    libsoup-2.4: soup_auth_new is not a constructor but a factory method
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/791

 vapi/libsoup-2.4.vapi           | 3 ++-
 vapi/metadata/Soup-2.4.metadata | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/vapi/libsoup-2.4.vapi b/vapi/libsoup-2.4.vapi
index a304cdef7..fc5f08161 100644
--- a/vapi/libsoup-2.4.vapi
+++ b/vapi/libsoup-2.4.vapi
@@ -148,7 +148,7 @@ namespace Soup {
        [CCode (cheader_filename = "libsoup/soup.h", type_id = "soup_auth_get_type ()")]
        public abstract class Auth : GLib.Object {
                [CCode (has_construct_function = false)]
-               public Auth (GLib.Type type, Soup.Message msg, string auth_header);
+               protected Auth ();
                public virtual void authenticate (string username, string password);
                [Version (since = "2.54")]
                public virtual bool can_authenticate ();
@@ -163,6 +163,7 @@ namespace Soup {
                public void has_saved_password (string username, string password);
                [Version (since = "2.42")]
                public virtual bool is_ready (Soup.Message msg);
+               public static Soup.Auth? @new (GLib.Type type, Soup.Message msg, string auth_header);
                public void save_password (string username, string password);
                public virtual bool update (Soup.Message msg, GLib.HashTable<void*,void*> auth_header);
                [NoAccessorMethod]
diff --git a/vapi/metadata/Soup-2.4.metadata b/vapi/metadata/Soup-2.4.metadata
index da6595643..0bb012ddf 100644
--- a/vapi/metadata/Soup-2.4.metadata
+++ b/vapi/metadata/Soup-2.4.metadata
@@ -18,6 +18,9 @@ ProxyResolver deprecated_since="2.28" replacement="ProxyURIResolver"
 
 // Report upstream
 add_* skip=false type="unowned GLib.TimeoutSource"
+Auth
+       // Factory method
+       .new symbol_type="function"
 AuthDomain
        .accepts#method name="accepts_authorization"
 AuthDomainBasic.new skip=false


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