summaryrefslogtreecommitdiff
path: root/cmake/tools/dbus-send.xml
blob: 7fefc03ef98c413adc734217d1ed40ae1a2a6fac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<!-- lifted from troff+man by doclifter -->
<refentry id='dbussend1'>
<!--   -->
<!--  dbus\-send manual page. -->
<!--  Copyright (C) 2003 Red Hat, Inc. -->

<refmeta>
<refentrytitle>dbus-send</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv id='name'>
<refname>dbus-send</refname>
<refpurpose>Send a message to a message bus</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
  <command>dbus-send</command>    
    <group choice='opt'><arg choice='plain'>--system </arg><arg choice='plain'>--session </arg></group>
    <arg choice='opt'>--dest=<replaceable>NAME</replaceable></arg>
    <arg choice='opt'>--print-reply </arg>
    <arg choice='opt'>--type=<replaceable>TYPE</replaceable></arg>
    <arg choice='plain'><replaceable>&lt;destination</replaceable></arg>
    <arg choice='plain'><replaceable>object</replaceable></arg>
    <arg choice='plain'><replaceable>path&gt;</replaceable></arg>
    <arg choice='plain'><replaceable>&lt;message</replaceable></arg>
    <arg choice='plain'><replaceable>name&gt;</replaceable></arg>
    <arg choice='opt' rep='repeat'><replaceable>contents</replaceable></arg>
    <sbr/>
</cmdsynopsis>
</refsynopsisdiv>


<refsect1 id='description'><title>DESCRIPTION</title>
<para>The <command>dbus-send</command> command is used to send a message to a D-Bus message
bus. See <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more 
information about the big picture.</para>


<para>There are two well-known message buses: the systemwide message bus 
(installed on many systems as the "messagebus" service) and the 
per-user-login-session message bus (started each time a user logs in).
The --system and --session options direct <command>dbus-send</command> to send
messages to the system or session buses respectively.  If neither is
specified, <command>dbus-send</command> sends to the session bus.</para>


<para>Nearly all uses of <command>dbus-send</command> must provide the --dest argument
which is the name of a connection on the bus to send the message to. If
--dest is omitted, no destination is set.</para>


<para>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 type-specified values and 
may include containers (arrays, dicts, and variants) as described below.</para>

<literallayout remap='.nf'>
&lt;contents&gt;   ::= &lt;item&gt; | &lt;container&gt; [ &lt;item&gt; | &lt;container&gt;...]
&lt;item&gt;       ::= &lt;type&gt;:&lt;value&gt;
&lt;container&gt;  ::= &lt;array&gt; | &lt;dict&gt; | &lt;variant&gt;
&lt;array&gt;      ::= array:&lt;type&gt;:&lt;value&gt;[,&lt;value&gt;...] 
&lt;dict&gt;       ::= dict:&lt;type&gt;:&lt;type&gt;:&lt;key&gt;,&lt;value&gt;[,&lt;key&gt;,&lt;value&gt;...]
&lt;variant&gt;    ::= variant:&lt;type&gt;:&lt;value&gt;
&lt;type&gt;       ::= string | int16 | uint 16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
</literallayout> <!-- .fi -->

<para>D-Bus supports more types than these, but <command>dbus-send</command> currently
does not.  Also, <command>dbus-send</command> does not permit empty containers
or nested containers (e.g. arrays of variants).</para>


<para>Here is an example invocation:</para>
<literallayout remap='.nf'>

  dbus-send --dest=org.freedesktop.ExampleName               \
            /org/freedesktop/sample/object/name              \
            org.freedesktop.ExampleInterface.ExampleMethod   \
            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 

</literallayout> <!-- .fi -->

<para>Note that the interface is separated from a method or signal 
name by a dot, though in the actual protocol the interface
and the interface member are separate fields.</para>

</refsect1>

<refsect1 id='options'><title>OPTIONS</title>
<para>The following options are supported:</para>
<variablelist remap='TP'>
  <varlistentry>
  <term><option>--dest=NAME</option></term>
  <listitem>
<para>Specify the name of the connection to receive the message.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>--print-reply</option></term>
  <listitem>
<para>Block for a reply to the message sent, and print any reply received.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>--system</option></term>
  <listitem>
<para>Send to the system message bus.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>--session</option></term>
  <listitem>
<para>Send to the session message bus.  (This is the default.)</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>--type=TYPE</option></term>
  <listitem>
<para>Specify "method_call" or "signal" (defaults to "signal").</para>

  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='author'><title>AUTHOR</title>
<para>dbus-send was written by Philip Blundell.</para>

</refsect1>

<refsect1 id='bugs'><title>BUGS</title>
<para>Please send bug reports to the D-Bus mailing list or bug tracker,
see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para>
</refsect1>
</refentry>