dbus-cplusplus/examples/properties
Andreas Volz fc54ec2a0b merge from official dbus-c++ fd.org repo
Merge git://anongit.freedesktop.org/git/dbus/dbus-c++

Conflicts:

	configure.ac
	examples/Makefile.am
2008-08-30 11:06:07 +02:00
..
Makefile.am Use autoconf convention for the configuration header (Glenn Murphy) 2008-06-14 15:40:27 +02:00
props-introspect.xml * Fixed implementation of D-Bus properties 2006-10-24 11:12:29 +00:00
props-server.cpp Merge branch 'master' of git://anongit.freedesktop.org/git/dbus/dbus-c++ 2008-08-14 23:59:23 +02:00
props-server.h Make examples use new generated names (João Xavier) 2008-08-16 16:33:02 +02: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