Add @DBUS_VERSION@ to the generated man pages
[platform/upstream/dbus.git] / doc / dbus-send.1.xml.in
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4 <!-- lifted from troff+man by doclifter -->
5 <refentry id='dbussend1'>
6
7 <!--  dbus&bsol;-send manual page.
8  Copyright (C) 2003 Red Hat, Inc. -->
9
10 <refmeta>
11 <refentrytitle>dbus-send</refentrytitle>
12 <manvolnum>1</manvolnum>
13 <refmiscinfo class="manual">User Commands</refmiscinfo>
14 <refmiscinfo class="source">D-Bus</refmiscinfo>
15 <refmiscinfo class="version">@DBUS_VERSION@</refmiscinfo>
16 </refmeta>
17 <refnamediv>
18 <refname>dbus-send</refname>
19 <refpurpose>Send a message to a message bus</refpurpose>
20 </refnamediv>
21 <!-- body begins here -->
22 <refsynopsisdiv id='synopsis'>
23 <cmdsynopsis>
24   <command>dbus-send</command>    
25     <group choice='opt'><arg choice='plain'>--system </arg><arg choice='plain'>--session </arg></group>
26     <arg choice='opt'>--dest=<replaceable>NAME</replaceable></arg>
27     <arg choice='opt'><arg choice='plain'>--print-reply </arg><arg choice='opt'><replaceable>=literal</replaceable></arg></arg>
28     <arg choice='opt'>--reply-timeout=<replaceable>MSEC</replaceable></arg>
29     <arg choice='opt'>--type=<replaceable>TYPE</replaceable></arg>
30     <arg choice='plain'><replaceable>OBJECT_PATH</replaceable></arg>
31     <arg choice='plain'><replaceable>INTERFACE.MEMBER</replaceable></arg>
32     <arg choice='opt' rep='repeat'><replaceable>CONTENTS</replaceable></arg>
33     <sbr/>
34 </cmdsynopsis>
35 </refsynopsisdiv>
36
37
38 <refsect1 id='description'><title>DESCRIPTION</title>
39 <para>The <command>dbus-send</command> command is used to send a message to a D-Bus message
40 bus. See <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more 
41 information about the big picture.</para>
42
43
44 <para>There are two well-known message buses: the systemwide message bus 
45 (installed on many systems as the "messagebus" service) and the 
46 per-user-login-session message bus (started each time a user logs in).
47 The <option>--system</option> and <option>--session</option> options direct
48 <command>dbus-send</command> to send messages to the system or session buses respectively.
49 If neither is specified, <command>dbus-send</command> sends to the session bus.</para>
50
51
52 <para>Nearly all uses of <command>dbus-send</command> must provide the <option>--dest</option> argument
53 which is the name of a connection on the bus to send the message to. If
54 <option>--dest</option> is omitted, no destination is set.</para>
55
56
57 <para>The object path and the name of the message to send must always be
58 specified. Following arguments, if any, are the message contents
59 (message arguments).  These are given as type-specified values and 
60 may include containers (arrays, dicts, and variants) as described below.</para>
61
62 <literallayout remap='.nf'>
63 &lt;contents&gt;   ::= &lt;item&gt; | &lt;container&gt; [ &lt;item&gt; | &lt;container&gt;...]
64 &lt;item&gt;       ::= &lt;type&gt;:&lt;value&gt;
65 &lt;container&gt;  ::= &lt;array&gt; | &lt;dict&gt; | &lt;variant&gt;
66 &lt;array&gt;      ::= array:&lt;type&gt;:&lt;value&gt;[,&lt;value&gt;...] 
67 &lt;dict&gt;       ::= dict:&lt;type&gt;:&lt;type&gt;:&lt;key&gt;,&lt;value&gt;[,&lt;key&gt;,&lt;value&gt;...]
68 &lt;variant&gt;    ::= variant:&lt;type&gt;:&lt;value&gt;
69 &lt;type&gt;       ::= string | int16 | uint 16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
70 </literallayout> <!-- .fi -->
71
72 <para>D-Bus supports more types than these, but <command>dbus-send</command> currently
73 does not.  Also, <command>dbus-send</command> does not permit empty containers
74 or nested containers (e.g. arrays of variants).</para>
75
76
77 <para>Here is an example invocation:</para>
78 <literallayout remap='.nf'>
79
80   dbus-send --dest=org.freedesktop.ExampleName               &bsol;
81             /org/freedesktop/sample/object/name              &bsol;
82             org.freedesktop.ExampleInterface.ExampleMethod   &bsol;
83             int32:47 string:'hello world' double:65.32       &bsol;
84             array:string:"1st item","next item","last item"  &bsol;
85             dict:string:int32:"one",1,"two",2,"three",3      &bsol;
86             variant:int32:-8                                 &bsol;
87             objpath:/org/freedesktop/sample/object/name 
88
89 </literallayout> <!-- .fi -->
90
91 <para>Note that the interface is separated from a method or signal 
92 name by a dot, though in the actual protocol the interface
93 and the interface member are separate fields.</para>
94
95 </refsect1>
96
97 <refsect1 id='options'><title>OPTIONS</title>
98 <para>The following options are supported:</para>
99 <variablelist remap='TP'>
100   <varlistentry>
101   <term><option>--dest=</option><replaceable>NAME</replaceable></term>
102   <listitem>
103 <para>Specify the name of the connection to receive the message.</para>
104   </listitem>
105   </varlistentry>
106   <varlistentry>
107   <term><option>--print-reply</option></term>
108   <listitem>
109 <para>Block for a reply to the message sent, and print any reply received
110 in a human-readable form.</para>
111   </listitem>
112   </varlistentry>
113   <varlistentry>
114   <term><option>--print-reply=literal</option></term>
115   <listitem>
116 <para>Block for a reply to the message sent, and print the body of the
117 reply. If the reply is an object path or a string, it is printed
118 literally, with no punctuation, escape characters etc.</para>
119   </listitem>
120   </varlistentry>
121   <varlistentry>
122   <term><option>--reply-timeout=</option><replaceable>MSEC</replaceable></term>
123   <listitem>
124 <para>Wait for a reply for up to <emphasis remap='I'>MSEC</emphasis> milliseconds.
125 The default is implementation&hyphen;defined, typically 25 seconds.</para>
126   </listitem>
127   </varlistentry>
128   <varlistentry>
129   <term><option>--system</option></term>
130   <listitem>
131 <para>Send to the system message bus.</para>
132   </listitem>
133   </varlistentry>
134   <varlistentry>
135   <term><option>--session</option></term>
136   <listitem>
137 <para>Send to the session message bus.  (This is the default.)</para>
138   </listitem>
139   </varlistentry>
140   <varlistentry>
141   <term><option>--type=</option><replaceable>TYPE</replaceable></term>
142   <listitem>
143 <para>Specify <emphasis remap='B'>method_call</emphasis> or <emphasis remap='B'>signal</emphasis> (defaults to "<emphasis remap='B'>signal</emphasis>").</para>
144
145   </listitem>
146   </varlistentry>
147 </variablelist>
148 </refsect1>
149
150 <refsect1 id='author'><title>AUTHOR</title>
151 <para>dbus-send was written by Philip Blundell.</para>
152
153 </refsect1>
154
155 <refsect1 id='bugs'><title>BUGS</title>
156 <para>Please send bug reports to the D-Bus mailing list or bug tracker,
157 see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para>
158 </refsect1>
159 </refentry>
160