Semantics of o.fd.DBus.Properties

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Feb 8 05:39:31 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 08 Feb 2008 at 01:29:51 +0000, Matthew Johnson wrote:
> On Thu Feb 07 21:09, Simon McVittie wrote:
> > * Are "complete" bindings required to support properties of the same name
> >   in different interfaces?
> 
> I'll note here that currently dbus-java does nothing specific about
> Properties. The interface can always be manually implemented as a normal
> interface by the  application author. I think this should count as
> "complete" binding.s

I consider this to be a more complete binding than something like
dbus-glib that does a half-assed job of supporting Properties, actually -
it leaves it up to the app author to get it right, but on the other hand
it *allows* them to get it right :-)

> > * Is it true that setting a property can never fail? (My opinion: no, it
> >   can fail, and clients must not assume it will succeed)
> 
> Setting a property can return an error (and certainly will if that
> application has just fallen off the bus. Applications should expect this
> and so should be able to cope with more mundane errors like EINVAL).
> It's IMO up to the interface semantics whether a value should be clamped
> or throw an error.

So, yeah, I was really asking from a spec writer's perspective: if I say
in my D-Bus API "setting this to a wrong value raises such-and-such an
exception", can I assume bindings will be capable of implementing my
API?

    Simon
-----BEGIN PGP SIGNATURE-----

iD8DBQFHrFuTWSc8zVUw7HYRAqn2AJ4kYN2xLtn2nJbekfgsRE2Cyu9b6gCg7ZpL
ugqIJgUwXntmuS6HmDEL8sA=
=XgSC
-----END PGP SIGNATURE-----


More information about the dbus mailing list