What's the difference of generated bindings between the client and server?
arrow
arrowf at 163.com
Sun Dec 14 17:45:00 PST 2008
Hi,
I'm new to dbus..When I looking at the dbus tutorial
at:http://dbus.freedesktop.org/doc/dbus-tutorial.html
I have a question: what's the difference of generated bindings between the
client and server?
I mean, they're almost the same xml file, right?
client side:
<?xml version="1.0" encoding="UTF-8" ?>
<node name="/com/example/MyObject">
<interface name="com.example.MyObject">
<method name="ManyArgs">
<arg type="u" name="x" direction="in" />
<arg type="s" name="str" direction="in" />
<arg type="d" name="trouble" direction="in" />
<arg type="d" name="d_ret" direction="out" />
<arg type="s" name="str_ret" direction="out" />
</method>
</interface>
</node>
server side:
<?xml version="1.0" encoding="UTF-8" ?>
<node name="/com/example/MyObject">
<interface name="com.example.MyObject">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="my_object"/>
<method name="ManyArgs">
<!-- This is optional, and in this case is redunundant -->
<annotation name="org.freedesktop.DBus.GLib.CSymbol"
value="my_object_many_args"/>
<arg type="u" name="x" direction="in" />
<arg type="s" name="str" direction="in" />
<arg type="d" name="trouble" direction="in" />
<arg type="d" name="d_ret" direction="out" />
<arg type="s" name="str_ret" direction="out" />
</method>
</interface>
</node>
For the bindings generation: in server side, I need run:
dbus-binding-tool --mode=glib-client my-object.xml > my-object-bindings.h
but in client side, I need run:
dbus-binding-tool --mode=glib-server my-object.xml > my-object-glue.h
What's the difference? Why should I generate twice?
You help will be highly appreciated!
--
View this message in context: http://www.nabble.com/What%27s-the-difference-of-generated-bindings-between-the-client-and-server--tp21007105p21007105.html
Sent from the Free Desktop - dbus mailing list archive at Nabble.com.
More information about the dbus
mailing list