1:255.16-alt1
[systemd_ALT.git] / man / sd_bus_slot_get_bus.xml
blobf24d944c57c56cbe2e727ec19708bca13f4fff08
1 <?xml version='1.0'?>
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">
7   <refentryinfo>
8     <title>sd_bus_slot_get_bus</title>
9     <productname>systemd</productname>
10   </refentryinfo>
12   <refmeta>
13     <refentrytitle>sd_bus_slot_get_bus</refentrytitle>
14     <manvolnum>3</manvolnum>
15   </refmeta>
17   <refnamediv>
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>
24   </refnamediv>
26   <refsynopsisdiv>
27     <funcsynopsis>
28       <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
30       <xi:include href="sd_bus_add_match.xml" xpointer="sd_bus_message_handler_t"/>
32       <funcprototype>
33         <funcdef>sd_bus *<function>sd_bus_slot_get_bus</function></funcdef>
34         <paramdef>sd_bus_slot *<parameter>slot</parameter></paramdef>
35       </funcprototype>
37       <funcprototype>
38         <funcdef>sd_bus_message_handler_t <function>sd_bus_slot_get_current_handler</function>
39         </funcdef>
40         <paramdef>sd_bus_slot *<parameter>slot</parameter></paramdef>
41       </funcprototype>
43       <funcprototype>
44         <funcdef>sd_bus_message *<function>sd_bus_slot_get_current_message</function></funcdef>
45         <paramdef>sd_bus_slot *<parameter>slot</parameter></paramdef>
46       </funcprototype>
48       <funcprototype>
49         <funcdef>void *<function>sd_bus_slot_get_current_userdata</function></funcdef>
50         <paramdef>sd_bus_slot *<parameter>slot</parameter></paramdef>
51       </funcprototype>
52     </funcsynopsis>
53   </refsynopsisdiv>
55   <refsect1>
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>
66   </refsect1>
68   <refsect1>
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>
77   </refsect1>
79   <xi:include href="libsystemd-pkgconfig.xml" />
81   <refsect1>
82     <title>History</title>
83     <para><function>sd_bus_slot_get_bus()</function>,
84     <function>sd_bus_slot_get_current_handler()</function>,
85     <function>sd_bus_slot_get_current_message()</function>, and
86     <function>sd_bus_slot_get_current_userdata()</function> were added in version 246.</para>
87   </refsect1>
89   <refsect1>
90     <title>See Also</title>
92     <para>
93       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
94       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
95     </para>
96   </refsect1>
98 </refentry>