From: Rico Tzschichholz Date: Wed, 11 Oct 2017 17:14:46 +0000 (+0200) Subject: gio-2.0: Fix FileReadMoreCallback and File.load_partial_contents_async() X-Git-Tag: 0.39.1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e225dae8fed6b51938685cd0aea01c3147e7cb0c;p=thirdparty%2Fvala.git gio-2.0: Fix FileReadMoreCallback and File.load_partial_contents_async() FileReadMoreCallback expects the same target as AsyncReadyCallback here. --- diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi index 76665b015..762f0aa55 100644 --- a/vapi/gio-2.0.vapi +++ b/vapi/gio-2.0.vapi @@ -3463,7 +3463,7 @@ namespace GLib { public abstract bool is_native (); public bool load_contents (GLib.Cancellable? cancellable, [CCode (array_length_cname = "length", array_length_pos = 2.5, array_length_type = "gsize")] out uint8[] contents, out string etag_out) throws GLib.Error; public async bool load_contents_async (GLib.Cancellable? cancellable = null, [CCode (array_length_cname = "length", array_length_pos = 2.5, array_length_type = "gsize")] out uint8[] contents, out string etag_out) throws GLib.Error; - public async bool load_partial_contents_async (GLib.Cancellable? cancellable = null, GLib.FileReadMoreCallback read_more_callback, [CCode (array_length_cname = "length", array_length_pos = 2.5, array_length_type = "gsize")] out uint8[] contents, out string etag_out) throws GLib.Error; + public async bool load_partial_contents_async (GLib.Cancellable? cancellable = null, [CCode (delegate_target_pos = -0.9)] GLib.FileReadMoreCallback read_more_callback, [CCode (array_length_cname = "length", array_length_pos = 2.5, array_length_type = "gsize")] out uint8[] contents, out string etag_out) throws GLib.Error; public abstract bool make_directory (GLib.Cancellable? cancellable = null) throws GLib.Error; [Version (since = "2.38")] public virtual async bool make_directory_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.Error; @@ -4681,8 +4681,8 @@ namespace GLib { public delegate void FileMeasureProgressCallback (bool reporting, uint64 current_size, uint64 num_dirs, uint64 num_files); [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] public delegate void FileProgressCallback (int64 current_num_bytes, int64 total_num_bytes); - [CCode (cheader_filename = "gio/gio.h", has_target = false)] - public delegate bool FileReadMoreCallback (string file_contents, int64 file_size, void* callback_data); + [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] + public delegate bool FileReadMoreCallback (string file_contents, int64 file_size); [CCode (cheader_filename = "gio/gio.h", instance_pos = 2.9)] public delegate bool IOSchedulerJobFunc (GLib.IOSchedulerJob job, GLib.Cancellable? cancellable = null); [CCode (cheader_filename = "gio/gio.h", instance_pos = 1.9)] diff --git a/vapi/metadata/Gio-2.0-custom.vala b/vapi/metadata/Gio-2.0-custom.vala index 768ea4f9f..dd83cbb72 100644 --- a/vapi/metadata/Gio-2.0-custom.vala +++ b/vapi/metadata/Gio-2.0-custom.vala @@ -174,6 +174,7 @@ namespace GLib { [NoWrapper, Version (deprecated_since = "vala-0.16", replacement = "read")] public abstract unowned GLib.FileInputStream read_fn (GLib.Cancellable? cancellable = null) throws GLib.Error; public virtual async bool copy_async (GLib.File destination, GLib.FileCopyFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, GLib.FileProgressCallback? progress_callback = null) throws GLib.Error; + public async bool load_partial_contents_async (GLib.Cancellable? cancellable = null, [CCode (delegate_target_pos = -0.9)] GLib.FileReadMoreCallback read_more_callback, [CCode (array_length_cname = "length", array_length_pos = 2.5, array_length_type = "gsize")] out uint8[] contents, out string etag_out) throws GLib.Error; } public interface Icon : GLib.Object { diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata index 163208075..f260ce128 100644 --- a/vapi/metadata/Gio-2.0.metadata +++ b/vapi/metadata/Gio-2.0.metadata @@ -268,7 +268,8 @@ File .get_parent nullable .get_path nullable .get_relative_path nullable - .load_partial_contents_async skip=false + .load_partial_contents_async skip + .load_partial_contents_finish skip .move.progress_callback default=null Icon .new_for_string nullable