]>
Commit | Line | Data |
---|---|---|
db5328e9 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_get_current_handler" xmlns:xi="http://www.w3.org/2001/XInclude"> | |
7 | ||
8 | <refentryinfo> | |
9 | <title>sd_bus_get_current_handler</title> | |
10 | <productname>systemd</productname> | |
11 | </refentryinfo> | |
12 | ||
13 | <refmeta> | |
14 | <refentrytitle>sd_bus_get_current_handler</refentrytitle> | |
15 | <manvolnum>3</manvolnum> | |
16 | </refmeta> | |
17 | ||
18 | <refnamediv> | |
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> | |
23 | ||
24 | <refpurpose>Query information of the callback a bus object is currently running</refpurpose> | |
25 | </refnamediv> | |
26 | ||
27 | <refsynopsisdiv> | |
28 | <funcsynopsis> | |
29 | <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo> | |
30 | ||
31 | <funcprototype> | |
32 | <funcdef>sd_bus_message_handler_t <function>sd_bus_get_current_handler</function></funcdef> | |
33 | <paramdef>sd_bus *<parameter>bus</parameter></paramdef> | |
34 | </funcprototype> | |
35 | ||
36 | <funcprototype> | |
37 | <funcdef>sd_bus_message* <function>sd_bus_get_current_message</function></funcdef> | |
38 | <paramdef>sd_bus *<parameter>bus</parameter></paramdef> | |
39 | </funcprototype> | |
40 | ||
41 | <funcprototype> | |
42 | <funcdef>sd_bus_slot* <function>sd_bus_get_current_slot</function></funcdef> | |
43 | <paramdef>sd_bus *<parameter>bus</parameter></paramdef> | |
44 | </funcprototype> | |
45 | ||
46 | <funcprototype> | |
47 | <funcdef>void* <function>sd_bus_get_current_userdata</function></funcdef> | |
48 | <paramdef>sd_bus *<parameter>bus</parameter></paramdef> | |
49 | </funcprototype> | |
50 | </funcsynopsis> | |
51 | </refsynopsisdiv> | |
52 | ||
53 | <refsect1> | |
54 | <title>Description</title> | |
55 | ||
56 | <para>Whenever sd-bus is about to invoke a user-supplied callback function, it stores the | |
57 | current callback, D-Bus message, slot and userdata pointer and allows these to be queried via | |
d512670a | 58 | <function>sd_bus_get_current_handler()</function>, |
db5328e9 DDM |
59 | <function>sd_bus_get_current_message()</function>, |
60 | <function>sd_bus_get_current_slot()</function> and | |
61 | <function>sd_bus_get_current_userdata()</function>, respectively. If <parameter>bus</parameter> | |
62 | cannot be resolved or if execution does not reside in a user-supplied callback of | |
d512670a | 63 | <parameter>bus</parameter>, these functions return <constant>NULL</constant>.</para> |
db5328e9 DDM |
64 | </refsect1> |
65 | ||
66 | <refsect1> | |
67 | <title>Return Value</title> | |
68 | ||
69 | <para>On success, these functions return the requested object. On failure, they return | |
70 | <constant>NULL</constant>.</para> | |
71 | </refsect1> | |
72 | ||
73 | <xi:include href="libsystemd-pkgconfig.xml" /> | |
74 | ||
75 | <refsect1> | |
76 | <title>See Also</title> | |
77 | ||
78 | <para> | |
79 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
80 | <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
81 | </para> | |
82 | </refsect1> | |
83 | ||
84 | </refentry> |