1SD_BUS_LIST_NAMES(3) sd_bus_list_names SD_BUS_LIST_NAMES(3)
2
3
4
6 sd_bus_list_names - Retrieve information about registered names on a
7 bus
8
10 #include <systemd/sd-bus.h>
11
12 int sd_bus_list_names(sd_bus *bus, char ***acquired,
13 char ***activatable);
14
16 sd_bus_list_names() retrieves information about the registered names on
17 a bus. If acquired is not NULL, this function calls
18 org.freedesktop.DBus.ListNames[1] to retrieve the list of
19 currently-owned names on the bus. If acquired is not NULL, the function
20 calls org.freedesktop.DBus.ListActivableNames[2] to retrieve the list
21 of all names on the bus that can be activated. Note that ownership of
22 the arrays returned by sd_bus_list_names() in acquired and activatable
23 is transferred to the caller and hence, the caller is responsible for
24 freeing these arrays and their contents.
25
27 On success, sd_bus_list_names() returns a non-negative integer. On
28 failure, it returns a negative errno-style error code.
29
30 Errors
31 Returned errors may indicate the following problems:
32
33 -EINVAL
34 bus or both acquired and activatable were NULL.
35
36 -ENOPKG
37 The bus cannot be resolved.
38
39 -ECHILD
40 The bus was created in a different process, library or module
41 instance.
42
43 -ENOMEM
44 Memory allocation failed.
45
46 -ENOTCONN
47 The bus is not connected.
48
50 Functions described here are available as a shared library, which can
51 be compiled against and linked to with the libsystemd pkg-config(1)
52 file.
53
54 The code described here uses getenv(3), which is declared to be not
55 multi-thread-safe. This means that the code calling the functions
56 described here must not call setenv(3) from a parallel thread. It is
57 recommended to only do calls to setenv() from an early phase of the
58 program when no other threads have been started.
59
61 systemd(1), sd-bus(3)
62
64 1. org.freedesktop.DBus.ListNames
65 https://dbus.freedesktop.org/doc/dbus-specification.html#bus-messages-list-names
66
67 2. org.freedesktop.DBus.ListActivableNames
68 https://dbus.freedesktop.org/doc/dbus-specification.html#bus-messages-list-activatable-names
69
70
71
72systemd 254 SD_BUS_LIST_NAMES(3)