Semantics of o.fd.DBus.Properties

Matthew Johnson dbus at
Fri Feb 8 06:07:14 PST 2008

On Fri Feb 08 13:39, Simon McVittie wrote:
> > The same name in multiple interfaces (whether for properties or
> > methods) I think can be expected to cause problems for at least some
> > bindings almost always; while we did not ban it on the dbus protocol
> > level, I would not say it's advisable to create the situation when it
> > can be helped.
> Right. This is a general complaint I have with the D-Bus spec - it tells
> you everything D-Bus can do (gives binding authors something to aim
> for), but it doesn't tell D-Bus API designers what they can get away
> with and what they should avoid.

I agree. I think that the official D-Bus spec should actually be what is
conceptually allowed and supported by the majority of the bindings /
implementations. Otherwise we're allowing people to reply to methods
with a different signature to the one specified in the introspection,
for example. Or not sending a reply/error at all. (clearly these are Bad
and Wrong, but they are allowed by the low level spec...)

Failing that we do at least need _a_ spec that binding writers can use
to implement and API authors to limit themselves to. My cross-binding
test suite is probably a good start for that.

> > > * Can specification writers assume ... that that code will be able to cause
> > >   failure of Set() with a specified exception?
> > I think so (cf. though the comments above about errors)
> So, the reason I'm asking this is: in the Telepathy spec (brief
> background: abstracting instant messaging by a D-Bus API), I'd like to be
> able to say something like:
> property MyUserID (s, readwrite)
> Must be a valid user ID for the protocol being implemented (e.g. a valid JID
> for XMPP). Attempting to set this to an invalid value raises
> org.freedesktop.Telepathy.Error.InvalidArgument.

I think you should certainly be able to do this. On the subject, while I
know methods can always throw things which _aren't_ declared, can we
please have a way to specify common exceptions thrown by methods too?
(I'm thinking annotations, maybe)


D-Bus Java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : 

More information about the dbus mailing list