Proposing ObjectManager interface
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon Feb 28 07:52:05 PST 2011
On Mon, 28 Feb 2011 at 10:24:16 -0500, David Zeuthen wrote:
> Just like the guidance for properties is more or less "use a
> :Xyz property if you expect everyone to read/use it and it's small -
> use a GetXyz() method otherwise (that's the guidance I use anyway,
> it's not really spelled out anywhere).
I for one had never heard of such guidance!
I think Telepathy is a lot more property-happy than your APIs - we use
properties for most things that we expect to be either immutable, or reliably
change-notified. We mostly use getter methods for things that need to be
polled, and name them RequestXyz(), where Request means "don't return until
you've asked the server and it has replied".
We could really do with an appendix to the D-Bus Specification, or a parallel
document, or something, that describes the interoperable high-level object
model. I get the impression that dbus-glib, GDBus, dbus-python, QtDBus etc.
agree on almost everything, but disagree on a few details; if nothing else,
it'd be good to document an interoperable subset that every competent binding
should be able to implement.
(For instance, overloading by argument type is controversial enough not to be
in the interoperable subset; properties that aren't C identifiers are annoying
for QtDBus, so I think the interoperable subset should recommend the same
naming restrictions as member names, with CapitalizedWords recommended; and
so on.)
> >> This
> >> signal contains all properties for the added interfaces.
> >
> > Mutable or immutable properties?
> [...]
> So, yeah, this question is orthogonal to ObjectManager. So I
> don't think the D-Bus spec should need to discuss this and I think the
> guidance we are giving (if any) shouldn't address it either. The
> answer to your question is the same as for "what should GetAll()
> return"....
OK, sounds like "all the properties".
S
More information about the dbus
mailing list