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