]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_bus_enqueue_for_read.xml
Merge pull request #32326 from jonathan-conder/man_pam_loadkey
[thirdparty/systemd.git] / man / sd_bus_enqueue_for_read.xml
CommitLineData
5c116327
LP
1<?xml version='1.0'?>
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
eea10b26 3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
db9ecf05 4<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5c116327
LP
5
6<refentry id="sd_bus_enqueue_for_read"
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>sd_bus_enqueue_for_read</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>sd_bus_enqueue_for_read</refentrytitle>
16 <manvolnum>3</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>sd_bus_enqueue_for_read</refname>
21
e9dd6984 22 <refpurpose>Re-enqueue a bus message on a bus connection, for reading</refpurpose>
5c116327
LP
23 </refnamediv>
24
25 <refsynopsisdiv>
26 <funcsynopsis>
27 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
28
29 <funcprototype>
30 <funcdef>int <function>sd_bus_enqueue_for_read</function></funcdef>
31 <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
32 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
33 </funcprototype>
34
35 </funcsynopsis>
36 </refsynopsisdiv>
37
38 <refsect1>
39 <title>Description</title>
40
41 <para><function>sd_bus_enqueue_for_read()</function> may be used to re-enqueue an incoming bus message on
15102ced 42 the local read queue, so that it is processed and dispatched locally again, similarly to how an incoming
5c116327
LP
43 message from the peer is processed. Takes a bus connection object and the message to enqueue. A reference
44 is taken of the message and the caller's reference thus remains in possession of the caller. The message
45 is enqueued at the end of the queue, thus will be dispatched after all other already queued messages are
46 dispatched.</para>
47
48 <para>This call is primarily useful for dealing with incoming method calls that may be processed only
49 after an additional asynchronous operation completes. One example are PolicyKit authorization requests
bc130b68 50 that are determined to be necessary to authorize a newly incoming method call: when the PolicyKit response
5c116327
LP
51 is received the original method call may be re-enqueued to process it again, this time with the
52 authorization result known.</para>
53 </refsect1>
54
55 <refsect1>
56 <title>Return Value</title>
57
58 <para>On success, this function return 0 or a positive integer. On failure, it returns a negative errno-style
59 error code.</para>
60
61 <refsect2>
62 <title>Errors</title>
63
64 <para>Returned errors may indicate the following problems:</para>
65
66 <variablelist>
67 <varlistentry>
68 <term><constant>-ECHILD</constant></term>
69
87fe0a69 70 <listitem><para>The bus connection has been created in a different process, library or module instance.</para></listitem>
5c116327
LP
71 </varlistentry>
72 </variablelist>
73 </refsect2>
74 </refsect1>
75
76 <xi:include href="libsystemd-pkgconfig.xml" />
77
69106f47
AK
78 <refsect1>
79 <title>History</title>
80 <para><function>sd_bus_enqueue_for_read()</function> was added in version 245.</para>
81 </refsect1>
82
5c116327
LP
83 <refsect1>
84 <title>See Also</title>
85
13a69c12
DT
86 <para><simplelist type="inline">
87 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
88 <member><citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
89 <member><citerefentry><refentrytitle>sd_bus_send</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
90 </simplelist></para>
5c116327
LP
91 </refsect1>
92
93</refentry>