]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_bus_set_sender.xml
Correct more spelling errors.
[thirdparty/systemd.git] / man / sd_bus_set_sender.xml
CommitLineData
514094f9 1<?xml version='1.0'?>
d97eac36
LP
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5<!--
6 SPDX-License-Identifier: LGPL-2.1+
d97eac36
LP
7-->
8
7647c01d
LP
9<refentry id="sd_bus_set_sender"
10 xmlns:xi="http://www.w3.org/2001/XInclude">
d97eac36
LP
11
12 <refentryinfo>
13 <title>sd_bus_set_sender</title>
14 <productname>systemd</productname>
d97eac36
LP
15 </refentryinfo>
16
17 <refmeta>
18 <refentrytitle>sd_bus_set_sender</refentrytitle>
19 <manvolnum>3</manvolnum>
20 </refmeta>
21
22 <refnamediv>
23 <refname>sd_bus_set_sender</refname>
24 <refname>sd_bus_get_sender</refname>
25
26 <refpurpose>Configure default sender for outgoing messages</refpurpose>
27 </refnamediv>
28
29 <refsynopsisdiv>
30 <funcsynopsis>
31 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
32
33 <funcprototype>
34 <funcdef>int <function>sd_bus_set_sender</function></funcdef>
35 <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
36 <paramdef>const char* <parameter>name</parameter></paramdef>
37 </funcprototype>
38
39 <funcprototype>
40 <funcdef>int <function>sd_bus_get_sender</function></funcdef>
41 <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
42 <paramdef>const char** <parameter>name</parameter></paramdef>
43 </funcprototype>
44
45 </funcsynopsis>
46 </refsynopsisdiv>
47
48 <refsect1>
49 <title>Description</title>
50
51 <para><function>sd_bus_set_sender()</function> configures the default sender service name to use for outgoing
52 messages. The service name specified in the <parameter>name</parameter> parameter is set on all outgoing messages
53 that are sent on the connection and have no sender set yet, for example through
54 <citerefentry><refentrytitle>sd_bus_message_set_sender</refentrytitle><manvolnum>3</manvolnum></citerefentry>. Note
55 that this function is only supported on direct connections, i.e. not on connections to a bus broker as the broker
56 will fill in the sender service name automatically anyway. By default no sender name is configured, and hence
57 messages are sent without sender field set. If the <parameter>name</parameter> parameter is specified as
58 <constant>NULL</constant> the default sender service name is cleared, returning to the default state if a default
59 sender service name was set before. If passed as non-<constant>NULL</constant> the specified name must be a valid
60 unique or well-known service name.</para>
61
62 <para><function>sd_bus_get_sender()</function> may be used to query the current default service name for outgoing
63 messages.</para>
64 </refsect1>
65
66 <refsect1>
67 <title>Return Value</title>
68
69 <para>On success, these functions return 0 or a positive integer. On failure, they return a negative errno-style
70 error code.</para>
71 </refsect1>
72
73 <refsect1>
74 <title>Errors</title>
75
76 <para>Returned errors may indicate the following problems:</para>
77
78 <variablelist>
79 <varlistentry>
80 <term><constant>-ECHILD</constant></term>
81
82 <listitem><para>The bus connection has been created in a different process.</para></listitem>
83 </varlistentry>
84
85 <varlistentry>
86 <term><constant>-EPERM</constant></term>
87
88 <listitem><para>The specified bus connection object is a not a direct but a brokered connection.</para></listitem>
89 </varlistentry>
90 </variablelist>
91 </refsect1>
92
7647c01d 93 <xi:include href="libsystemd-pkgconfig.xml" />
d97eac36
LP
94
95 <refsect1>
96 <title>See Also</title>
97
98 <para>
99 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
100 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
101 <citerefentry><refentrytitle>sd_bus_message_set_sender</refentrytitle><manvolnum>3</manvolnum></citerefentry>
102 </para>
103 </refsect1>
104
105</refentry>