dbus-cplusplus/examples/properties
pdurante 7835d90bdc * Renamed pkg-config configuration file
* Initial support for out-of-tree builds and crosscompilation (Robert Schwebel)


git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@9043 30a43799-04e7-0310-8b2b-ea0d24f86d0e
2006-12-31 05:16:32 +00:00
..
Makefile.am * Renamed pkg-config configuration file 2006-12-31 05:16:32 +00:00
props-introspect.xml * Fixed implementation of D-Bus properties 2006-10-24 11:12:29 +00:00
props-server.cpp * Fixed implementation of D-Bus properties 2006-10-24 11:12:29 +00:00
props-server.h * Fixed implementation of D-Bus properties 2006-10-24 11:12:29 +00:00
README * Added another simple D-Bus C++ example 2006-10-24 21:01:36 +00:00

This very simple example shows how to export properties (from objects implementing the org.freedesktop.DBus.Properties interface)

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

dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply  /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" string:"Version"

dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply  /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Set string:"org.freedesktop.DBus.PropsDemo" string:"Version" int32:2

dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply  /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Set string:"org.freedesktop.DBus.PropsDemo" string:"Message" variant:string:"Hello D-Bus"

dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply  /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Set string:"org.freedesktop.DBus.PropsDemo" string:"Message" variant:int32:200

dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply  /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" string:"Message"

dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply  /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" string:"Something"

dbus-send --dest=org.freedesktop.DBus.Examples.Properties --type=method_call --print-reply  /org/freedesktop/DBus/Examples/Properties org.freedesktop.DBus.Properties.Get string:"org.freedesktop.DBus.PropsDemo" int32:100