summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2016-09-16 20:54:27 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2016-12-02 13:37:37 +0100
commit14ab1f007775ccf12d6db2bc7ee6c2aa77c073cb (patch)
tree541ab30f75ea2cffbd864d318446dfd9188ad306
parent7cb585eb230ac40114e6b9d639643be7258e9cb8 (diff)
downloadvala-0.32.tar.gz
gio-2.0: Keep GLib.Socket API compatible with gio < 2.480.32
https://bugzilla.gnome.org/show_bug.cgi?id=769222
-rw-r--r--vapi/gio-2.0.vapi27
-rw-r--r--vapi/metadata/Gio-2.0.metadata12
2 files changed, 30 insertions, 9 deletions
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index b0b1eb491..dfd5f0136 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -2338,9 +2338,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")]
@@ -2378,10 +2381,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;
@@ -3192,11 +3199,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 c3dd438d5..6cf3bcc4b 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