]>
Commit | Line | Data |
---|---|---|
45069c67 DDM |
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+ --> | |
5 | ||
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> | |
11 | ||
12 | <refmeta> | |
13 | <refentrytitle>sd_bus_slot_get_bus</refentrytitle> | |
14 | <manvolnum>3</manvolnum> | |
15 | </refmeta> | |
16 | ||
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> | |
22 | ||
23 | <refpurpose>Query information attached to a bus slot object</refpurpose> | |
24 | </refnamediv> | |
25 | ||
26 | <refsynopsisdiv> | |
27 | <funcsynopsis> | |
28 | <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo> | |
29 | ||
30 | <funcprototype> | |
31 | <funcdef>sd_bus *<function>sd_bus_slot_get_bus</function></funcdef> | |
32 | <paramdef>sd_bus_slot *<parameter>slot</parameter></paramdef> | |
33 | </funcprototype> | |
34 | ||
35 | <funcprototype> | |
36 | <funcdef>sd_bus_message_handler_t <function>sd_bus_slot_get_current_handler</function> | |
37 | </funcdef> | |
38 | <paramdef>sd_bus_slot *<parameter>slot</parameter></paramdef> | |
39 | </funcprototype> | |
40 | ||
41 | <funcprototype> | |
42 | <funcdef>sd_bus_message *<function>sd_bus_slot_get_current_message</function></funcdef> | |
43 | <paramdef>sd_bus_slot *<parameter>slot</parameter></paramdef> | |
44 | </funcprototype> | |
45 | ||
46 | <funcprototype> | |
47 | <funcdef>void *<function>sd_bus_slot_get_current_userdata</function></funcdef> | |
48 | <paramdef>sd_bus_slot *<parameter>slot</parameter></paramdef> | |
49 | </funcprototype> | |
50 | </funcsynopsis> | |
51 | </refsynopsisdiv> | |
52 | ||
53 | <refsect1> | |
54 | <title>Description</title> | |
55 | ||
56 | <para><function>sd_bus_slot_get_bus()</function> returns the bus object that message | |
57 | <parameter>slot</parameter> is attached to.</para> | |
58 | ||
59 | <para><function>sd_bus_slot_get_current_handler()</function>, | |
60 | <function>sd_bus_slot_get_current_message()</function> and | |
61 | <function>sd_bus_slot_get_current_userdata()</function> return the current handler, message and | |
62 | userdata respectively of the bus <parameter>slot</parameter> is attached to if we're currently | |
63 | executing the callback associated with <parameter>slot</parameter>.</para> | |
64 | </refsect1> | |
65 | ||
66 | <refsect1> | |
67 | <title>Return Value</title> | |
68 | ||
69 | <para><function>sd_bus_slot_get_bus()</function> always returns the bus object.</para> | |
70 | ||
71 | <para>On success, <function>sd_bus_slot_get_current_handler()</function>, | |
72 | <function>sd_bus_slot_get_current_message()</function> and | |
73 | <function>sd_bus_slot_get_current_userdata()</function> return the requested object. On failure, | |
74 | they return <constant>NULL</constant>.</para> | |
75 | </refsect1> | |
76 | ||
77 | <xi:include href="libsystemd-pkgconfig.xml" /> | |
78 | ||
79 | <refsect1> | |
80 | <title>See Also</title> | |
81 | ||
82 | <para> | |
83 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
84 | <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
85 | </para> | |
86 | </refsect1> | |
87 | ||
88 | </refentry> |