~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to man/sd_seat_get_active.html

Tags: upstream-202
Import upstream version 202

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
  <a href="systemd.directives.html">Directives </a>·
3
3
  <a href="../python-systemd/index.html">Python </a>·
4
4
  <a href="../libudev/index.html">libudev </a>·
5
 
  <a href="../libudev/index.html">gudev </a><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char* <var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char** <var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t* <var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char* <var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char*** <var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t** <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned* <var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char* <var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char* <var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char* <var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1723696"></a><h2>Description</h2><p><code class="function">sd_seat_get_active()</code> may be
 
5
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 202</span><hr><div class="refentry"><a name="sd_seat_get_active"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_seat_get_active, sd_seat_get_sessions, sd_seat_can_multi_session — Determine state of a specific seat</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-login.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_active</b>(</code></td><td>const char* <var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char** <var class="pdparam">session</var>, </td></tr><tr><td> </td><td>uid_t* <var class="pdparam">uid</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_get_sessions</b>(</code></td><td>const char* <var class="pdparam">seat</var>, </td></tr><tr><td> </td><td>char*** <var class="pdparam">sessions</var>, </td></tr><tr><td> </td><td>uid_t** <var class="pdparam">uid</var>, </td></tr><tr><td> </td><td>unsigned* <var class="pdparam">n_uids</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_multi_session</b>(</code></td><td>const char* <var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_tty</b>(</code></td><td>const char* <var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_seat_can_graphical</b>(</code></td><td>const char* <var class="pdparam">seat</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp26160"></a><h2>Description</h2><p><code class="function">sd_seat_get_active()</code> may be
6
6
                used to determine which session is currently active on
7
7
                a seat, if there is any. Returns the session
8
8
                identifier and the user identifier of the Unix user
37
37
                display.</p><p>If the <code class="literal">seat</code> parameter of any
38
38
                of these functions is passed as NULL the operation is
39
39
                executed for the seat of the session of the calling
40
 
                process, if there is any.</p></div><div class="refsect1"><a name="idp29568"></a><h2>Return Value</h2><p> On success
 
40
                process, if there is any.</p></div><div class="refsect1"><a name="idp36592"></a><h2>Return Value</h2><p> On success
41
41
                <code class="function">sd_seat_get_active()</code>
42
42
                returns 0 or a positive integer. On success
43
43
                <code class="function">sd_seat_get_sessions()</code> returns
47
47
                <code class="function">sd_seat_can_tty</code> and
48
48
                <code class="function">sd_seat_can_graphical</code> return a
49
49
                positive integer, if it fails 0. On failure, these
50
 
                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idp34624"></a><h2>Notes</h2><p>The <code class="function">sd_seat_get_active()</code>,
 
50
                calls return a negative errno-style error code.</p></div><div class="refsect1"><a name="idp49008"></a><h2>Notes</h2><p>The <code class="function">sd_seat_get_active()</code>,
51
51
                <code class="function">sd_seat_get_sessions()</code>,
52
52
                <code class="function">sd_seat_can_multi_session()</code>,
53
53
                <code class="function">sd_seat_can_tty()</code> and
56
56
                and linked to with the
57
57
                <code class="literal">libsystemd-login</code>
58
58
                <a href="pkg-config.html"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
59
 
                file.</p></div><div class="refsect1"><a name="idp48464"></a><h2>See Also</h2><p>
 
59
                file.</p></div><div class="refsect1"><a name="idp55488"></a><h2>See Also</h2><p>
60
60
                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
61
61
                        <a href="sd-login.html"><span class="citerefentry"><span class="refentrytitle">sd-login</span>(3)</span></a>,
62
62
                        <a href="sd_session_get_seat.html"><span class="citerefentry"><span class="refentrytitle">sd_session_get_seat</span>(3)</span></a>