-<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-
+<?xml version='1.0'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1+ -->
-<refentry id="sd_bus_slot_set_floating">
+<refentry id="sd_bus_slot_set_floating" xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>sd_bus_slot_set_floating</title>
<refname>sd_bus_slot_set_floating</refname>
<refname>sd_bus_slot_get_floating</refname>
- <refpurpose>Control whether a bus slot object is "floating".</refpurpose>
+ <refpurpose>Control whether a bus slot object is "floating"</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcprototype>
<funcdef>int <function>sd_bus_slot_set_floating</function></funcdef>
- <paramdef>sd_bus_slot *<parameter>bus</parameter></paramdef>
+ <paramdef>sd_bus_slot *<parameter>slot</parameter></paramdef>
<paramdef>int <parameter>b</parameter></paramdef>
</funcprototype>
itself and is freed automatically when the bus object is freed. Regular (i.e. non-floating) bus slot objects keep
the bus referenced, hence the bus object remains allocated at least as long as there remains at least one
referenced bus slot object around. The floating state hence controls the direction of referencing between the bus
- object and the bus slot objects: if floating the bus pins the the bus slot, and otherwise the bus slot pins the bus
+ object and the bus slot objects: if floating the bus pins the bus slot, and otherwise the bus slot pins the bus
objects. Use <function>sd_bus_slot_set_floating()</function> to switch between both modes: if the
<parameter>b</parameter> parameter is zero, the slot object is considered floating, otherwise it is made a regular
(non-floating) slot object.</para>
<refsect1>
<title>Return Value</title>
- <para>On success, these functions return 0 or a positive integer. On failure, they return a negative errno-style
- error code.</para>
- </refsect1>
+ <para>On success, these functions return 0 or a positive integer. On failure, they return a negative
+ errno-style error code.</para>
- <refsect1>
- <title>Errors</title>
+ <refsect2>
+ <title>Errors</title>
- <para>Returned errors may indicate the following problems:</para>
+ <para>Returned errors may indicate the following problems:</para>
- <variablelist>
- <varlistentry>
- <term><constant>-ECHILD</constant></term>
+ <variablelist>
+ <varlistentry>
+ <term><constant>-EINVAL</constant></term>
- <listitem><para>The bus connection has been created in a different process.</para></listitem>
- </varlistentry>
+ <listitem><para>The <parameter>slot</parameter> parameter is <constant>NULL</constant>.</para></listitem>
+ </varlistentry>
- <varlistentry>
- <term><constant>-ESTALE</constant></term>
+ <varlistentry>
+ <term><constant>-ECHILD</constant></term>
- <listitem><para>The bus object the specified bus slot object is associated with has already been freed, and
- hence no change in the floating state can be made anymore.</para></listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
+ <listitem><para>The bus connection has been created in a different process.</para></listitem>
+ </varlistentry>
- <refsect1>
- <title>Notes</title>
+ <varlistentry>
+ <term><constant>-ESTALE</constant></term>
- <para><function>sd_bus_slot_set_floating()</function> and <function>sd_bus_slot_get_floating()</function> are
- available as a shared library, which can be compiled and linked to with the
- <constant>libsystemd</constant> <citerefentry
- project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry> file.</para>
+ <listitem><para>The bus object the specified bus slot object is associated with has already been
+ freed, and hence no change in the floating state can be made anymore.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect2>
</refsect1>
+ <xi:include href="libsystemd-pkgconfig.xml" />
+
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>sd_bus_slot_set_destroy_callback</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
</refsect1>