dbus-cplusplus/examples/echo_ecore
Andreas Volz 9be39fb628 - create stucture for functional test
- implementation of first test
2011-11-18 17:30:56 +01:00
..
.deps add echo_ecore example 2011-11-17 12:01:38 +01:00
.libs add echo_ecore example 2011-11-17 12:01:38 +01:00
core add echo_ecore example 2011-11-17 12:01:38 +01:00
echo-client-glue.h add echo_ecore example 2011-11-17 12:01:38 +01:00
echo-client-mt add echo_ecore example 2011-11-17 12:01:38 +01:00
echo-client.cpp add echo_ecore example 2011-11-17 12:01:38 +01:00
echo-client.h add echo_ecore example 2011-11-17 12:01:38 +01:00
echo-introspect.xml add echo_ecore example 2011-11-17 12:01:38 +01:00
echo-server add echo_ecore example 2011-11-17 12:01:38 +01:00
echo-server-glue.h add echo_ecore example 2011-11-17 12:01:38 +01:00
echo-server.cpp add echo_ecore example 2011-11-17 12:01:38 +01:00
echo-server.h add echo_ecore example 2011-11-17 12:01:38 +01:00
Makefile - create stucture for functional test 2011-11-18 17:30:56 +01:00
Makefile.am add echo_ecore example 2011-11-17 12:01:38 +01:00
README add echo_ecore example 2011-11-17 12:01:38 +01: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()