dbus-cplusplus/examples/properties
pdurante 12266bd407 * Bumped version number to 0.5.0
* Updated copyright notice to the upcoming year
* Some s/DBus/D-Bus/g in the comments
* Updated TODO list
* Removed hardcoded version number from output file names
* Added --enable-debug switch to ./configure (debug mode is now off by default)
* Reordered autogen.sh (Robert Schwebel)
* Removed autogenerated files (Robert Schwebel)
* Fixed 'make maintainer-clean' (Robert Schebel)


git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@9042 30a43799-04e7-0310-8b2b-ea0d24f86d0e
2006-12-31 02:03:53 +00:00
..
Makefile.am * Bumped version number to 0.5.0 2006-12-31 02:03:53 +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