mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 06:33:41 +02:00
Bug 621213 – GDBusProxy and well-known names
Allow constructing a GDBusProxy for well-known names as discussed here http://mail.gnome.org/archives/gtk-devel-list/2009-October/msg00075.html including test cases. Make it possible to create a GDBusProxy for a GBusType instead of a GDBusConnection. This requires G_BUS_TYPE_NONE so add that too. Nuke g_bus_watch_proxy() since one can now more or less use GDBusProxy for this. Port gdbus-example-watch-proxy to this new API and include this example in the GDBusProxy doc page. Also nuke the GType parameter from the GDBusProxy constructors as requested here: https://bugzilla.gnome.org/show_bug.cgi?id=621229 Also update the porting guide and other API docs for this change. Also fix a bug in the signal dispatching code so each subscriber only get notified once, not N times, for the same signal. Also add a test case for this. https://bugzilla.gnome.org/show_bug.cgi?id=621213 Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
@@ -343,7 +343,6 @@ get_nodes_at (GDBusConnection *c,
|
||||
|
||||
error = NULL;
|
||||
proxy = g_dbus_proxy_new_sync (c,
|
||||
G_TYPE_DBUS_PROXY,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
|
||||
NULL,
|
||||
@@ -400,7 +399,6 @@ has_interface (GDBusConnection *c,
|
||||
|
||||
error = NULL;
|
||||
proxy = g_dbus_proxy_new_sync (c,
|
||||
G_TYPE_DBUS_PROXY,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
|
||||
NULL,
|
||||
@@ -450,7 +448,6 @@ count_interfaces (GDBusConnection *c,
|
||||
|
||||
error = NULL;
|
||||
proxy = g_dbus_proxy_new_sync (c,
|
||||
G_TYPE_DBUS_PROXY,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
|
||||
NULL,
|
||||
@@ -522,7 +519,6 @@ dyna_create (GDBusConnection *c,
|
||||
|
||||
error = NULL;
|
||||
proxy = g_dbus_proxy_new_sync (c,
|
||||
G_TYPE_DBUS_PROXY,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
|
||||
NULL,
|
||||
@@ -745,7 +741,6 @@ test_dispatch_thread_func (gpointer user_data)
|
||||
const gchar *value_str;
|
||||
|
||||
foo_proxy = g_dbus_proxy_new_sync (c,
|
||||
G_TYPE_DBUS_PROXY,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS |
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
|
||||
NULL,
|
||||
|
Reference in New Issue
Block a user