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+ -->
6 <refentry id=
"sd_bus_get_current_handler" xmlns:
xi=
"http://www.w3.org/2001/XInclude">
9 <title>sd_bus_get_current_handler
</title>
10 <productname>systemd
</productname>
14 <refentrytitle>sd_bus_get_current_handler
</refentrytitle>
15 <manvolnum>3</manvolnum>
19 <refname>sd_bus_get_current_handler
</refname>
20 <refname>sd_bus_get_current_message
</refname>
21 <refname>sd_bus_get_current_slot
</refname>
22 <refname>sd_bus_get_current_userdata
</refname>
24 <refpurpose>Query information of the callback a bus object is currently running
</refpurpose>
29 <funcsynopsisinfo>#include
<systemd/sd-bus.h
></funcsynopsisinfo>
31 <xi:include href=
"sd_bus_add_match.xml" xpointer=
"sd_bus_message_handler_t"/>
34 <funcdef>sd_bus_message_handler_t
<function>sd_bus_get_current_handler
</function></funcdef>
35 <paramdef>sd_bus *
<parameter>bus
</parameter></paramdef>
39 <funcdef>sd_bus_message*
<function>sd_bus_get_current_message
</function></funcdef>
40 <paramdef>sd_bus *
<parameter>bus
</parameter></paramdef>
44 <funcdef>sd_bus_slot*
<function>sd_bus_get_current_slot
</function></funcdef>
45 <paramdef>sd_bus *
<parameter>bus
</parameter></paramdef>
49 <funcdef>void*
<function>sd_bus_get_current_userdata
</function></funcdef>
50 <paramdef>sd_bus *
<parameter>bus
</parameter></paramdef>
56 <title>Description
</title>
58 <para>Whenever sd-bus is about to invoke a user-supplied callback function, it stores the
59 current callback, D-Bus message, slot and userdata pointer and allows these to be queried via
60 <function>sd_bus_get_current_handler()
</function>,
61 <function>sd_bus_get_current_message()
</function>,
62 <function>sd_bus_get_current_slot()
</function> and
63 <function>sd_bus_get_current_userdata()
</function>, respectively. If
<parameter>bus
</parameter>
64 cannot be resolved or if execution does not reside in a user-supplied callback of
65 <parameter>bus
</parameter>, these functions return
<constant>NULL
</constant>.
</para>
69 <title>Return Value
</title>
71 <para>On success, these functions return the requested object. On failure, they return
72 <constant>NULL
</constant>.
</para>
75 <xi:include href=
"libsystemd-pkgconfig.xml" />
78 <title>See Also
</title>
81 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
82 <citerefentry><refentrytitle>sd-bus
</refentrytitle><manvolnum>3</manvolnum></citerefentry>