Java DBus Multiple returns?

Arigead captain.deadly at
Fri Mar 19 05:56:53 PDT 2010

Hello all,
    sorry I looked into the example given in [1] (section 7.8 of that page)

So I have a method I'm trying to call from the navit application defined
from navit source code:

{  "",

so it the method get_attr() takes a String as a single argument and
returns a String and a Vairant. So multiple returns so as per the
example I extend the Tuple:

    public final class TestTuple<A, B> extends Tuple
       public final A a;
       public final B b;
       public TestTuple(A a, B b)
          this.a = a;
          this.b = b;

Then in my Java Interface define the method as:

public TestTuple<String, Variant<?>> get_attr(String attrname);

In python I'd just call the get_attr() method with:

nav = object.get_attr("navit")

as you don't have to worry about the type of the return "nav", Python
will sort if out.

Anyhow when I try to call the get_attr() method in Java I get an error
indicating that I've got the wrong number of arguments from a call:

TestTuple<String, Variant<?>> tup = nav.get_attr("navit");

I'm sort of confused as there is only one argument a string, in this
case "navit" which works in Python. I assume that maybe I've got the
wrong end of the stick with the multiple returns in DBus Java. Could
anybody comment on that?

Thanks a million for any advice from any source.


More information about the dbus mailing list