1:255.16-alt1
[systemd_ALT.git] / man / sd_bus_can_send.xml
blob321b19d9ff3243eec3085687043ed9e8743f1a1e
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="sd_bus_can_send"
7           xmlns:xi="http://www.w3.org/2001/XInclude">
9   <refentryinfo>
10     <title>sd_bus_can_send</title>
11     <productname>systemd</productname>
12   </refentryinfo>
14   <refmeta>
15     <refentrytitle>sd_bus_can_send</refentrytitle>
16     <manvolnum>3</manvolnum>
17   </refmeta>
19   <refnamediv>
20     <refname>sd_bus_can_send</refname>
22     <refpurpose>Check which types can be sent over a bus object</refpurpose>
23   </refnamediv>
25   <refsynopsisdiv>
26     <funcsynopsis>
27       <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
29       <funcprototype>
30         <funcdef>void <function>sd_bus_can_send</function></funcdef>
31         <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
32         <paramdef>char <parameter>type</parameter></paramdef>
33       </funcprototype>
34     </funcsynopsis>
35   </refsynopsisdiv>
37   <refsect1>
38     <title>Description</title>
40     <para><function>sd_bus_can_send()</function> is mostly used for checking if file descriptor
41     passing is available on the given bus. <parameter>type</parameter> can be any of the
42     <constant>SD_BUS_TYPE</constant> constants.</para>
43   </refsect1>
45   <refsect1>
46     <title>Return Value</title>
48     <para>On failure, <function>sd_bus_can_send()</function> returns a negative errno-style error
49     code. If values of the given type can be sent over the given bus, it returns a positive integer.
50     Otherwise, it returns zero.</para>
52     <refsect2>
53       <title>Errors</title>
55       <para>Returned errors may indicate the following problems:</para>
57       <variablelist>
58         <varlistentry>
59           <term><constant>-ENOPKG</constant></term>
61           <listitem><para>The bus object <parameter>bus</parameter> could not be resolved.</para>
63           <xi:include href="version-info.xml" xpointer="v246"/>
64           </listitem>
65         </varlistentry>
67         <varlistentry>
68           <term><constant>-ENOTCONN</constant></term>
70           <listitem><para>The input parameter <parameter>bus</parameter> is
71           <constant>NULL</constant> or the bus is not connected.</para>
73           <xi:include href="version-info.xml" xpointer="v246"/></listitem>
74         </varlistentry>
76         <varlistentry>
77           <term><constant>-ECHILD</constant></term>
79           <listitem><para>The bus object <parameter>bus</parameter> was created in a different
80           process.</para>
82           <xi:include href="version-info.xml" xpointer="v246"/></listitem>
83         </varlistentry>
84       </variablelist>
85     </refsect2>
86   </refsect1>
88   <xi:include href="libsystemd-pkgconfig.xml" />
90   <refsect1>
91     <title>History</title>
92     <para><function>sd_bus_can_send()</function> was added in version 246.</para>
93   </refsect1>
95   <refsect1>
96     <title>See Also</title>
98     <para>
99       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
100       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>
101     </para>
102   </refsect1>
104 </refentry>