[vala/0.14] gio-2.0: Fix g_dbus_send_message_with_reply and GUnixFDList bindings
- From: JÃrg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.14] gio-2.0: Fix g_dbus_send_message_with_reply and GUnixFDList bindings
- Date: Wed, 30 Nov 2011 14:26:41 +0000 (UTC)
commit 3996115844cac8f32c362c9ff07554587182b7f8
Author: JÃrg Billeter <j bitron ch>
Date: Wed Nov 23 13:30:40 2011 +0100
gio-2.0: Fix g_dbus_send_message_with_reply and GUnixFDList bindings
vapi/gio-2.0.vapi | 14 ++++++++++----
vapi/packages/gio-2.0/gio-2.0-custom.vala | 11 +++++++++++
vapi/packages/gio-2.0/gio-2.0.metadata | 4 +++-
vapigen/valagidlparser.vala | 13 +++++++++++++
4 files changed, 37 insertions(+), 5 deletions(-)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index e8152c8..1851ca5 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -282,7 +282,7 @@ namespace GLib {
public uint register_subtree (string object_path, GLib.DBusSubtreeVTable vtable, GLib.DBusSubtreeFlags flags, GLib.DestroyNotify user_data_free_func) throws GLib.Error;
public void remove_filter (uint filter_id);
public bool send_message (GLib.DBusMessage message, GLib.DBusSendMessageFlags flags, out uint32 out_serial) throws GLib.Error;
- public async GLib.DBusMessage send_message_with_reply (GLib.DBusMessage message, GLib.DBusSendMessageFlags flags, int timeout_msec, out uint32 out_serial, GLib.Cancellable? cancellable = null) throws GLib.Error;
+ public async GLib.DBusMessage send_message_with_reply (GLib.DBusMessage message, GLib.DBusSendMessageFlags flags, int timeout_msec, uint32* out_serial = null, GLib.Cancellable? cancellable = null) throws GLib.Error;
public GLib.DBusMessage send_message_with_reply_sync (GLib.DBusMessage message, GLib.DBusSendMessageFlags flags, int timeout_msec, out uint32 out_serial, GLib.Cancellable? cancellable = null) throws GLib.Error;
public void set_exit_on_close (bool exit_on_close);
public uint signal_subscribe (string? sender, string? interface_name, string? member, string? object_path, string? arg0, GLib.DBusSignalFlags flags, owned GLib.DBusSignalCallback callback);
@@ -1693,9 +1693,15 @@ namespace GLib {
[Compact]
public class UnixCredentialsMessage {
}
- [CCode (cheader_filename = "gio/gio.h")]
- [Compact]
- public class UnixFDList {
+ [CCode (cheader_filename = "gio/gunixfdlist.h")]
+ public class UnixFDList : GLib.Object {
+ public UnixFDList ();
+ public int append (int fd) throws GLib.IOError;
+ public UnixFDList.from_array (int[] fds);
+ public int @get (int index) throws GLib.IOError;
+ public unowned int[] peek_fds ();
+ public int[] steal_fds ();
+ public int length { get; }
}
[CCode (cheader_filename = "gio/gio.h")]
public class Vfs : GLib.Object {
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 51636d9..f36fb42 100644
--- a/vapi/packages/gio-2.0/gio-2.0-custom.vala
+++ b/vapi/packages/gio-2.0/gio-2.0-custom.vala
@@ -106,4 +106,15 @@ namespace GLib {
[Deprecated (since = "vala-0.12", replacement = "GLib.ContentType.is_unknown")]
[CCode (cname = "g_content_type_is_unknown", cheader_filename = "gio/gio.h")]
public static bool g_content_type_is_unknown (string type);
+
+ [CCode (cheader_filename = "gio/gunixfdlist.h")]
+ public class UnixFDList : GLib.Object {
+ public UnixFDList ();
+ public UnixFDList.from_array (int[] fds);
+ public int length { get; }
+ public int get (int index) throws GLib.IOError;
+ public unowned int[] peek_fds ();
+ public int[] steal_fds ();
+ public int append (int fd) throws GLib.IOError;
+ }
}
diff --git a/vapi/packages/gio-2.0/gio-2.0.metadata b/vapi/packages/gio-2.0/gio-2.0.metadata
index 5f965aa..96bf0cb 100644
--- a/vapi/packages/gio-2.0/gio-2.0.metadata
+++ b/vapi/packages/gio-2.0/gio-2.0.metadata
@@ -90,7 +90,7 @@ g_dbus_connection_send_message.out_serial is_out="1"
g_dbus_connection_new_for_address async="1"
g_dbus_connection_new.observer nullable="1" default_value="null"
g_dbus_connection_send_message_with_reply async="1"
-g_dbus_connection_send_message_with_reply.out_serial is_out="1"
+g_dbus_connection_send_message_with_reply.out_serial is_pointer="1" default_value="null"
g_dbus_connection_send_message_with_reply_sync.out_serial is_out="1"
g_dbus_connection_send_message_with_reply_finish transfer_ownership="1"
g_dbus_connection_send_message_with_reply_sync transfer_ownership="1"
@@ -453,3 +453,5 @@ g_dbus_object_get_interfaces transfer_ownership="1" type_arguments="DBusInterfac
g_dbus_server_new_sync.observer nullable="1" default_value="null"
GSettingsBackend base_class="GObject"
+
+GUnixFDList hidden="1"
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 209c0ab..1fbfc48 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -2234,6 +2234,11 @@ public class Vala.GIdlParser : CodeVisitor {
return_type = new ArrayType (return_type, 1, return_type.source_reference);
m.return_type = return_type;
}
+ } else if (nv[0] == "is_pointer") {
+ if (eval (nv[1]) == "1") {
+ return_type = new PointerType (return_type, return_type.source_reference);
+ m.return_type = return_type;
+ }
} else if (nv[0] == "throws") {
if (eval (nv[1]) == "0") {
suppress_throws = true;
@@ -2379,6 +2384,14 @@ public class Vala.GIdlParser : CodeVisitor {
}
array_requested = true;
}
+ } else if (nv[0] == "is_pointer") {
+ if (eval (nv[1]) == "1") {
+ param_type = new PointerType (param_type, return_type.source_reference);
+ p.variable_type = param_type;
+ if (!out_requested) {
+ p.direction = ParameterDirection.IN;
+ }
+ }
} else if (nv[0] == "is_out") {
if (eval (nv[1]) == "1") {
p.direction = ParameterDirection.OUT;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]