The spec should clarify what is returned for propertyless interfaces, cf. what Simon says in bug 34869 comment 9. Suggest to return a propertyless interface. Should probably also clarify what to do when one or more properties wouldn't have been returned by the Get() call because e.g. the sender is not authorized (or any other reason why Get() would fail). Right now the GDBus implementation silenty just skips that property: http://git.gnome.org/browse/glib/tree/gio/gdbusconnection.c?id=2.28.5#n4079 which is probably the right behavior. Anyway, need to clarify that.
See also Bug #22156 which mostly implements your suggestion in dbus-glib. (In reply to comment #0) > Should probably also clarify what to do when one or more properties wouldn't > have been returned by the Get() call because e.g. the sender is not authorized > (or any other reason why Get() would fail). dbus-glib doesn't support this case: because g_object_get_property() can't fail, Get() can't fail either (except for silly marshalling-related reasons). telepathy-glib's TpDBusPropertiesMixin doesn't support this case either: if anyone can read a property, everyone can read it. If you support this, I think skipping it in GetAll() is OK; but possibly access control should be at (object, interface) granularity, and Get() and GetAll() should both fail for the entire interface?
Created attachment 127657 [details] [review] spec: Clarify behaviour of o.f.D.P.GetAll Clarify its intended behaviour in two situations: • For interfaces which have no properties. • Where some properties are not visible to the caller (due to access control, for example). The intention here is for this behaviour to be mandatory, but given that this is quite late on in the specification’s life, and various D-Bus libraries like dbus-glib and telepathy-glib cannot support access control at a per-property level, for example. GDBus can, although it’s questionable whether this is a good idea. Deliberately leave the specification open to allow access control at a higher level as well (such as per-(object, interface)).
In the spirit of resolving old bugs because everyone likes watertight specifications…
Comment on attachment 127657 [details] [review] spec: Clarify behaviour of o.f.D.P.GetAll Review of attachment 127657 [details] [review]: ----------------------------------------------------------------- I like this patch. Any objections from the other maintainers?
Fixed in git for spec 0.30 (dbus 1.11.8). Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.