[vala/0.34] gio-2.0: Use only metadata for IOStream, InputStream, OutputStream



commit 6953d5c5224291671ee21c3ef8f2665e41a1dd45
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Oct 3 10:48:22 2016 +0200

    gio-2.0: Use only metadata for IOStream, InputStream, OutputStream

 vapi/gio-2.0.vapi                 |   12 +++++++-----
 vapi/metadata/Gio-2.0-custom.vala |   21 ---------------------
 vapi/metadata/Gio-2.0.metadata    |   16 +++++++---------
 3 files changed, 14 insertions(+), 35 deletions(-)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index dac4858..8c149d3 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -1436,14 +1436,16 @@ namespace GLib {
                [Version (deprecated = true)]
                public void send_to_mainloop_async (owned GLib.SourceFunc func);
        }
-       [CCode (cheader_filename = "gio/gio.h")]
+       [CCode (cheader_filename = "gio/gio.h", type_id = "g_io_stream_get_type ()")]
        public abstract class IOStream : GLib.Object {
                [CCode (has_construct_function = false)]
                protected IOStream ();
                [Version (since = "2.22")]
                public void clear_pending ();
                [CCode (vfunc_name = "close_fn")]
+               [Version (since = "2.22")]
                public virtual bool close (GLib.Cancellable? cancellable = null) throws GLib.IOError;
+               [Version (since = "2.22")]
                public virtual async bool close_async (int io_priority = GLib.Priority.DEFAULT, 
GLib.Cancellable? cancellable = null) throws GLib.IOError;
                [Version (since = "2.22")]
                public virtual unowned GLib.InputStream get_input_stream ();
@@ -1578,7 +1580,7 @@ namespace GLib {
                public uint port { get; construct; }
                public uint scope_id { get; construct; }
        }
-       [CCode (cheader_filename = "gio/gio.h")]
+       [CCode (cheader_filename = "gio/gio.h", type_id = "g_input_stream_get_type ()")]
        public abstract class InputStream : GLib.Object {
                [CCode (has_construct_function = false)]
                protected InputStream ();
@@ -1589,7 +1591,7 @@ namespace GLib {
                public bool has_pending ();
                public bool is_closed ();
                [CCode (vfunc_name = "read_fn")]
-               public abstract ssize_t read ([CCode (array_length_type = "gsize")] uint8[] buffer, 
GLib.Cancellable? cancellable = null) throws GLib.IOError;
+               public abstract ssize_t read ([CCode (array_length_cname = "count", array_length_pos = 1.5, 
array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.IOError;
                public bool read_all ([CCode (array_length_cname = "count", array_length_pos = 1.5, 
array_length_type = "gsize")] uint8[] buffer, out size_t bytes_read, GLib.Cancellable? cancellable = null) 
throws GLib.IOError;
                [Version (since = "2.44")]
                public async bool read_all_async ([CCode (array_length_cname = "count", array_length_pos = 
1.5, array_length_type = "gsize")] uint8[] buffer, int io_priority, GLib.Cancellable? cancellable, out size_t 
bytes_read) throws GLib.Error;
@@ -1874,7 +1876,7 @@ namespace GLib {
                public void set_title (string title);
                public void set_urgent (bool urgent);
        }
-       [CCode (cheader_filename = "gio/gio.h")]
+       [CCode (cheader_filename = "gio/gio.h", type_id = "g_output_stream_get_type ()")]
        public abstract class OutputStream : GLib.Object {
                [CCode (has_construct_function = false)]
                protected OutputStream ();
@@ -1892,7 +1894,7 @@ namespace GLib {
                public virtual ssize_t splice (GLib.InputStream source, GLib.OutputStreamSpliceFlags flags, 
GLib.Cancellable? cancellable = null) throws GLib.IOError;
                public virtual async ssize_t splice_async (GLib.InputStream source, 
GLib.OutputStreamSpliceFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = 
null) throws GLib.IOError;
                [CCode (vfunc_name = "write_fn")]
-               public abstract ssize_t write ([CCode (array_length_type = "gsize")] uint8[] buffer, 
GLib.Cancellable? cancellable = null) throws GLib.IOError;
+               public abstract ssize_t write ([CCode (array_length_cname = "count", array_length_pos = 1.5, 
array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.IOError;
                public bool write_all ([CCode (array_length_cname = "count", array_length_pos = 1.5, 
array_length_type = "gsize")] uint8[] buffer, out size_t bytes_written, GLib.Cancellable? cancellable = null) 
throws GLib.IOError;
                [Version (since = "2.44")]
                public async bool write_all_async ([CCode (array_length_cname = "count", array_length_pos = 
1.5, array_length_type = "gsize")] uint8[] buffer, int io_priority, GLib.Cancellable? cancellable, out size_t 
bytes_written) throws GLib.Error;
diff --git a/vapi/metadata/Gio-2.0-custom.vala b/vapi/metadata/Gio-2.0-custom.vala
index 294f737..042080d 100644
--- a/vapi/metadata/Gio-2.0-custom.vala
+++ b/vapi/metadata/Gio-2.0-custom.vala
@@ -74,20 +74,6 @@ namespace GLib {
                public IOModuleScope (GLib.IOModuleScopeFlags flags);
        }
 
-       public abstract class IOStream : GLib.Object {
-               [CCode (vfunc_name = "close_fn")]
-               public virtual bool close (GLib.Cancellable? cancellable = null) throws GLib.IOError;
-               public virtual async bool close_async (int io_priority = GLib.Priority.DEFAULT, 
GLib.Cancellable? cancellable = null) throws GLib.IOError;
-
-       }
-
-       public abstract class InputStream : GLib.Object {
-               [CCode (vfunc_name = "close_fn")]
-               public abstract bool close (GLib.Cancellable? cancellable = null) throws GLib.IOError;
-               [CCode (vfunc_name = "read_fn")]
-               public abstract ssize_t read ([CCode (array_length_type = "gsize")] uint8[] buffer, 
GLib.Cancellable? cancellable = null) throws GLib.IOError;
-       }
-
        public class MemoryOutputStream : GLib.OutputStream {
                [CCode (has_construct_function = false, type = "GOutputStream*")]
                public MemoryOutputStream ([CCode (array_length_type = "gsize")] owned uint8[]? data, 
GLib.ReallocFunc? realloc_function = GLib.g_realloc, GLib.DestroyNotify? destroy_function = GLib.g_free);
@@ -103,13 +89,6 @@ namespace GLib {
                public abstract GLib.Mount get_mount_for_mount_path (string mount_path, GLib.Cancellable? 
cancellable = null);
        }
 
-       public abstract class OutputStream : GLib.Object {
-               [CCode (vfunc_name = "close_fn")]
-               public abstract bool close (GLib.Cancellable? cancellable = null) throws GLib.IOError;
-               [CCode (vfunc_name = "write_fn")]
-               public abstract ssize_t write ([CCode (array_length_type = "gsize")] uint8[] buffer, 
GLib.Cancellable? cancellable = null) throws GLib.IOError;
-       }
-
        [Compact]
        [CCode (cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")]
        public class PollableSource : GLib.Source {
diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata
index cf5980e..bb705d5 100644
--- a/vapi/metadata/Gio-2.0.metadata
+++ b/vapi/metadata/Gio-2.0.metadata
@@ -130,21 +130,20 @@ FileInfo
 FileEnumerator
   .next_file nullable
 IOStream
-  .close* skip
+  .close virtual vfunc_name="close_fn" throws="GLib.IOError"
+  .close_finish throws="GLib.IOError"
   .input_stream abstract
   .output_stream abstract
   .closed skip=false
 InetAddress
   .to_bytes type="unowned uint8[]" skip=false
 InputStream
-  .close skip
+  .close abstract vfunc_name="close_fn" throws="GLib.IOError"
   .close_finish throws="GLib.IOError"
-  .close_fn skip
-  .read skip
+  .read abstract vfunc_name="read_fn" throws="GLib.IOError"
   .read_all throws="GLib.IOError"
   .read_all_async.io_priority default=()
   .read_all_async.cancellable default=()
-  .read_fn skip
   .read_finish throws="GLib.IOError"
   .skip throws="GLib.IOError"
   .skip_finish throws="GLib.IOError"
@@ -169,14 +168,13 @@ MenuModel
 Mount
   .get_sort_key#virtual_method virtual
 OutputStream
-  .close skip
+  .close abstract vfunc_name="close_fn" throws="GLib.IOError"
   .close_finish throws="GLib.IOError"
-  .close_fn skip
   .splice throws="GLib.IOError"
   .splice_finish throws="GLib.IOError"
-  .write skip
-  .write_finish throws="GLib.IOError"
+  .write abstract vfunc_name="write_fn" throws="GLib.IOError"
   .write_fn skip
+  .write_finish throws="GLib.IOError"
   .write_all throws="GLib.IOError"
   .write_all_async.io_priority default=()
   .write_all_async.cancellable default=()


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