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 <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1036
This commit is contained in:
Philip Withnall 2018-10-07 17:05:56 +01:00 committed by Philip Withnall
parent 3bca6ee2e4
commit 43c28fcd5a

View File

@ -71,6 +71,13 @@
* the message bus launching an owner (unless * the message bus launching an owner (unless
* %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set). * %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 * The generic #GDBusProxy::g-properties-changed and
* #GDBusProxy::g-signal signals are not very convenient to work with. * #GDBusProxy::g-signal signals are not very convenient to work with.
* Therefore, the recommended way of working with proxies is to subclass * Therefore, the recommended way of working with proxies is to subclass