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