DBus Specification questions

Robert Middleton robert.middleton at rm5248.com
Tue Mar 31 03:07:02 UTC 2020


Hi all,

I'm working on updating some DBus bindings, and part of that effort
involves reimplementing libdbus.  With that, I've come across some
questions as to how to handle certain situations that may arise.

1. Is it possible to have multiple interfaces with the same name on
the same path?  I would assume at that point that the introspection
XML would look something like the following:
<node>
  <interface name="foo.bar">
    <method name="example" />
  </interface>
  <interface name="foo.bar">
    <method name="exampleOther" />
  </interface>
</node>

The spec seems to imply that this is valid, but I don't see it
specified one way or the other.

2. Even though it is valid to have a METHOD_CALL without an interface,
is it valid to disregard messages that don't have an interface, or
should an effort be made to do something with the message?  Would it
be valid to return an error in this case?

3. Who processes METHOD_CALL timeouts?  From my use of dbus-java I
believe that this is always handled by the sender, but the
specification does not mention anything about it.

4. Do any sort of compliance checks exist at the moment?  I want to to
try and define as many unit tests as possible to ensure that erroneous
conditions are properly dealt with / invalid data doesn't get sent.

5. If a call has the NO_REPLY_EXPECTED flag set, does sending a
response or an error back constitute an invalid action?  The
specification states that "the application receiving the method should
not send the reply message", but I wasn't sure if it is valid to send
a response anyway.


-Robert Middleton


More information about the dbus mailing list