]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gio-2.0: Add CancellableSource ctor and update PollableSource ctors
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 8 Jan 2019 12:20:38 +0000 (13:20 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 8 Jan 2019 15:35:54 +0000 (16:35 +0100)
vapi/gio-2.0.vapi
vapi/metadata/Gio-2.0-custom.vala
vapi/metadata/Gio-2.0.metadata

index 7c253ed2376ab2b92d93c1db988c358c88a2dfd8..d663cd17e124581050181b69277262227f9fd69d 100644 (file)
@@ -545,13 +545,16 @@ namespace GLib {
                public void release_fd ();
                public void reset ();
                public bool set_error_if_cancelled () throws GLib.IOError;
-               [Version (since = "2.28")]
+               [Version (deprecated_since = "vala-0.44", replacement = "CancellableSource", since = "2.28")]
                public GLib.CancellableSource source_new ();
                public virtual signal void cancelled ();
        }
        [CCode (cheader_filename = "gio/gio.h", cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")]
        [Compact]
        public class CancellableSource : GLib.Source {
+               [CCode (has_construct_function = false)]
+               [Version (since = "2.28")]
+               public CancellableSource (GLib.Cancellable? cancellable);
                [CCode (cname = "g_source_set_callback")]
                public void set_callback ([CCode (type = "GSourceFunc")] owned GLib.CancellableSourceFunc func);
        }
@@ -2003,10 +2006,12 @@ namespace GLib {
        [CCode (cheader_filename = "gio/gio.h", cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")]
        [Compact]
        public class PollableSource : GLib.Source {
-               [CCode (type = "GSource*")]
+               [CCode (cheader_filename = "gio/gio.h", has_construct_function = false)]
+               [Version (since = "2.28")]
                public PollableSource (GLib.Object pollable_stream);
-               [CCode (type = "GSource*")]
-               public PollableSource.full (GLib.Object pollable_stream, GLib.Source? child_source, GLib.Cancellable? cancellable = null);
+               [CCode (cheader_filename = "gio/gio.h", has_construct_function = false)]
+               [Version (since = "2.34")]
+               public PollableSource.full (GLib.Object pollable_stream, GLib.Source? child_source = null, GLib.Cancellable? cancellable = null);
                [CCode (cname = "g_source_set_callback")]
                public void set_callback ([CCode (type = "GSourceFunc")] owned GLib.PollableSourceFunc func);
        }
index 1909e6b8205c76771ae356ac9bad69602d476285..0fe88c90d355904d9602a866e7d5b9eecaa41fba 100644 (file)
@@ -20,6 +20,11 @@ namespace GLib {
                public weak GLib.SimpleActionChangeStateCallback? change_state;
        }
 
+       public class Cancellable : GLib.Object {
+               [Version (since = "2.28", deprecated_since = "vala-0.44", replacement = "CancellableSource")]
+               public GLib.CancellableSource source_new ();
+       }
+
        [Compact]
        [CCode (cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")]
        public class CancellableSource : GLib.Source {
@@ -95,10 +100,6 @@ namespace GLib {
        [Compact]
        [CCode (cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")]
        public class PollableSource : GLib.Source {
-               [CCode (type = "GSource*")]
-               public PollableSource (GLib.Object pollable_stream);
-               [CCode (type = "GSource*")]
-               public PollableSource.full (GLib.Object pollable_stream, GLib.Source? child_source, GLib.Cancellable? cancellable = null);
                [CCode (cname = "g_source_set_callback")]
                public void set_callback ([CCode (type = "GSourceFunc")] owned PollableSourceFunc func);
        }
index 90e13d290b94f139d391d9ea7d2571904fa3c9a3..6766461c390f5f875d0b0d9afcf73bf5ec880440 100644 (file)
@@ -79,7 +79,7 @@ Cancellable
   .connect.callback type="owned GLib.Func<GLib.Cancellable>"
   .get_current nullable
   .set_error_if_cancelled throws="GLib.IOError"
-  .source_new skip=false type="GLib.CancellableSource"
+  .source_new skip=false parent="GLib.CancellableSource" symbol_type="constructor" name="new"
 Credentials
   .get_native skip=false
 DatagramBased
@@ -309,7 +309,9 @@ OutputMessage
 DBusError errordomain
 DBusSubtreeEnumerateFunc unowned=false skip=false
 ReallocFunc skip=false
-pollable_source_new_full skip
+pollable_source_new parent="GLib.PollableSource" symbol_type="constructor" name="new"
+pollable_source_new_full parent="GLib.PollableSource" symbol_type="constructor" name="new_full"
+  .child_source default=null
 pollable_stream_read
   .buffer type="uint8[]" array_length_idx=2
 
@@ -318,7 +320,6 @@ content_types_get_registered parent="GLib.ContentType" name="list_registered"
 io_modules_* parent="GLib.IOModule" name="io_modules_(.*)"
 io_scheduler_cancel_all_jobs parent="GLib.IOSchedulerJob" name="cancel_all"
 io_scheduler_push_job parent="GLib.IOSchedulerJob" name="push"
-pollable_source_new skip
 network_monitor_get_default skip
 proxy_get_default_for_protocol skip
 proxy_resolver_get_default skip