From 43c28fcd5aeadbc1148dc213fc6a99593a23d188 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sun, 7 Oct 2018 17:05:56 +0100 Subject: [PATCH] gdbusproxy: Recommend it is not used for stateless services For the reasons given in the new bit of documentation, GDBusProxy should not be used for connecting to stateless D-Bus services which may be restarted at any point. Signed-off-by: Philip Withnall https://gitlab.gnome.org/GNOME/glib/issues/1036 --- gio/gdbusproxy.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c index 9703c1c1f..09b3a6584 100644 --- a/gio/gdbusproxy.c +++ b/gio/gdbusproxy.c @@ -71,6 +71,13 @@ * the message bus launching an owner (unless * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set). * + * If the proxy is for a stateless D-Bus service, where the name owner may + * be started and stopped between calls, the #GDBusProxy:g-name-owner tracking + * of #GDBusProxy will cause the proxy to drop signal and property changes from + * the service after it has restarted for the first time. When interacting + * with a stateless D-Bus service, do not use #GDBusProxy — use direct D-Bus + * method calls and signal connections. + * * The generic #GDBusProxy::g-properties-changed and * #GDBusProxy::g-signal signals are not very convenient to work with. * Therefore, the recommended way of working with proxies is to subclass