]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_bus_message_set_destination.xml
tree-wide: remove Lennart's copyright lines
[thirdparty/systemd.git] / man / sd_bus_message_set_destination.xml
CommitLineData
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>
13
14 <authorgroup>
15 <author>
16 <contrib>Developer</contrib>
17 <firstname>Lennart</firstname>
18 <surname>Poettering</surname>
19 <email>lennart@poettering.net</email>
20 </author>
21 </authorgroup>
22 </refentryinfo>
23
24 <refmeta>
25 <refentrytitle>sd_bus_message_set_destination</refentrytitle>
26 <manvolnum>3</manvolnum>
27 </refmeta>
28
29 <refnamediv>
30 <refname>sd_bus_message_set_destination</refname>
31 <refname>sd_bus_message_set_sender</refname>
32 <refpurpose>Set the destination or sender service name of a bus message</refpurpose>
33 </refnamediv>
34
35 <refsynopsisdiv>
36 <funcsynopsis>
37 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
38
39 <funcprototype>
40 <funcdef>int <function>sd_bus_message_set_destination</function></funcdef>
41 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
42 <paramdef>const char *<parameter>destination</parameter></paramdef>
43 </funcprototype>
44
45 <funcprototype>
46 <funcdef>int <function>sd_bus_message_set_sender</function></funcdef>
47 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
48 <paramdef>const char *<parameter>sender</parameter></paramdef>
49 </funcprototype>
50 </funcsynopsis>
51 </refsynopsisdiv>
52
53 <refsect1>
54 <title>Description</title>
55
56 <para><function>sd_bus_message_set_destination()</function> sets the destination service name for the specified bus
57 message object. The specified name must be a valid unique or well-known service name.</para>
58
59 <para><function>sd_bus_message_set_sender()</function> sets the sender service name for the specified bus message
60 object. The specified name must be a valid unique or well-known service name. This function is useful only for
61 messages to send on direct connections as for connections to bus brokers the broker will fill in the destination
62 field anyway, and the sender field set by original sender is ignored.</para>
63 </refsect1>
64
65 <refsect1>
66 <title>Return Value</title>
67
68 <para>On success, these calls return 0 or a positive integer. On failure, these calls return a negative errno-style
69 error code.</para>
70 </refsect1>
71
72 <refsect1>
73 <title>Errors</title>
74
75 <para>Returned errors may indicate the following problems:</para>
76
77 <variablelist>
78 <varlistentry>
79 <term><constant>-EINVAL</constant></term>
80
81 <listitem><para>A specified parameter is invalid.</para></listitem>
82 </varlistentry>
83
84 <varlistentry>
85 <term><constant>-EPERM</constant></term>
86
87 <listitem><para>The message is already sealed.</para></listitem>
88 </varlistentry>
89
90 <varlistentry>
91 <term><constant>-EEXIST</constant></term>
92
93 <listitem><para>The message already has a destination or sender field set.</para></listitem>
94 </varlistentry>
95 </variablelist>
96 </refsect1>
97
7d6b2723 98 <xi:include href="libsystemd-pkgconfig.xml" />
d97eac36
LP
99
100 <refsect1>
101 <title>See Also</title>
102
103 <para>
104 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
105 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
106 <citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
107 <citerefentry><refentrytitle>sd_bus_set_sender</refentrytitle><manvolnum>3</manvolnum></citerefentry>
108 </para>
109 </refsect1>
110
111</refentry>