]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_event_source_get_event.xml
verify: use manager_load_startable_unit_or_warn() to load units for verification
[thirdparty/systemd.git] / man / sd_event_source_get_event.xml
CommitLineData
dc83f27a
LP
1<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5<!--
572eb058
ZJS
6 SPDX-License-Identifier: LGPL-2.1+
7
dc83f27a
LP
8 This file is part of systemd.
9
10 Copyright 2015 Lennart Poettering
11
12 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
16
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
21
22 You should have received a copy of the GNU Lesser General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24-->
25
26<refentry id="sd_event_source_get_event" xmlns:xi="http://www.w3.org/2001/XInclude">
27
28 <refentryinfo>
29 <title>sd_event_source_get_event</title>
30 <productname>systemd</productname>
31
32 <authorgroup>
33 <author>
34 <contrib>Developer</contrib>
35 <firstname>Lennart</firstname>
36 <surname>Poettering</surname>
37 <email>lennart@poettering.net</email>
38 </author>
39 </authorgroup>
40 </refentryinfo>
41
42 <refmeta>
43 <refentrytitle>sd_event_source_get_event</refentrytitle>
44 <manvolnum>3</manvolnum>
45 </refmeta>
46
47 <refnamediv>
48 <refname>sd_event_source_get_event</refname>
49
50 <refpurpose>Retrieve the event loop of an event source</refpurpose>
51 </refnamediv>
52
53 <refsynopsisdiv>
54 <funcsynopsis>
55 <funcsynopsisinfo>#include &lt;systemd/sd-event.h&gt;</funcsynopsisinfo>
56
57 <funcprototype>
58 <funcdef>sd_event* <function>sd_event_source_get_event</function></funcdef>
59 <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
60 </funcprototype>
61
62 </funcsynopsis>
63 </refsynopsisdiv>
64
65 <refsect1>
66 <title>Description</title>
67
68 <para><function>sd_event_source_get_event()</function> may be used
69 to retrieve the event loop object the event source object specified
70 as <parameter>source</parameter> is associated with. The event
71 loop object is specified when creating an event source object with
72 calls such as
73 <citerefentry><refentrytitle>sd_event_add_io</refentrytitle><manvolnum>3</manvolnum></citerefentry>
74 or
75 <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
76 </refsect1>
77
78 <refsect1>
79 <title>Return Value</title>
80
81 <para>On success, <function>sd_event_source_get_event()</function>
82 returns the associated event loop object. On failure, it returns
83 NULL.</para>
84 </refsect1>
85
86 <xi:include href="libsystemd-pkgconfig.xml" />
87
88 <refsect1>
89 <title>See Also</title>
90
91 <para>
92 <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
93 <citerefentry><refentrytitle>sd_event_add_io</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
94 <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
95 <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
96 <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
97 <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
98 <citerefentry><refentrytitle>sd_event_source_set_userdata</refentrytitle><manvolnum>3</manvolnum></citerefentry>
99 </para>
100 </refsect1>
101
102</refentry>