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