]>
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 | |
58 | these <function>sd_bus_get_current_handler()</function>, | |
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 | |
63 | <parameter>bus</parameter> when calling any of these functions, they return | |
64 | <constant>NULL</constant>.</para> | |
65 | </refsect1> | |
66 | ||
67 | <refsect1> | |
68 | <title>Return Value</title> | |
69 | ||
70 | <para>On success, these functions return the requested object. On failure, they return | |
71 | <constant>NULL</constant>.</para> | |
72 | </refsect1> | |
73 | ||
74 | <xi:include href="libsystemd-pkgconfig.xml" /> | |
75 | ||
76 | <refsect1> | |
77 | <title>See Also</title> | |
78 | ||
79 | <para> | |
80 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
81 | <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
82 | </para> | |
83 | </refsect1> | |
84 | ||
85 | </refentry> |