[vala] gio-2.0: fix callbacks for sources created with Socket.create_source
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] gio-2.0: fix callbacks for sources created with Socket.create_source
- Date: Tue, 4 May 2010 23:50:03 +0000 (UTC)
commit 6ac5f539c682c974b12a8b3c6c7f9aad649125ad
Author: Evan Nemerson <evan coeus-group com>
Date: Sun May 2 18:20:46 2010 -0700
gio-2.0: fix callbacks for sources created with Socket.create_source
Fixes bug 617069.
vapi/gio-2.0.vapi | 8 +++++++-
vapi/packages/gio-2.0/gio-2.0-custom.vala | 7 +++++++
vapi/packages/gio-2.0/gio-2.0.metadata | 1 +
3 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index f4f9bb6..4ead2fa 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -715,7 +715,7 @@ namespace GLib {
public GLib.IOCondition condition_check (GLib.IOCondition condition);
public bool condition_wait (GLib.IOCondition condition, GLib.Cancellable? cancellable) throws GLib.Error;
public bool connect (GLib.SocketAddress address, GLib.Cancellable? cancellable) throws GLib.Error;
- public unowned GLib.TimeoutSource create_source (GLib.IOCondition condition, GLib.Cancellable? cancellable);
+ public GLib.SocketSource create_source (GLib.IOCondition condition, GLib.Cancellable? cancellable);
[CCode (has_construct_function = false)]
public Socket.from_fd (int fd) throws GLib.Error;
public bool get_blocking ();
@@ -844,6 +844,12 @@ namespace GLib {
public virtual signal bool incoming (GLib.SocketConnection connection, GLib.Object? source_object);
}
[Compact]
+ [CCode (cname = "GSource", cheader_filename = "gio/gio.h")]
+ public class SocketSource : GLib.Source {
+ [CCode (cname = "g_source_set_callback")]
+ public void set_callback ([CCode (type = "GSourceFunc")] owned GLib.SocketSourceFunc func);
+ }
+ [Compact]
[CCode (copy_function = "g_srv_target_copy", type_id = "G_TYPE_SRV_TARGET", cheader_filename = "gio/gio.h")]
public class SrvTarget {
[CCode (has_construct_function = false)]
diff --git a/vapi/packages/gio-2.0/gio-2.0-custom.vala b/vapi/packages/gio-2.0/gio-2.0-custom.vala
index 42ab86c..ae52b16 100644
--- a/vapi/packages/gio-2.0/gio-2.0-custom.vala
+++ b/vapi/packages/gio-2.0/gio-2.0-custom.vala
@@ -34,6 +34,13 @@ namespace GLib {
public abstract GLib.FileMonitor monitor_file (GLib.FileMonitorFlags flags, GLib.Cancellable? cancellable = null) throws GLib.IOError;
}
+ [Compact]
+ [CCode (cname = "GSource", ref_function = "g_source_ref", unref_function = "g_source_unref")]
+ public class SocketSource : GLib.Source {
+ [CCode (cname = "g_source_set_callback")]
+ public void set_callback ([CCode (type = "GSourceFunc")] owned SocketSourceFunc func);
+ }
+
[CCode (cname = "g_file_hash", cheader_filename = "gio/gio.h")]
public static GLib.HashFunc file_hash;
[CCode (cname = "g_file_equal", cheader_filename = "gio/gio.h")]
diff --git a/vapi/packages/gio-2.0/gio-2.0.metadata b/vapi/packages/gio-2.0/gio-2.0.metadata
index 74e9aae..f783e1a 100644
--- a/vapi/packages/gio-2.0/gio-2.0.metadata
+++ b/vapi/packages/gio-2.0/gio-2.0.metadata
@@ -113,6 +113,7 @@ g_resolver_lookup_service transfer_ownership="1" type_arguments="SrvTarget"
g_resolver_lookup_service_finish transfer_ownership="1" type_arguments="SrvTarget"
g_seekable_truncate abstract="1" vfunc_name="truncate_fn"
g_seekable_truncate_fn hidden="1"
+g_socket_create_source type_name="SocketSource" transfer_ownership="1"
g_socket_listener_add_address.source_object nullable="1"
g_socket_listener_add_inet_port.source_object nullable="1"
g_socket_listener_add_socket.source_object nullable="1"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]