]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gio-2.0: Fix FileReadMoreCallback and File.load_partial_contents_async()
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 11 Oct 2017 17:14:46 +0000 (19:14 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 11 Oct 2017 17:14:46 +0000 (19:14 +0200)
FileReadMoreCallback expects the same target as AsyncReadyCallback here.

vapi/gio-2.0.vapi
vapi/metadata/Gio-2.0-custom.vala
vapi/metadata/Gio-2.0.metadata

index 76665b0156cd9fdbde1fa2ddb82d5f9a80fe0e04..762f0aa559d57b98374e81a345a5254f7f1849cd 100644 (file)
@@ -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)]
index 768ea4f9f2392bf8a60ae6a1eaa354a6846d9509..dd83cbb722fb953f7c2f96916f8c778b68de002e 100644 (file)
@@ -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 {
index 1632080754f880ee8b19d4a798b93c337b2e81cf..f260ce128b63388642054ad153fc50cbd1d15078 100644 (file)
@@ -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