GNOME Bugzilla – Bug 791316
gdbusproxy: make g-name-owner property useful with unique names
Last modified: 2018-05-24 19:58:27 UTC
See attached patch.
Created attachment 365139 [details] [review] gdbusproxy: make g-name-owner property useful with unique names Currently, GDBusProxy:g-name-owner only notifies changes to the unique name owner of the remote object in case the proxy was constructed for a well-known name. That sounds like an artificial restriction, and it's convenient to connect to notify::g-name-owner if a proxy instance has already been created for an unique name, instead of additionally using g_bus_watch_name() to track the owner. To fix this, always connect to NameOwnerChanged after the proxy is initialized, instead of only doing so when the proxy was constructed for a well-known name.
Review of attachment 365139 [details] [review]: This seems reasonable, but I’d like a unit test for it please. I don’t really want to push any more changes to GDBus without unit tests. You should be able to base something off gio/tests/gdbus-proxy-well-known-name.c and put it in gio/tests/gdbus-proxy.c, or refactor gdbus-proxy-well-known-name.c to test both well-known and unique names with notify::g-name-owner.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1310.