]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gio-2.0: Re-add old bindings for DBus{Connection|ObjectManagerClient|Proxy}
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 1 Mar 2017 13:31:35 +0000 (14:31 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 1 Mar 2017 21:03:51 +0000 (22:03 +0100)
Keep backwards compatibility for those async-constructor which were dropped
with 4123914c1eecf16696d53cc25367440c221be94d

vapi/gio-2.0.vapi
vapi/metadata/Gio-2.0-custom.vala

index af414575c1fd7db7c16c5bc244909efb80f80959..df4f724131420d0d3bc8cc6cc67b238f32de12f0 100644 (file)
@@ -652,6 +652,12 @@ namespace GLib {
                public unowned GLib.IOStream get_stream ();
                public unowned string get_unique_name ();
                public bool is_closed ();
+               [CCode (cname = "g_dbus_connection_new", finish_function = "g_dbus_connection_new_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusConnection")]
+               public static async GLib.DBusConnection @new (GLib.IOStream stream, string? guid, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               [CCode (cname = "g_dbus_connection_new_for_address", finish_function = "g_dbus_connection_new_for_address_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusConnection.for_address")]
+               public static async GLib.DBusConnection new_for_address (string address, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error;
                public uint register_object<T> (string object_path, T object) throws GLib.IOError;
                [Version (since = "2.46")]
                public uint register_object_with_closures (string object_path, GLib.DBusInterfaceInfo interface_info, GLib.Closure? method_call_closure, GLib.Closure? get_property_closure, GLib.Closure? set_property_closure) throws GLib.Error;
@@ -879,6 +885,12 @@ namespace GLib {
                public GLib.DBusObjectManagerClientFlags get_flags ();
                public unowned string get_name ();
                public string? get_name_owner ();
+               [CCode (cname = "g_dbus_object_manager_client_new", finish_function = "g_dbus_object_manager_client_new_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusObjectManagerClient")]
+               public static async GLib.DBusObjectManagerClient @new (GLib.DBusConnection connection, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               [CCode (cname = "g_dbus_object_manager_client_new_for_bus", finish_function = "g_dbus_object_manager_client_new_for_bus_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusObjectManagerClient.for_bus")]
+               public static async GLib.DBusObjectManagerClient new_for_bus (GLib.BusType bus_type, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [CCode (has_construct_function = false, type = "GDBusObjectManager*")]
                public DBusObjectManagerClient.sync (GLib.DBusConnection connection, GLib.DBusObjectManagerClientFlags flags, string? name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error;
                public GLib.BusType bus_type { construct; }
@@ -962,6 +974,9 @@ namespace GLib {
                public async GLib.Variant call_with_unix_fd_list (string method_name, GLib.Variant? parameters, GLib.DBusCallFlags flags, int timeout_msec, GLib.UnixFDList? fd_list = null, GLib.Cancellable? cancellable = null, out GLib.UnixFDList? out_fd_list = null) throws GLib.Error;
                [Version (since = "2.30")]
                public GLib.Variant call_with_unix_fd_list_sync (string method_name, GLib.Variant? parameters, GLib.DBusCallFlags flags, int timeout_msec, GLib.UnixFDList? fd_list = null, out GLib.UnixFDList? out_fd_list = null, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               [CCode (cname = "g_dbus_proxy_new_for_bus", finish_function = "g_dbus_proxy_new_for_bus_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusProxy.for_bus")]
+               public static async GLib.DBusProxy create_for_bus (GLib.BusType bus_type, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.IOError;
                [CCode (cname = "g_dbus_proxy_new_for_bus", has_construct_function = false)]
                public async DBusProxy.for_bus (GLib.BusType bus_type, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [CCode (has_construct_function = false)]
@@ -977,6 +992,9 @@ namespace GLib {
                public unowned string get_name ();
                public string get_name_owner ();
                public unowned string get_object_path ();
+               [CCode (cname = "g_dbus_proxy_new", finish_function = "g_dbus_proxy_new_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusProxy")]
+               public static async GLib.DBusProxy @new (GLib.DBusConnection connection, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string? name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.IOError;
                public void set_cached_property (string property_name, GLib.Variant? value);
                public void set_default_timeout (int timeout_msec);
                public void set_interface_info (GLib.DBusInterfaceInfo? info);
index 0dd38f22f2fb0760980479e855afd097c7eece60..aa7d8137c6545c023d0074d780229679e26866f0 100644 (file)
@@ -33,12 +33,37 @@ namespace GLib {
 
        [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_connection_get_type ()")]
        public class DBusConnection : GLib.Object, GLib.AsyncInitable, GLib.Initable {
+               [CCode (cname = "g_dbus_connection_new", finish_function = "g_dbus_connection_new_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusConnection")]
+               public static async GLib.DBusConnection @new (GLib.IOStream stream, string? guid, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               [CCode (cname = "g_dbus_connection_new_for_address", finish_function = "g_dbus_connection_new_for_address_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusConnection.for_address")]
+               public static async GLib.DBusConnection @new_for_address (string address, GLib.DBusConnectionFlags flags, GLib.DBusAuthObserver? observer = null, GLib.Cancellable? cancellable = null) throws GLib.Error;
                public async T get_proxy<T> (string? name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError; 
                public T get_proxy_sync<T> (string? name, string object_path, GLib.DBusProxyFlags flags = 0, GLib.Cancellable? cancellable = null) throws GLib.IOError;
                public uint register_object<T> (string object_path, T object) throws GLib.IOError;
                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.IOError;
        }
 
+       [CCode (cheader_filename = "gio/gio.h", type_id = "g_dbus_object_manager_client_get_type ()")]
+       public class DBusObjectManagerClient : GLib.Object {
+               [CCode (cname = "g_dbus_object_manager_client_new", finish_function = "g_dbus_object_manager_client_new_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusObjectManagerClient")]
+               public static async GLib.DBusObjectManagerClient @new (GLib.DBusConnection connection, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               [CCode (cname = "g_dbus_object_manager_client_new_for_bus", finish_function = "g_dbus_object_manager_client_new_for_bus_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusObjectManagerClient.for_bus")]
+               public static async GLib.DBusObjectManagerClient @new_for_bus (GLib.BusType bus_type, GLib.DBusObjectManagerClientFlags flags, string name, string object_path, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned GLib.DBusProxyTypeFunc? get_proxy_type_func, GLib.Cancellable? cancellable = null) throws GLib.Error;
+       }
+
+       public class DBusProxy : GLib.Object {
+               [CCode (cname = "g_dbus_proxy_new", finish_function = "g_dbus_proxy_new_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusProxy")]
+               public static async GLib.DBusProxy @new (GLib.DBusConnection connection, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string? name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.IOError;
+               [CCode (cname = "g_dbus_proxy_new_for_bus", finish_function = "g_dbus_proxy_new_for_bus_finish")]
+               [Version (deprecated_since = "vala-0.36", replacement = "DBusProxy.for_bus")]
+               public static async GLib.DBusProxy create_for_bus (GLib.BusType bus_type, GLib.DBusProxyFlags flags, GLib.DBusInterfaceInfo? info, string name, string object_path, string interface_name, GLib.Cancellable? cancellable = null) throws GLib.IOError;
+       }
+
        public class DataInputStream : GLib.BufferedInputStream {
                [CCode (cname = "g_data_input_stream_read_line_async", finish_function = "g_data_input_stream_read_line_finish_utf8")]
                public async string? read_line_utf8_async (int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, out size_t length) throws GLib.IOError, GLib.IOError;