[glib: 1/2] gdbusproxy: Recommend it is not used for stateless services




commit 43c28fcd5aeadbc1148dc213fc6a99593a23d188
Author: Philip Withnall <withnall endlessm com>
Date:   Sun Oct 7 17:05:56 2018 +0100

    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

 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]