1SD_BUS_GET_CURRENT_HANDLER(s3d)_bus_get_current_handlSeDr_BUS_GET_CURRENT_HANDLER(3)
2
3
4

NAME

6       sd_bus_get_current_handler, sd_bus_get_current_message,
7       sd_bus_get_current_slot, sd_bus_get_current_userdata - Query
8       information of the callback a bus object is currently running
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_message_handler_t sd_bus_get_current_handler(sd_bus *bus);
18
19       sd_bus_message* sd_bus_get_current_message(sd_bus *bus);
20
21       sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus);
22
23       void* sd_bus_get_current_userdata(sd_bus *bus);
24

DESCRIPTION

26       Whenever sd-bus is about to invoke a user-supplied callback function,
27       it stores the current callback, D-Bus message, slot and userdata
28       pointer and allows these to be queried via
29       sd_bus_get_current_handler(), sd_bus_get_current_message(),
30       sd_bus_get_current_slot() and sd_bus_get_current_userdata(),
31       respectively. If bus cannot be resolved or if execution does not reside
32       in a user-supplied callback of bus, these functions return NULL.
33

RETURN VALUE

35       On success, these functions return the requested object. On failure,
36       they return NULL.
37

NOTES

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

SEE ALSO

50       systemd(1), sd-bus(3)
51
52
53
54systemd 254                                      SD_BUS_GET_CURRENT_HANDLER(3)
Impressum