]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/sd_bus_list_names.xml
man: fix link markup
[thirdparty/systemd.git] / man / sd_bus_list_names.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
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+ -->
5
6 <refentry id="sd_bus_list_names"
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>sd_bus_list_names</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>sd_bus_list_names</refentrytitle>
16 <manvolnum>3</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>sd_bus_list_names</refname>
21
22 <refpurpose>Retrieve information about registered names on a bus</refpurpose>
23 </refnamediv>
24
25 <refsynopsisdiv>
26 <funcsynopsis>
27 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
28
29 <funcprototype>
30 <funcdef>int <function>sd_bus_list_names</function></funcdef>
31 <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
32 <paramdef>char ***<parameter>acquired</parameter></paramdef>
33 <paramdef>char ***<parameter>activatable</parameter></paramdef>
34 </funcprototype>
35 </funcsynopsis>
36 </refsynopsisdiv>
37
38 <refsect1>
39 <title>Description</title>
40
41 <para><function>sd_bus_list_names()</function> retrieves information about the registered names on a bus.
42 If <parameter>acquired</parameter> is not <constant>NULL</constant>, this function calls
43 <ulink url="https://dbus.freedesktop.org/doc/dbus-specification.html#bus-messages-list-names">
44 org.freedesktop.DBus.ListNames</ulink> to retrieve the list of currently-owned names on the bus. If
45 <parameter>acquired</parameter> is not <constant>NULL</constant>, the function calls
46 <ulink url="https://dbus.freedesktop.org/doc/dbus-specification.html#bus-messages-list-activatable-names">
47 org.freedesktop.DBus.ListActivableNames</ulink> to retrieve the list of all names on the bus that can be
48 activated. Note that ownership of the arrays returned by <function>sd_bus_list_names()</function> in
49 <parameter>acquired</parameter> and <parameter>activatable</parameter> is transferred to the caller and
50 hence, the caller is responsible for freeing these arrays and their contents.</para>
51 </refsect1>
52
53 <refsect1>
54 <title>Return Value</title>
55
56 <para>On success, <function>sd_bus_list_names()</function> returns a non-negative integer. On failure,
57 it returns a negative errno-style error code.</para>
58
59 <refsect2>
60 <title>Errors</title>
61
62 <para>Returned errors may indicate the following problems:</para>
63
64 <variablelist>
65 <varlistentry>
66 <term><constant>-EINVAL</constant></term>
67
68 <listitem><para><parameter>bus</parameter> or both <parameter>acquired</parameter> and
69 <parameter>activatable</parameter> were <constant>NULL</constant>.
70 </para></listitem>
71 </varlistentry>
72
73 <varlistentry>
74 <term><constant>-ENOPKG</constant></term>
75
76 <listitem><para>The bus cannot be resolved.</para></listitem>
77 </varlistentry>
78
79 <varlistentry>
80 <term><constant>-ECHILD</constant></term>
81
82 <listitem><para>The bus was created in a different process.</para></listitem>
83 </varlistentry>
84
85 <varlistentry>
86 <term><constant>-ENOMEM</constant></term>
87
88 <listitem><para>Memory allocation failed.</para></listitem>
89 </varlistentry>
90
91 <varlistentry>
92 <term><constant>-ENOTCONN</constant></term>
93
94 <listitem><para>The bus is not connected.</para></listitem>
95 </varlistentry>
96 </variablelist>
97 </refsect2>
98 </refsect1>
99
100 <xi:include href="libsystemd-pkgconfig.xml" />
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 </para>
109 </refsect1>
110 </refentry>