diff --git a/docs/reference/gio/migrating-gdbus.xml b/docs/reference/gio/migrating-gdbus.xml index 2c2073aa8..80322b2ac 100644 --- a/docs/reference/gio/migrating-gdbus.xml +++ b/docs/reference/gio/migrating-gdbus.xml @@ -164,6 +164,59 @@ on_name_acquired (GDBusConnection *connection,
Creating proxies for well-known names + dbus-glib lets you create proxy objects for well-known names, like the + following example: + + + For a #DBusGProxy constructed like this, method calls will be sent to + the current owner of the name, and that owner can change over time. + + + In contrast, #GDBusProxy instances are always bound to a unique name. + To get a proxy for a well-known name, you either have to call + GetNameOwner() yourself and construct a proxy for the unique name + of the current name owner, or use the high-level API. The latter + option is highly recommended: + + + Like g_bus_own_name(), g_bus_watch_proxy() is asynchronous and + you are expected to enter your mainloop to await the on_proxy_appeared() + callback. Note that GDBus also does all the setup operations for the + proxy asynchronously, and only calls your callback when the proxy + is ready for use.