summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-10-10 17:39:41 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2007-10-10 17:39:41 +0100
commit077fb290c57ee937330b22b2ae794fc9967d4722 (patch)
treebf0bc225d70cfbda574a7b4b625b25408a155961
parent8cff9309bf0502ea9147f81cb12d0e067f9ba862 (diff)
parent1ca4b10e3000b0fe918537c20efa35ea1ffb5b26 (diff)
Merge branch 'master' of ssh://git.freedesktop.org/git/dbus/dbus
-rw-r--r--tools/dbus-send.128
-rwxr-xr-xtools/run-with-tmp-session-bus.sh11
2 files changed, 29 insertions, 10 deletions
diff --git a/tools/dbus-send.1 b/tools/dbus-send.1
index 0dad6e8f..4878c3d9 100644
--- a/tools/dbus-send.1
+++ b/tools/dbus-send.1
@@ -33,19 +33,35 @@ which is the name of a connection on the bus to send the message to. If
.PP
The object path and the name of the message to send must always be
specified. Following arguments, if any, are the message contents
-(message arguments). These are given as a type name, a colon, and
-then the value of the argument. The possible type names are: string,
-int32, uint32, double, byte, boolean. (D-Bus supports more types than
-these, but \fIdbus-send\fP currently does not.)
+(message arguments). These are given as type-specified values and
+may include containers (arrays, dicts, and variants) as described below.
+
+.nf
+<contents> ::= <item> | <container> [ <item> | <container>...]
+<item> ::= <type>:<value>
+<container> ::= <array> | <dict> | <variant>
+<array> ::= array:<type>:<value>[,<value>...]
+<dict> ::= dict:<type>:<type>:<key>,<value>[,<key>,<value>...]
+<variant> ::= variant:<type>:<value>
+<type> ::= string | int16 | uint 16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
+.fi
+
+D-Bus supports more types than these, but \fIdbus-send\fP currently
+does not. Also, \fIdbus-send\fP does not permit empty containers
+or nested containers (e.g. arrays of variants).
.PP
Here is an example invocation:
.nf
- dbus-send \-\-dest='org.freedesktop.ExampleName \\
+ dbus-send \-\-dest=org.freedesktop.ExampleName \\
/org/freedesktop/sample/object/name \\
org.freedesktop.ExampleInterface.ExampleMethod \\
- int32:47 string:'hello world' double:65.32
+ int32:47 string:'hello world' double:65.32 \\
+ array:string:"1st item","next item","last item" \\
+ dict:string:int32:"one",1,"two",2,"three",3 \\
+ variant:int32:-8 \\
+ objpath:/org/freedesktop/sample/object/name
.fi
diff --git a/tools/run-with-tmp-session-bus.sh b/tools/run-with-tmp-session-bus.sh
index c04e2385..fb1aff59 100755
--- a/tools/run-with-tmp-session-bus.sh
+++ b/tools/run-with-tmp-session-bus.sh
@@ -38,16 +38,19 @@ if ! test -e "$DBUS_TOP_BUILDDIR"/bus/dbus-daemon ; then
die "$DBUS_TOP_BUILDDIR/bus/dbus-daemon does not exist"
fi
-export PATH="$DBUS_TOP_BUILDDIR"/bus:$PATH
-## the libtool script found by the path search should already do this, but
-export LD_LIBRARY_PATH=$DBUS_TOP_BUILDDIR/dbus/.libs:$LD_LIBRARY_PATH
+PATH="$DBUS_TOP_BUILDDIR"/bus:$PATH
+export PATH
+## the libtool script found by the path search should already do this, but
+LD_LIBRARY_PATH=$DBUS_TOP_BUILDDIR/dbus/.libs:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH
unset DBUS_SESSION_BUS_ADDRESS
unset DBUS_SESSION_BUS_PID
echo "Running $DBUS_TOP_BUILDDIR/tools/dbus-launch --sh-syntax --config-file=$CONFIG_FILE" >&2
-export DBUS_USE_TEST_BINARY=1
+DBUS_USE_TEST_BINARY=1
+export DBUS_USE_TEST_BINARY
eval `$DBUS_TOP_BUILDDIR/tools/dbus-launch --sh-syntax --config-file=$CONFIG_FILE`
if test -z "$DBUS_SESSION_BUS_PID" ; then