]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gio-2.0: Use only metadata for IOStream, InputStream, OutputStream
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 3 Oct 2016 08:48:22 +0000 (10:48 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 5 Oct 2016 06:16:54 +0000 (08:16 +0200)
vapi/gio-2.0.vapi
vapi/metadata/Gio-2.0-custom.vala
vapi/metadata/Gio-2.0.metadata

index 0a5c6a79582f8bb5b45d1d9dfcb39d317dd8ddc0..751170c36ae7dbb680317624ff8fb0d816deb3d2 100644 (file)
@@ -1430,14 +1430,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 ();
@@ -1572,7 +1574,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 ();
@@ -1583,7 +1585,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;
@@ -1868,7 +1870,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 ();
@@ -1886,7 +1888,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;
index c2bbfc7262c8dd47c717cef8758caa2bedfc864a..75bacc2fabdfa2e30cc02c547e495ce90bff7c92 100644 (file)
@@ -56,20 +56,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);
@@ -85,13 +71,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 {
index fb00d3b92727c346d7b741d15b1f28427227cd9a..595dc55f96e7e989bad7c20eefca066307ef22da 100644 (file)
@@ -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=()