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:
David Zeuthen
2010-06-11 15:45:18 -04:00
parent e0f8d30dea
commit 32f2e9a85b
22 changed files with 1514 additions and 1384 deletions

View File

@@ -1695,6 +1695,9 @@ g_dbus_proxy_get_type G_GNUC_CONST
g_dbus_proxy_new
g_dbus_proxy_new_finish
g_dbus_proxy_new_sync
g_dbus_proxy_new_for_bus
g_dbus_proxy_new_for_bus_finish
g_dbus_proxy_new_for_bus_sync
g_dbus_proxy_get_cached_property
g_dbus_proxy_set_cached_property
g_dbus_proxy_get_cached_property_names
@@ -1704,7 +1707,8 @@ g_dbus_proxy_get_flags
g_dbus_proxy_get_interface_info
g_dbus_proxy_get_interface_name
g_dbus_proxy_get_object_path
g_dbus_proxy_get_unique_bus_name
g_dbus_proxy_get_name
g_dbus_proxy_get_name_owner
g_dbus_proxy_set_default_timeout
g_dbus_proxy_set_interface_info
g_dbus_proxy_call
@@ -1713,16 +1717,6 @@ g_dbus_proxy_call_sync
#endif
#endif
#if IN_HEADER(__G_DBUS_PROXY_WATCHING_H__)
#if IN_FILE(__G_DBUS_PROXY_WATCHING_C__)
g_bus_watch_proxy
g_bus_watch_proxy_on_connection
g_bus_unwatch_proxy
g_bus_watch_proxy_with_closures
g_bus_watch_proxy_on_connection_with_closures
#endif
#endif
#if IN_HEADER(__G_DBUS_SERVER_H__)
#if IN_FILE(__G_DBUS_SERVER_C__)
g_dbus_server_get_type G_GNUC_CONST