using the dbus low level C API

Marco Cavallini koansoftware at gmail.com
Tue Oct 7 06:40:30 PDT 2008


Tomas Pelka ha scritto:
> Hi all,
> 
> I'm trying the low level C API for python. I've compiled dbus-examle.c 
> from here: http://dbus.freedesktop.org/doc/dbus/dbus-example.c
> 
> Everything work, I' think. But I don't understand purpose of query 
> switch. Let me give an example. I have three terminals
> 1) dbus-monitor
> 2) dbus-example listen
> 3) dbus-example query param
> 
> What should I get as param? If I'll try number (123)
> ./dbus-example query 123
> Calling remote method with 123
> Request Sent
> Got Reply: 1, 21614
> 

.snip.

> 
> Why is 123 in dbus-monitor represented as string, shouldn't it bee a 
> uint32? Or which parameter should I type if I will obtain an integer or 
>   boolean, ... (All parameters are represented as string) What is 
> purpose of this example?
> 
> Thanks all for answers.
> 

I am facing to limitations of this example, which actually is the best
one I found in the internet ;-)
What happens to you seems correct, maybe I don't understand clearly your
question.
You call remote method with 123 and you get back dbus_uint32_t level =
21614;

/marco


More information about the dbus mailing list