dbus-cplusplus/examples/echo
Andreas Volz 1c8e43e6d6 - NO FUNCTIONAL CODE CHANGES!!!!
- changed code formating from tabs to spaces and others
- used astyle with this option:
  --style=ansi --indent=spaces=2 -M --pad-oper --unpad-paren --pad-header --align-pointer=name --lineend=linux
2011-11-28 12:44:11 +01:00
..
echo-client.cpp - NO FUNCTIONAL CODE CHANGES!!!! 2011-11-28 12:44:11 +01:00
echo-client.h - NO FUNCTIONAL CODE CHANGES!!!! 2011-11-28 12:44:11 +01:00
echo-introspect.xml - fixed Strcut generation in generator tool 2011-02-15 23:58:42 +01:00
echo-server.cpp - NO FUNCTIONAL CODE CHANGES!!!! 2011-11-28 12:44:11 +01:00
echo-server.h - NO FUNCTIONAL CODE CHANGES!!!! 2011-11-28 12:44:11 +01:00
Makefile.am merge from official dbus-c++ fd.org repo 2008-08-30 11:06:07 +02: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()