[vala/staging] gio-2.0: Keep GLib.Socket API compatible with gio < 2.48
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] gio-2.0: Keep GLib.Socket API compatible with gio < 2.48
- Date: Tue, 20 Sep 2016 10:30:06 +0000 (UTC)
commit eb9f167bd26617a8d255fc51acb96860d0d9c303
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Sep 16 20:54:27 2016 +0200
gio-2.0: Keep GLib.Socket API compatible with gio < 2.48
https://bugzilla.gnome.org/show_bug.cgi?id=769222
vapi/gio-2.0.vapi | 27 ++++++++++++++++++++++-----
vapi/metadata/Gio-2.0.metadata | 12 ++++++++----
2 files changed, 30 insertions(+), 9 deletions(-)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index 1b8ddc0..9fc51dc 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -2348,9 +2348,12 @@ namespace GLib {
public bool bind (GLib.SocketAddress address, bool allow_reuse) throws GLib.Error;
public bool check_connect_result () throws GLib.Error;
public bool close () throws GLib.Error;
+ public GLib.IOCondition condition_check (GLib.IOCondition condition);
[Version (since = "2.32")]
public bool condition_timed_wait (GLib.IOCondition condition, int64 timeout,
GLib.Cancellable? cancellable = null) throws GLib.Error;
+ public bool condition_wait (GLib.IOCondition condition, GLib.Cancellable? cancellable = null)
throws GLib.IOError;
public bool connect (GLib.SocketAddress address, GLib.Cancellable? cancellable = null) throws
GLib.Error;
+ public GLib.SocketSource create_source (GLib.IOCondition condition, GLib.Cancellable?
cancellable = null);
[CCode (has_construct_function = false)]
public Socket.from_fd (int fd) throws GLib.Error;
[Version (since = "2.32")]
@@ -2388,10 +2391,14 @@ namespace GLib {
public ssize_t receive ([CCode (array_length_cname = "size", array_length_pos = 1.5,
array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error;
public ssize_t receive_from (out GLib.SocketAddress address, [CCode (array_length_cname =
"size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable =
null) throws GLib.Error;
public ssize_t receive_message (out GLib.SocketAddress? address, [CCode (array_length_cname =
"num_vectors", array_length_pos = 2.5)] GLib.InputVector[] vectors, [CCode (array_length_cname =
"num_messages", array_length_pos = 3.5)] out GLib.SocketControlMessage[]? messages, ref int flags,
GLib.Cancellable? cancellable = null) throws GLib.Error;
+ [Version (since = "2.48")]
+ public int receive_messages ([CCode (array_length_cname = "num_messages", array_length_pos =
1.5, array_length_type = "guint")] GLib.InputMessage[] messages, int flags, GLib.Cancellable? cancellable =
null) throws GLib.Error;
[Version (since = "2.26")]
public ssize_t receive_with_blocking ([CCode (array_length_cname = "size", array_length_pos =
1.5, array_length_type = "gsize")] uint8[] buffer, bool blocking, GLib.Cancellable? cancellable = null)
throws GLib.Error;
public ssize_t send ([CCode (array_length_cname = "size", array_length_pos = 1.5,
array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null) throws GLib.Error;
public ssize_t send_message (GLib.SocketAddress? address, [CCode (array_length_cname =
"num_vectors", array_length_pos = 2.5)] GLib.OutputVector[] vectors, [CCode (array_length_cname =
"num_messages", array_length_pos = 3.5)] GLib.SocketControlMessage[]? messages, int flags, GLib.Cancellable?
cancellable = null) throws GLib.Error;
+ [Version (since = "2.44")]
+ public int send_messages ([CCode (array_length_cname = "num_messages", array_length_pos =
1.5, array_length_type = "guint")] GLib.OutputMessage[] messages, int flags, GLib.Cancellable? cancellable =
null) throws GLib.Error;
public ssize_t send_to (GLib.SocketAddress? address, [CCode (array_length_cname = "size",
array_length_pos = 2.5, array_length_type = "gsize")] uint8[] buffer, GLib.Cancellable? cancellable = null)
throws GLib.Error;
[Version (since = "2.26")]
public ssize_t send_with_blocking ([CCode (array_length_cname = "size", array_length_pos =
1.5, array_length_type = "gsize")] uint8[] buffer, bool blocking, GLib.Cancellable? cancellable = null)
throws GLib.Error;
@@ -3209,11 +3216,21 @@ namespace GLib {
[CCode (cheader_filename = "gio/gio.h", type_cname = "GDatagramBasedInterface", type_id =
"g_datagram_based_get_type ()")]
[Version (since = "2.48")]
public interface DatagramBased : GLib.Object {
- public abstract GLib.IOCondition condition_check (GLib.IOCondition condition);
- public abstract bool condition_wait (GLib.IOCondition condition, int64 timeout,
GLib.Cancellable? cancellable = null) throws GLib.Error;
- public abstract GLib.Source create_source (GLib.IOCondition condition, GLib.Cancellable?
cancellable = null);
- public abstract int receive_messages ([CCode (array_length_cname = "num_messages",
array_length_pos = 1.5, array_length_type = "guint")] GLib.InputMessage[] messages, int flags, int64 timeout,
GLib.Cancellable? cancellable = null) throws GLib.Error;
- public abstract int send_messages ([CCode (array_length_cname = "num_messages",
array_length_pos = 1.5, array_length_type = "guint")] GLib.OutputMessage[] messages, int flags, int64
timeout, GLib.Cancellable? cancellable = null) throws GLib.Error;
+ public GLib.IOCondition condition_check (GLib.IOCondition condition);
+ public bool condition_wait (GLib.IOCondition condition, int64 timeout, GLib.Cancellable?
cancellable = null) throws GLib.Error;
+ public GLib.Source create_source (GLib.IOCondition condition, GLib.Cancellable? cancellable =
null);
+ [CCode (vfunc_name = "condition_check")]
+ public virtual GLib.IOCondition datagram_condition_check (GLib.IOCondition condition);
+ [CCode (vfunc_name = "condition_wait")]
+ public virtual bool datagram_condition_wait (GLib.IOCondition condition, int64 timeout,
GLib.Cancellable? cancellable = null) throws GLib.Error;
+ [CCode (vfunc_name = "create_source")]
+ public virtual GLib.Source datagram_create_source (GLib.IOCondition condition,
GLib.Cancellable? cancellable = null);
+ [CCode (vfunc_name = "receive_messages")]
+ public virtual int datagram_receive_messages ([CCode (array_length_cname = "num_messages",
array_length_pos = 1.5, array_length_type = "guint")] GLib.InputMessage[] messages, int flags, int64 timeout,
GLib.Cancellable? cancellable = null) throws GLib.Error;
+ [CCode (vfunc_name = "send_messages")]
+ public virtual int datagram_send_messages ([CCode (array_length_cname = "num_messages",
array_length_pos = 1.5, array_length_type = "guint")] GLib.OutputMessage[] messages, int flags, int64
timeout, GLib.Cancellable? cancellable = null) throws GLib.Error;
+ public int receive_messages ([CCode (array_length_cname = "num_messages", array_length_pos =
1.5, array_length_type = "guint")] GLib.InputMessage[] messages, int flags, int64 timeout, GLib.Cancellable?
cancellable = null) throws GLib.Error;
+ public int send_messages ([CCode (array_length_cname = "num_messages", array_length_pos =
1.5, array_length_type = "guint")] GLib.OutputMessage[] messages, int flags, int64 timeout, GLib.Cancellable?
cancellable = null) throws GLib.Error;
}
[CCode (cheader_filename = "gio/gio.h", type_id = "g_drive_get_type ()")]
public interface Drive : GLib.Object {
diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata
index a67d691..a2fcd77 100644
--- a/vapi/metadata/Gio-2.0.metadata
+++ b/vapi/metadata/Gio-2.0.metadata
@@ -79,6 +79,12 @@ Cancellable
.source_new skip=false type="GLib.CancellableSource"
Credentials
.get_native skip=false
+DatagramBased
+ .condition_check#virtual_method virtual name="datagram_condition_check"
+ .condition_wait#virtual_method virtual name="datagram_condition_wait"
+ .create_source#virtual_method virtual name="datagram_create_source"
+ .receive_messages#virtual_method virtual name="datagram_receive_messages"
+ .send_messages#virtual_method virtual name="datagram_send_messages"
DataInputStream
.read_* throws="GLib.IOError"
.read_line* nullable
@@ -202,10 +208,8 @@ SimpleAsyncResult
.new_error skip
.new_from_error skip
Socket
- .condition_wait skip
- .create_source skip
- .receive_messages skip
- .send_messages skip
+ .condition_wait throws="GLib.IOError"
+ .create_source skip=false type="GLib.SocketSource"
SocketControlMessage
.serialize.data type="uint8[]"
SocketListener
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]