dbus-cplusplus/examples/echo
pdurante 7c420f87cd * Enabled the symbol visibility feature from gcc 4, reduces binary size and dynamic loading speed
* A lot of fixes to keep compatibility with older (0.6x) versions of libdbus
* Moved the xml handling code from the library to the code generator
* Rewrote the routine to generate introspection data
* Autojunk cleanup



git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@12019 30a43799-04e7-0310-8b2b-ea0d24f86d0e
2007-07-23 18:31:49 +00:00
..
echo-client.cpp * Enabled the symbol visibility feature from gcc 4, reduces binary size and dynamic loading speed 2007-07-23 18:31:49 +00:00
echo-client.h * Added a wrapper for dbus_threads_init_default 2007-07-07 01:23:13 +00:00
echo-introspect.xml * Fixed reading and writing of fixed-size arrays 2007-02-02 19:58:02 +00:00
echo-server.cpp * Fixed reading and writing of fixed-size arrays 2007-02-02 19:58:02 +00:00
echo-server.h * Added a wrapper for dbus_threads_init_default 2007-07-07 01:23:13 +00:00
Makefile.am * Added a wrapper for dbus_threads_init_default 2007-07-07 01:23:13 +00:00
README * Included config.h in all headers 2007-04-29 01:17:32 +00:00

This is probably the most simple D-Bus program you could conceive

To test, run `DBUSXX_VERBOSE=1 ./echo-server` and try the following commands:

dbus-send --dest=org.freedesktop.DBus.Examples.Echo --type=method_call --print-reply /org/freedesktop/DBus/Examples/Echo org.freedesktop.DBus.EchoDemo.Random

dbus-send --dest=org.freedesktop.DBus.Examples.Echo --type=method_call --print-reply /org/freedesktop/DBus/Examples/Echo org.freedesktop.DBus.EchoDemo.Hello string:"world"

dbus-send --dest=org.freedesktop.DBus.Examples.Echo --type=method_call --print-reply /org/freedesktop/DBus/Examples/Echo org.freedesktop.DBus.EchoDemo.Sum array:int32:10,100,250

dbus-send --dest=org.freedesktop.DBus.Examples.Echo --type=method_call --print-reply /org/freedesktop/DBus/Examples/Echo org.freedesktop.DBus.EchoDemo.Info

or, using python instead

$ python
import dbus
bus = dbus.SessionBus()
object = bus.get_object('org.freedesktop.DBus.Examples.Echo','/org/freedesktop/DBus/Examples/Echo')
echo = dbus.Interface(object, dbus_interface='org.freedesktop.DBus.EchoDemo')
echo.Random()
echo.Hello("world")
echo.Sum([123, 234, 95, 520])
echo.Info()