chiark / gitweb /
man: sd_readahead is not actually available in libsystemd-daemon
[elogind.git] / man / sd_get_seats.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
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 <!--
6   This file is part of systemd.
7
8   Copyright 2010 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU General Public License as published by
12   the Free Software Foundation; either version 2 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   General Public License for more details.
19
20   You should have received a copy of the GNU General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="sd_get_seats">
25
26         <refentryinfo>
27                 <title>sd_get_seats</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Lennart</firstname>
34                                 <surname>Poettering</surname>
35                                 <email>lennart@poettering.net</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>sd_get_seats</refentrytitle>
42                 <manvolnum>3</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>sd_get_seats</refname>
47                 <refname>sd_get_sessions</refname>
48                 <refname>sd_get_uids</refname>
49                 <refpurpose>Determine available seats, sessions and logged in users</refpurpose>
50         </refnamediv>
51
52         <refsynopsisdiv>
53                 <funcsynopsis>
54                         <funcsynopsisinfo>#include &lt;systemd/sd-login.h&gt;</funcsynopsisinfo>
55
56                         <funcprototype>
57                                 <funcdef>int <function>sd_get_seats</function></funcdef>
58                                 <paramdef>char*** <parameter>seats</parameter></paramdef>
59                         </funcprototype>
60
61                         <funcprototype>
62                                 <funcdef>int <function>sd_get_sessions</function></funcdef>
63                                 <paramdef>char*** <parameter>sessions</parameter></paramdef>
64                         </funcprototype>
65
66                         <funcprototype>
67                                 <funcdef>int <function>sd_get_uids</function></funcdef>
68                                 <paramdef>char*** <parameter>sessions</parameter></paramdef>
69                         </funcprototype>
70
71                 </funcsynopsis>
72         </refsynopsisdiv>
73
74         <refsect1>
75                 <title>Description</title>
76
77                 <para><function>sd_get_seats()</function> may be used
78                 to determine all currently available local
79                 seats. Returns an array of seat identifiers. The
80                 returned array and all strings it references need to
81                 be freed with the libc
82                 <citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
83                 call after use.</para>
84
85                 <para>Similar, <function>sd_get_sessions()</function> may
86                 be used to determine all current login sessions.</para>
87
88                 <para>Similar, <function>sd_get_uids()</function> may
89                 be used to determine all Unix users who currently have login sessions.</para>
90         </refsect1>
91
92         <refsect1>
93                 <title>Return Value</title>
94
95                 <para>On success <function>sd_get_seats()</function>,
96                 <function>sd_get_sessions()</function> and
97                 <function>sd_get_uids()</function> return the number
98                 of entries in the arrays. On failure, these calls
99                 return a negative errno-style error code.</para>
100         </refsect1>
101
102         <refsect1>
103                 <title>Notes</title>
104
105                 <para>The <function>sd_get_seats()</function>,
106                 <function>sd_get_sessions()</function> and
107                 <function>sd_get_uids()</function> interfaces
108                 are available as shared library, which can be compiled
109                 and linked to with the
110                 <literal>libsystemd-login</literal>
111                 <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
112                 file.</para>
113         </refsect1>
114
115         <refsect1>
116                 <title>See Also</title>
117
118                 <para>
119                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
120                         <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
121                         <citerefentry><refentrytitle>sd_session_get_seat</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
122                 </para>
123         </refsect1>
124
125 </refentry>