[vala] gio-2.0: Move g_bus_* bindings to GLib.Bus namespace



commit 8c5f1ddf0e4d1990acdc2284b5602e9bf18aab5c
Author: Jürg Billeter <j bitron ch>
Date:   Fri Jun 18 07:53:41 2010 +0200

    gio-2.0: Move g_bus_* bindings to GLib.Bus namespace

 vapi/gio-2.0.vapi                         |   53 +++++++++++++++--------------
 vapi/packages/gio-2.0/gio-2.0-custom.vala |   17 +++++++++-
 vapi/packages/gio-2.0/gio-2.0.metadata    |    2 +
 3 files changed, 45 insertions(+), 27 deletions(-)
---
diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi
index ee91f38..5b744a8 100644
--- a/vapi/gio-2.0.vapi
+++ b/vapi/gio-2.0.vapi
@@ -2,6 +2,33 @@
 
 [CCode (cprefix = "G", lower_case_cprefix = "g_", gir_namespace = "Gio", gir_version = "2.0")]
 namespace GLib {
+	[CCode (cprefix = "GBus", lower_case_cprefix = "g_bus_")]
+	namespace Bus {
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static async GLib.DBusConnection @get (GLib.BusType bus_type, GLib.Cancellable? cancellable = null) throws GLib.IOError;
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static GLib.DBusConnection get_sync (GLib.BusType bus_type, GLib.Cancellable? cancellable = null) throws GLib.IOError;
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static uint own_name (GLib.BusType bus_type, string name, GLib.BusNameOwnerFlags flags, GLib.BusAcquiredCallback bus_acquired_handler, GLib.BusNameAcquiredCallback name_acquired_handler, GLib.BusNameLostCallback name_lost_handler);
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static uint own_name_on_connection (GLib.DBusConnection connection, string name, GLib.BusNameOwnerFlags flags, GLib.BusNameAcquiredCallback name_acquired_handler, GLib.BusNameLostCallback name_lost_handler);
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static uint own_name_on_connection_with_closures (GLib.DBusConnection connection, string name, GLib.BusNameOwnerFlags flags, GLib.Closure name_acquired_closure, GLib.Closure name_lost_closure);
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static uint own_name_with_closures (GLib.BusType bus_type, string name, GLib.BusNameOwnerFlags flags, GLib.Closure bus_acquired_closure, GLib.Closure name_acquired_closure, GLib.Closure name_lost_closure);
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static void unown_name (uint owner_id);
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static void unwatch_name (uint watcher_id);
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static uint watch_name (GLib.BusType bus_type, string name, GLib.BusNameWatcherFlags flags, GLib.BusNameAppearedCallback name_appeared_handler, GLib.BusNameVanishedCallback name_vanished_handler);
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static uint watch_name_on_connection (GLib.DBusConnection connection, string name, GLib.BusNameWatcherFlags flags, GLib.BusNameAppearedCallback name_appeared_handler, GLib.BusNameVanishedCallback name_vanished_handler);
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static uint watch_name_on_connection_with_closures (GLib.DBusConnection connection, string name, GLib.BusNameWatcherFlags flags, GLib.Closure name_appeared_closure, GLib.Closure name_vanished_closure);
+		[CCode (cheader_filename = "gio/gio.h")]
+		public static uint watch_name_with_closures (GLib.BusType bus_type, string name, GLib.BusNameWatcherFlags flags, GLib.Closure name_appeared_closure, GLib.Closure name_vanished_closure);
+	}
 	[CCode (cheader_filename = "gio/gio.h")]
 	public class AppLaunchContext : GLib.Object {
 		[CCode (has_construct_function = false)]
@@ -2273,32 +2300,6 @@ namespace GLib {
 	public const string VOLUME_IDENTIFIER_KIND_UUID;
 	[CCode (cheader_filename = "gio/gio.h")]
 	public const string VOLUME_MONITOR_EXTENSION_POINT_NAME;
-	[CCode (cname = "g_bus_get", cheader_filename = "gio/gio.h")]
-	public static void g_bus_get (GLib.BusType bus_type, GLib.Cancellable? cancellable, GLib.AsyncReadyCallback callback);
-	[CCode (cname = "g_bus_get_finish", cheader_filename = "gio/gio.h")]
-	public static unowned GLib.DBusConnection g_bus_get_finish (GLib.AsyncResult res) throws GLib.Error;
-	[CCode (cname = "g_bus_get_sync", cheader_filename = "gio/gio.h")]
-	public static unowned GLib.DBusConnection g_bus_get_sync (GLib.BusType bus_type, GLib.Cancellable? cancellable) throws GLib.Error;
-	[CCode (cname = "g_bus_own_name", cheader_filename = "gio/gio.h")]
-	public static uint g_bus_own_name (GLib.BusType bus_type, string name, GLib.BusNameOwnerFlags flags, GLib.BusAcquiredCallback bus_acquired_handler, GLib.BusNameAcquiredCallback name_acquired_handler, GLib.BusNameLostCallback name_lost_handler, GLib.DestroyNotify user_data_free_func);
-	[CCode (cname = "g_bus_own_name_on_connection", cheader_filename = "gio/gio.h")]
-	public static uint g_bus_own_name_on_connection (GLib.DBusConnection connection, string name, GLib.BusNameOwnerFlags flags, GLib.BusNameAcquiredCallback name_acquired_handler, GLib.BusNameLostCallback name_lost_handler, GLib.DestroyNotify user_data_free_func);
-	[CCode (cname = "g_bus_own_name_on_connection_with_closures", cheader_filename = "gio/gio.h")]
-	public static uint g_bus_own_name_on_connection_with_closures (GLib.DBusConnection connection, string name, GLib.BusNameOwnerFlags flags, GLib.Closure name_acquired_closure, GLib.Closure name_lost_closure);
-	[CCode (cname = "g_bus_own_name_with_closures", cheader_filename = "gio/gio.h")]
-	public static uint g_bus_own_name_with_closures (GLib.BusType bus_type, string name, GLib.BusNameOwnerFlags flags, GLib.Closure bus_acquired_closure, GLib.Closure name_acquired_closure, GLib.Closure name_lost_closure);
-	[CCode (cname = "g_bus_unown_name", cheader_filename = "gio/gio.h")]
-	public static void g_bus_unown_name (uint owner_id);
-	[CCode (cname = "g_bus_unwatch_name", cheader_filename = "gio/gio.h")]
-	public static void g_bus_unwatch_name (uint watcher_id);
-	[CCode (cname = "g_bus_watch_name", cheader_filename = "gio/gio.h")]
-	public static uint g_bus_watch_name (GLib.BusType bus_type, string name, GLib.BusNameWatcherFlags flags, GLib.BusNameAppearedCallback name_appeared_handler, GLib.BusNameVanishedCallback name_vanished_handler, GLib.DestroyNotify user_data_free_func);
-	[CCode (cname = "g_bus_watch_name_on_connection", cheader_filename = "gio/gio.h")]
-	public static uint g_bus_watch_name_on_connection (GLib.DBusConnection connection, string name, GLib.BusNameWatcherFlags flags, GLib.BusNameAppearedCallback name_appeared_handler, GLib.BusNameVanishedCallback name_vanished_handler, GLib.DestroyNotify user_data_free_func);
-	[CCode (cname = "g_bus_watch_name_on_connection_with_closures", cheader_filename = "gio/gio.h")]
-	public static uint g_bus_watch_name_on_connection_with_closures (GLib.DBusConnection connection, string name, GLib.BusNameWatcherFlags flags, GLib.Closure name_appeared_closure, GLib.Closure name_vanished_closure);
-	[CCode (cname = "g_bus_watch_name_with_closures", cheader_filename = "gio/gio.h")]
-	public static uint g_bus_watch_name_with_closures (GLib.BusType bus_type, string name, GLib.BusNameWatcherFlags flags, GLib.Closure name_appeared_closure, GLib.Closure name_vanished_closure);
 	[CCode (cname = "g_content_type_can_be_executable", cheader_filename = "gio/gio.h")]
 	public static bool g_content_type_can_be_executable (string type);
 	[CCode (cname = "g_content_type_equals", cheader_filename = "gio/gio.h")]
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 f3e6b0e..02e9294 100644
--- a/vapi/packages/gio-2.0/gio-2.0-custom.vala
+++ b/vapi/packages/gio-2.0/gio-2.0-custom.vala
@@ -51,5 +51,20 @@ namespace GLib {
 		[CCode (cname = "g_application_quit_with_data")]
 		public bool quit (GLib.Variant? platform_data = null);
 	}
-}
 
+	[CCode (cheader_filename = "gio/gio.h")]
+	namespace Bus {
+		public async GLib.DBusConnection get (GLib.BusType bus_type, GLib.Cancellable? cancellable = null) throws GLib.IOError;
+		public GLib.DBusConnection get_sync (GLib.BusType bus_type, GLib.Cancellable? cancellable = null) throws GLib.IOError;
+		public uint own_name (GLib.BusType bus_type, string name, GLib.BusNameOwnerFlags flags, GLib.BusAcquiredCallback bus_acquired_handler, GLib.BusNameAcquiredCallback name_acquired_handler, GLib.BusNameLostCallback name_lost_handler);
+		public uint own_name_on_connection (GLib.DBusConnection connection, string name, GLib.BusNameOwnerFlags flags, GLib.BusNameAcquiredCallback name_acquired_handler, GLib.BusNameLostCallback name_lost_handler);
+		public uint own_name_on_connection_with_closures (GLib.DBusConnection connection, string name, GLib.BusNameOwnerFlags flags, GLib.Closure name_acquired_closure, GLib.Closure name_lost_closure);
+		public uint own_name_with_closures (GLib.BusType bus_type, string name, GLib.BusNameOwnerFlags flags, GLib.Closure bus_acquired_closure, GLib.Closure name_acquired_closure, GLib.Closure name_lost_closure);
+		public void unown_name (uint owner_id);
+		public void unwatch_name (uint watcher_id);
+		public uint watch_name (GLib.BusType bus_type, string name, GLib.BusNameWatcherFlags flags, GLib.BusNameAppearedCallback name_appeared_handler, GLib.BusNameVanishedCallback name_vanished_handler);
+		public uint watch_name_on_connection (GLib.DBusConnection connection, string name, GLib.BusNameWatcherFlags flags, GLib.BusNameAppearedCallback name_appeared_handler, GLib.BusNameVanishedCallback name_vanished_handler);
+		public uint watch_name_on_connection_with_closures (GLib.DBusConnection connection, string name, GLib.BusNameWatcherFlags flags, GLib.Closure name_appeared_closure, GLib.Closure name_vanished_closure);
+		public uint watch_name_with_closures (GLib.BusType bus_type, string name, GLib.BusNameWatcherFlags flags, GLib.Closure name_appeared_closure, GLib.Closure name_vanished_closure);
+	}
+}
diff --git a/vapi/packages/gio-2.0/gio-2.0.metadata b/vapi/packages/gio-2.0/gio-2.0.metadata
index bb8c910..2333be8 100644
--- a/vapi/packages/gio-2.0/gio-2.0.metadata
+++ b/vapi/packages/gio-2.0/gio-2.0.metadata
@@ -200,3 +200,5 @@ g_volume_monitor_get_volumes type_arguments="Volume" transfer_ownership="1"
 g_zlib_compressor_new.level default_value="-1"
 
 uid_t name="uint"
+
+g_bus_* hidden="1"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]