[vala/wip/gio-2.0: 12/13] gio-2.0: Use only metadata for IOStream, InputStream, OutputStream
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/gio-2.0: 12/13] gio-2.0: Use only metadata for IOStream, InputStream, OutputStream
- Date: Mon, 3 Oct 2016 10:41:18 +0000 (UTC)
commit f6a734e41c0dcd3fb783e2d16d0254a94f0ea3e3
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 0a5c6a7..751170c 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -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;
diff --git a/vapi/metadata/Gio-2.0-custom.vala b/vapi/metadata/Gio-2.0-custom.vala
index c2bbfc7..75bacc2 100644
--- a/vapi/metadata/Gio-2.0-custom.vala
+++ b/vapi/metadata/Gio-2.0-custom.vala
@@ -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 {
diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata
index fb00d3b..595dc55 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]