summaryrefslogtreecommitdiff
path: root/examples/echo_ecore/README
blob: 74e1d6d16c59858237e98e5186000951397d95d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()