1SD_BUS_SLOT_GET_BUS(3)        sd_bus_slot_get_bus       SD_BUS_SLOT_GET_BUS(3)
2
3
4

NAME

6       sd_bus_slot_get_bus, sd_bus_slot_get_current_handler,
7       sd_bus_slot_get_current_message, sd_bus_slot_get_current_userdata -
8       Query information attached to a bus slot object
9

SYNOPSIS

11       #include <systemd/sd-bus.h>
12
13       typedef int (*sd_bus_message_handler_t)(sd_bus_message *m,
14                                               void *userdata,
15                                               sd_bus_error *ret_error);
16
17       sd_bus *sd_bus_slot_get_bus(sd_bus_slot *slot);
18
19       sd_bus_message_handler_t
20                                                                sd_bus_slot_get_current_handler(sd_bus_slot *slot);
21
22       sd_bus_message *sd_bus_slot_get_current_message(sd_bus_slot *slot);
23
24       void *sd_bus_slot_get_current_userdata(sd_bus_slot *slot);
25

DESCRIPTION

27       sd_bus_slot_get_bus() returns the bus object that message slot is
28       attached to.
29
30       sd_bus_slot_get_current_handler(), sd_bus_slot_get_current_message()
31       and sd_bus_slot_get_current_userdata() return the current handler,
32       message and userdata respectively of the bus slot is attached to if
33       we're currently executing the callback associated with slot.
34

RETURN VALUE

36       sd_bus_slot_get_bus() always returns the bus object.
37
38       On success, sd_bus_slot_get_current_handler(),
39       sd_bus_slot_get_current_message() and
40       sd_bus_slot_get_current_userdata() return the requested object. On
41       failure, they return NULL.
42

NOTES

44       Functions described here are available as a shared library, which can
45       be compiled against and linked to with the libsystemd pkg-config(1)
46       file.
47
48       The code described here uses getenv(3), which is declared to be not
49       multi-thread-safe. This means that the code calling the functions
50       described here must not call setenv(3) from a parallel thread. It is
51       recommended to only do calls to setenv() from an early phase of the
52       program when no other threads have been started.
53

SEE ALSO

55       systemd(1), sd-bus(3),
56
57
58
59systemd 254                                             SD_BUS_SLOT_GET_BUS(3)
Impressum