[Vala] DBus Client Timeout Woes



Servus,

I'm working on the freesmartphone.org DBus service middleware
for mobile systems and we are using DBus calls to communicate
with slow devices, such as modems and the like.

While working on the 2nd reference implementation (written
in Vala as opposed to Python), I have stumbled over the DBus
timeout problem. In Python you can specify the client-side
DBus timeout per-call with a keyword argument (e.g.)

  proxy.call_function( somearg, somearg, somearg, timeout = 100000 )

In Vala we have a problem now, since the Vala DBus client module
generates DBus calls always with timeout = -1, which instructs libdbus
to use its default timeout, which is hardcoded (sic!) at compile time
to 25 seconds -- not enough for our usecases.

libdbus provides no facilities to change the default timeout,
libdbus-glib provides one, but Vala is not using it for the actual
method calls (which is a good thing), so for the time being we are stuck
with the timeout argument to
dbus_connection_send_with_reply(_and_block).

How can we make this argument customizable in Vala? Would it --
at least for static clients -- be feasible to introduce a new attribute, i.e.
[DBus (name = "foo", timeout = "120000")] ?

Thanks,

:M:





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]