dbus-cplusplus/examples/echo
Andreas Volz c1970e2352 Merge branch 'master' of git://anongit.freedesktop.org/git/dbus/dbus-c++
Merge branch 'master' of git://anongit.freedesktop.org/git/dbus/dbus-c++

Conflicts:

	include/dbus-c++/connection.h
	include/dbus-c++/dispatcher.h
	include/dbus-c++/pendingcall.h
	src/dispatcher.cpp
2008-08-14 23:59:23 +02:00
..
echo-client.cpp Merge branch 'master' of git://anongit.freedesktop.org/git/dbus/dbus-c++ 2008-08-14 23:59:23 +02:00
echo-client.h Time to get rid of the horrible coding style 2008-08-01 18:31:43 +02:00
echo-introspect.xml * Fixed reading and writing of fixed-size arrays 2007-02-02 19:58:02 +00:00
echo-server.cpp Merge branch 'master' of git://anongit.freedesktop.org/git/dbus/dbus-c++ 2008-08-14 23:59:23 +02:00
echo-server.h Use standard types instead of typedefs wherever possible 2008-08-09 01:16:45 +02:00
Makefile.am many changes 2008-07-22 22:34:47 +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()