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-or-later -->
6 <refentry id=
"sd_bus_slot_get_bus" xmlns:
xi=
"http://www.w3.org/2001/XInclude">
8 <title>sd_bus_slot_get_bus
</title>
9 <productname>systemd
</productname>
13 <refentrytitle>sd_bus_slot_get_bus
</refentrytitle>
14 <manvolnum>3</manvolnum>
18 <refname>sd_bus_slot_get_bus
</refname>
19 <refname>sd_bus_slot_get_current_handler
</refname>
20 <refname>sd_bus_slot_get_current_message
</refname>
21 <refname>sd_bus_slot_get_current_userdata
</refname>
23 <refpurpose>Query information attached to a bus slot object
</refpurpose>
28 <funcsynopsisinfo>#include
<systemd/sd-bus.h
></funcsynopsisinfo>
30 <xi:include href=
"sd_bus_add_match.xml" xpointer=
"sd_bus_message_handler_t"/>
33 <funcdef>sd_bus *
<function>sd_bus_slot_get_bus
</function></funcdef>
34 <paramdef>sd_bus_slot *
<parameter>slot
</parameter></paramdef>
38 <funcdef>sd_bus_message_handler_t
<function>sd_bus_slot_get_current_handler
</function>
40 <paramdef>sd_bus_slot *
<parameter>slot
</parameter></paramdef>
44 <funcdef>sd_bus_message *
<function>sd_bus_slot_get_current_message
</function></funcdef>
45 <paramdef>sd_bus_slot *
<parameter>slot
</parameter></paramdef>
49 <funcdef>void *
<function>sd_bus_slot_get_current_userdata
</function></funcdef>
50 <paramdef>sd_bus_slot *
<parameter>slot
</parameter></paramdef>
56 <title>Description
</title>
58 <para><function>sd_bus_slot_get_bus()
</function> returns the bus object that message
59 <parameter>slot
</parameter> is attached to.
</para>
61 <para><function>sd_bus_slot_get_current_handler()
</function>,
62 <function>sd_bus_slot_get_current_message()
</function> and
63 <function>sd_bus_slot_get_current_userdata()
</function> return the current handler, message and
64 userdata respectively of the bus
<parameter>slot
</parameter> is attached to if we're currently
65 executing the callback associated with
<parameter>slot
</parameter>.
</para>
69 <title>Return Value
</title>
71 <para><function>sd_bus_slot_get_bus()
</function> always returns the bus object.
</para>
73 <para>On success,
<function>sd_bus_slot_get_current_handler()
</function>,
74 <function>sd_bus_slot_get_current_message()
</function> and
75 <function>sd_bus_slot_get_current_userdata()
</function> return the requested object. On failure,
76 they return
<constant>NULL
</constant>.
</para>
79 <xi:include href=
"libsystemd-pkgconfig.xml" />
82 <title>History
</title>
83 <para><function>sd_bus_slot_get_bus()
</function> was added in version
246.
</para>
84 <para><function>sd_bus_slot_get_current_handler()
</function> was added in version
246.
</para>
85 <para><function>sd_bus_slot_get_current_message()
</function> was added in version
246.
</para>
86 <para><function>sd_bus_slot_get_current_userdata()
</function> was added in version
246.
</para>
90 <title>See Also
</title>
93 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
94 <citerefentry><refentrytitle>sd-bus
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,