]>
Commit | Line | Data |
---|---|---|
d97eac36 LP |
1 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
2 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
3 | ||
4 | <!-- | |
5 | SPDX-License-Identifier: LGPL-2.1+ | |
d97eac36 LP |
6 | --> |
7 | ||
7d6b2723 | 8 | <refentry id="sd_bus_message_set_destination" xmlns:xi="http://www.w3.org/2001/XInclude"> |
d97eac36 LP |
9 | |
10 | <refentryinfo> | |
11 | <title>sd_bus_message_set_destination</title> | |
12 | <productname>systemd</productname> | |
d97eac36 LP |
13 | </refentryinfo> |
14 | ||
15 | <refmeta> | |
16 | <refentrytitle>sd_bus_message_set_destination</refentrytitle> | |
17 | <manvolnum>3</manvolnum> | |
18 | </refmeta> | |
19 | ||
20 | <refnamediv> | |
21 | <refname>sd_bus_message_set_destination</refname> | |
22 | <refname>sd_bus_message_set_sender</refname> | |
23 | <refpurpose>Set the destination or sender service name of a bus message</refpurpose> | |
24 | </refnamediv> | |
25 | ||
26 | <refsynopsisdiv> | |
27 | <funcsynopsis> | |
28 | <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo> | |
29 | ||
30 | <funcprototype> | |
31 | <funcdef>int <function>sd_bus_message_set_destination</function></funcdef> | |
32 | <paramdef>sd_bus_message *<parameter>message</parameter></paramdef> | |
33 | <paramdef>const char *<parameter>destination</parameter></paramdef> | |
34 | </funcprototype> | |
35 | ||
36 | <funcprototype> | |
37 | <funcdef>int <function>sd_bus_message_set_sender</function></funcdef> | |
38 | <paramdef>sd_bus_message *<parameter>message</parameter></paramdef> | |
39 | <paramdef>const char *<parameter>sender</parameter></paramdef> | |
40 | </funcprototype> | |
41 | </funcsynopsis> | |
42 | </refsynopsisdiv> | |
43 | ||
44 | <refsect1> | |
45 | <title>Description</title> | |
46 | ||
47 | <para><function>sd_bus_message_set_destination()</function> sets the destination service name for the specified bus | |
48 | message object. The specified name must be a valid unique or well-known service name.</para> | |
49 | ||
50 | <para><function>sd_bus_message_set_sender()</function> sets the sender service name for the specified bus message | |
51 | object. The specified name must be a valid unique or well-known service name. This function is useful only for | |
52 | messages to send on direct connections as for connections to bus brokers the broker will fill in the destination | |
53 | field anyway, and the sender field set by original sender is ignored.</para> | |
54 | </refsect1> | |
55 | ||
56 | <refsect1> | |
57 | <title>Return Value</title> | |
58 | ||
59 | <para>On success, these calls return 0 or a positive integer. On failure, these calls return a negative errno-style | |
60 | error code.</para> | |
61 | </refsect1> | |
62 | ||
63 | <refsect1> | |
64 | <title>Errors</title> | |
65 | ||
66 | <para>Returned errors may indicate the following problems:</para> | |
67 | ||
68 | <variablelist> | |
69 | <varlistentry> | |
70 | <term><constant>-EINVAL</constant></term> | |
71 | ||
72 | <listitem><para>A specified parameter is invalid.</para></listitem> | |
73 | </varlistentry> | |
74 | ||
75 | <varlistentry> | |
76 | <term><constant>-EPERM</constant></term> | |
77 | ||
78 | <listitem><para>The message is already sealed.</para></listitem> | |
79 | </varlistentry> | |
80 | ||
81 | <varlistentry> | |
82 | <term><constant>-EEXIST</constant></term> | |
83 | ||
84 | <listitem><para>The message already has a destination or sender field set.</para></listitem> | |
85 | </varlistentry> | |
86 | </variablelist> | |
87 | </refsect1> | |
88 | ||
7d6b2723 | 89 | <xi:include href="libsystemd-pkgconfig.xml" /> |
d97eac36 LP |
90 | |
91 | <refsect1> | |
92 | <title>See Also</title> | |
93 | ||
94 | <para> | |
95 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
96 | <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
97 | <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
98 | <citerefentry><refentrytitle>sd_bus_set_sender</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
99 | </para> | |
100 | </refsect1> | |
101 | ||
102 | </refentry> |