From: Rico Tzschichholz Date: Tue, 14 Mar 2017 14:41:01 +0000 (+0100) Subject: gio-2.0: Add/"Unlock" missing GTask symbols X-Git-Tag: 0.36.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fe6228b9f2db413fd92ca78ccefb904f2f077b3;p=thirdparty%2Fvala.git gio-2.0: Add/"Unlock" missing GTask symbols --- diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi index 367b3d4e4..29f9bfa97 100644 --- a/vapi/gio-2.0.vapi +++ b/vapi/gio-2.0.vapi @@ -2737,6 +2737,8 @@ namespace GLib { [Version (since = "2.36")] public async Task (GLib.Object? source_object, GLib.Cancellable? cancellable = null); [Version (since = "2.36")] + public void attach_source (GLib.Source source, [CCode (type = "GSourceFunc")] GLib.TaskSourceFunc callback); + [Version (since = "2.36")] public unowned GLib.Cancellable get_cancellable (); [Version (since = "2.36")] public bool get_check_cancellable (); @@ -2764,6 +2766,9 @@ namespace GLib { public void* propagate_pointer () throws GLib.Error; [Version (since = "2.36")] public static async void report_error (GLib.Object? source_object, void* source_tag, owned GLib.Error error); + [PrintfFormat] + [Version (since = "2.36")] + public static async void report_new_error (GLib.Object? source_object, void* source_tag, GLib.Quark domain, int code, string format, ...); [Version (since = "2.36")] public void return_boolean (bool result); [Version (since = "2.36")] @@ -2772,9 +2777,16 @@ namespace GLib { public bool return_error_if_cancelled (); [Version (since = "2.36")] public void return_int (ssize_t result); + [PrintfFormat] + [Version (since = "2.36")] + public void return_new_error (GLib.Quark domain, int code, string format, ...); [Version (since = "2.36")] public void return_pointer (owned void* result, GLib.DestroyNotify? result_destroy); [Version (since = "2.36")] + public void run_in_thread (GLib.TaskThreadFunc task_func); + [Version (since = "2.36")] + public void run_in_thread_sync (GLib.TaskThreadFunc task_func); + [Version (since = "2.36")] public void set_check_cancellable (bool check_cancellable); [Version (since = "2.36")] public void set_priority (int priority); @@ -4695,6 +4707,8 @@ namespace GLib { [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] [Version (since = "2.22")] public delegate bool SocketSourceFunc (GLib.Socket socket, GLib.IOCondition condition); + [CCode (cheader_filename = "gio/gio.h", cname = "GSourceFunc", has_target = false)] + public delegate bool TaskSourceFunc (GLib.Task task); [CCode (cheader_filename = "gio/gio.h", has_target = false)] [Version (since = "2.36")] public delegate void TaskThreadFunc (GLib.Task task, GLib.Object source_object, void* task_data, GLib.Cancellable? cancellable = null); diff --git a/vapi/metadata/Gio-2.0-custom.vala b/vapi/metadata/Gio-2.0-custom.vala index aa7d8137c..5e995c3f3 100644 --- a/vapi/metadata/Gio-2.0-custom.vala +++ b/vapi/metadata/Gio-2.0-custom.vala @@ -184,6 +184,8 @@ namespace GLib { public delegate void SimpleActionActivateCallback (SimpleAction action, Variant? parameter); [Version (deprecated_since = "vala-0.26", replacement = "SimplActionChangeStateFunc")] public delegate void SimpleActionChangeStateCallback (SimpleAction action, Variant value); + [CCode (has_target = false, cname = "GSourceFunc")] + public delegate bool TaskSourceFunc (Task task); [CCode (cheader_filename = "gio/gio.h", instance_pos = 6.9)] public delegate GLib.Variant DBusInterfaceGetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name) throws GLib.Error; [CCode (cheader_filename = "gio/gio.h", instance_pos = 7.9)] diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata index 6c856625e..6d4137add 100644 --- a/vapi/metadata/Gio-2.0.metadata +++ b/vapi/metadata/Gio-2.0.metadata @@ -226,6 +226,12 @@ Subprocess .new.error skip .new.argv0 skip .communicate*.cancellable#parameter default=() +Task + .attach_source skip=false + .attach_source.callback type="TaskSourceFunc" + .run_in_thread* skip=false + .report_new_error skip=false printf_format + .return_new_error skip=false printf_format TlsDatabase .create_certificate_handle nullable TlsPassword