[vala/staging] gio-2.0: Fix FileReadMoreCallback and File.load_partial_contents_async()



commit e225dae8fed6b51938685cd0aea01c3147e7cb0c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Oct 11 19:14:46 2017 +0200

    gio-2.0: Fix FileReadMoreCallback and File.load_partial_contents_async()
    
    FileReadMoreCallback expects the same target as AsyncReadyCallback here.

 vapi/gio-2.0.vapi                 |    6 +++---
 vapi/metadata/Gio-2.0-custom.vala |    1 +
 vapi/metadata/Gio-2.0.metadata    |    3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index 76665b0..762f0aa 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 768ea4f..dd83cbb 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 1632080..f260ce1 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


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