<refentry id="Seat">
  <refmeta>
    <refentrytitle role="top_of_page">org.freedesktop.ConsoleKit.Seat</refentrytitle>
  </refmeta>
  <refnamediv>
    <refname>org.freedesktop.ConsoleKit.Seat</refname>
    <refpurpose>Seat interface</refpurpose>
  </refnamediv>
  <refsynopsisdiv role="synopsis">
    <title role="synopsis.title">Methods</title>
    <synopsis><link linkend="Seat.GetId">GetId</link>               (out 'o'     sid)
<link linkend="Seat.GetName">GetName</link>             (out 's'     name)
<link linkend="Seat.GetSessions">GetSessions</link>         (out 'ao'    sessions)
<link linkend="Seat.GetDevices">GetDevices</link>          (out 'a(ss)' devices)
<link linkend="Seat.GetActiveSession">GetActiveSession</link>    (out 'o'     ssid)
<link linkend="Seat.CanActivateSessions">CanActivateSessions</link> (out 'b'     can_activate)
<link linkend="Seat.ActivateSession">ActivateSession</link>     (in  'o'     ssid)
<link linkend="Seat.SwitchTo">SwitchTo</link>            (in  'u'     vtnr)
</synopsis>
  </refsynopsisdiv>
  <refsect1 role="signal_proto">
    <title role="signal_proto.title">Signals</title>
    <synopsis><link linkend="Seat::ActiveSessionChanged">ActiveSessionChanged</link> ('o'    ssid)
<link linkend="Seat::SessionAdded">SessionAdded</link>         ('o'    ssid)
<link linkend="Seat::SessionRemoved">SessionRemoved</link>       ('o'    ssid)
<link linkend="Seat::DeviceAdded">DeviceAdded</link>          ('(ss)' device)
<link linkend="Seat::DeviceRemoved">DeviceRemoved</link>        ('(ss)' device)
</synopsis>
  </refsect1>
  <refsect1 role="impl_interfaces">
    <title role="impl_interfaces.title">Implemented Interfaces</title>
    <para>
    Objects implementing org.freedesktop.ConsoleKit.Seat also implements
    org.freedesktop.DBus.Introspectable,
    org.freedesktop.DBus.Properties
    </para>
  </refsect1>
  <refsect1 role="properties">
    <title role="properties.title">Properties</title>
    <synopsis><link linkend="Seat:name">'name'</link> read      's'
</synopsis>
  </refsect1>
  <refsect1 role="desc"><title role="desc.title">Description</title>
      
        <para>A seat is a collection of sessions and a set of hardware (usually at
least a keyboard and mouse).  Only one session may be active on a
seat at a time.</para>
      
    </refsect1>
  <refsect1 role="details">
    <title role="details.title">Details</title>
    <refsect2><title><anchor role="function" id="Seat.GetId"/>GetId ()</title><indexterm><primary>GetId</primary><secondary>Seat</secondary></indexterm><programlisting>GetId (out 'o' sid)</programlisting>
          <para>Returns the ID for Seat.</para>
        <variablelist role="params"><varlistentry><term><parameter>sid</parameter>:</term><listitem><simpara>Seat ID</simpara></listitem></varlistentry></variablelist></refsect2>
    <refsect2><title><anchor role="function" id="Seat.GetName"/>GetName ()</title><indexterm><primary>GetName</primary><secondary>Seat</secondary></indexterm><programlisting>GetName (out 's' name)</programlisting>
          <para>Returns the name for Seat, such as Seat0.</para>
          <para>Since 1.1.1</para>
        <variablelist role="params"><varlistentry><term><parameter>name</parameter>:</term><listitem><simpara>Seat Name</simpara></listitem></varlistentry></variablelist></refsect2>
    <refsect2><title><anchor role="function" id="Seat.GetSessions"/>GetSessions ()</title><indexterm><primary>GetSessions</primary><secondary>Seat</secondary></indexterm><programlisting>GetSessions (out 'ao' sessions)</programlisting>
          <para>This gets a list of all the <link linkend="Session">Sessions</link>
          that are currently attached to this seat.</para>
          <para>Each Session ID is an D-Bus object path for the object that implements the
          <link linkend="Session">Session</link> interface.</para>
        <variablelist role="params"><varlistentry><term><parameter>sessions</parameter>:</term><listitem><simpara>an array of Session IDs</simpara></listitem></varlistentry></variablelist></refsect2>
    <refsect2><title><anchor role="function" id="Seat.GetDevices"/>GetDevices ()</title><indexterm><primary>GetDevices</primary><secondary>Seat</secondary></indexterm><programlisting>GetDevices (out 'a(ss)' devices)</programlisting>
          <para>This gets a list of all the devices
          that are currently associated with this seat.</para>
          <para>Each device is an D-Bus structure that represents
          the device type and the device id.
          </para>
        <variablelist role="params"><varlistentry><term><parameter>devices</parameter>:</term><listitem><simpara>an array of devices</simpara></listitem></varlistentry></variablelist></refsect2>
    <refsect2><title><anchor role="function" id="Seat.GetActiveSession"/>GetActiveSession ()</title><indexterm><primary>GetActiveSession</primary><secondary>Seat</secondary></indexterm><programlisting>GetActiveSession (out 'o' ssid)</programlisting>
          <para>Gets the Session ID that is currently active on this Seat.</para>
          <para>Fails with CK_SEAT_ERROR_NO_ACTIVE_SESSION if there is no active session.</para>
        <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist></refsect2>
    <refsect2><title><anchor role="function" id="Seat.CanActivateSessions"/>CanActivateSessions ()</title><indexterm><primary>CanActivateSessions</primary><secondary>Seat</secondary></indexterm><programlisting>CanActivateSessions (out 'b' can_activate)</programlisting><para>Used to determine whether the seat supports session activation.</para>
        <variablelist role="params"><varlistentry><term><parameter>can_activate</parameter>:</term><listitem><simpara>TRUE if seat supports session activation</simpara></listitem></varlistentry></variablelist></refsect2>
    <refsect2><title><anchor role="function" id="Seat.ActivateSession"/>ActivateSession ()</title><indexterm><primary>ActivateSession</primary><secondary>Seat</secondary></indexterm><programlisting>ActivateSession (in  'o' ssid)</programlisting>
          <para>Attempt to activate the specified session.  In most
          cases, if successful, this will cause the session to
          become visible and take control of the hardware that is
          associated with this seat.</para>
          <para>May fail with: CK_SEAT_ERROR_FAILED, CK_SEAT_ERROR_ALREADY_ACTIVE, CK_SEAT_ERROR_NOT_SUPPORTED</para>
        <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist><para>
See also:
<link linkend="Session.Activate"><function>Activate()</function></link></para></refsect2>
    <refsect2><title><anchor role="function" id="Seat.SwitchTo"/>SwitchTo ()</title><indexterm><primary>SwitchTo</primary><secondary>Seat</secondary></indexterm><programlisting>SwitchTo (in  'u' vtnr)</programlisting>
          <para>Attempt to activate the specified VT.  In most
          cases, if successful, this will cause the session to
          become visible and take control of the hardware that is
          associated with this seat.</para>
          <para>May fail with: CK_SEAT_ERROR_FAILED, CK_SEAT_ERROR_ALREADY_ACTIVE, CK_SEAT_ERROR_NOT_SUPPORTED, CK_SEAT_ERROR_GENERAL</para>
          <para>Since 1.1.1</para>
        <variablelist role="params"><varlistentry><term><parameter>vtnr</parameter>:</term><listitem><simpara>Virtual Terminal to switch to.</simpara></listitem></varlistentry></variablelist><para>
See also:
<link linkend="Session.Activate"><function>Activate()</function></link></para></refsect2>
  </refsect1>
  <refsect1 role="signals">
    <title role="signals.title">Signal Details</title>
    <refsect2><title><anchor role="function" id="Seat::ActiveSessionChanged"/>The ActiveSessionChanged signal</title><indexterm><primary>ActiveSessionChanged</primary><secondary>Seat</secondary></indexterm><programlisting>ActiveSessionChanged ('o' ssid)</programlisting>
          <para>Emitted when the active session has changed.</para>
        <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist></refsect2>
    <refsect2><title><anchor role="function" id="Seat::SessionAdded"/>The SessionAdded signal</title><indexterm><primary>SessionAdded</primary><secondary>Seat</secondary></indexterm><programlisting>SessionAdded ('o' ssid)</programlisting>
          <para>Emitted when a session has been added to the seat.</para>
        <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist></refsect2>
    <refsect2><title><anchor role="function" id="Seat::SessionRemoved"/>The SessionRemoved signal</title><indexterm><primary>SessionRemoved</primary><secondary>Seat</secondary></indexterm><programlisting>SessionRemoved ('o' ssid)</programlisting>
          <para>Emitted when a session has been removed from the seat.</para>
        <variablelist role="params"><varlistentry><term><parameter>ssid</parameter>:</term><listitem><simpara>Session ID</simpara></listitem></varlistentry></variablelist></refsect2>
    <refsect2><title><anchor role="function" id="Seat::DeviceAdded"/>The DeviceAdded signal</title><indexterm><primary>DeviceAdded</primary><secondary>Seat</secondary></indexterm><programlisting>DeviceAdded ('(ss)' device)</programlisting>
          <para>Emitted when a device has been associated with the seat.</para>
        <variablelist role="params"><varlistentry><term><parameter>device</parameter>:</term><listitem><simpara>Device structure</simpara></listitem></varlistentry></variablelist></refsect2>
    <refsect2><title><anchor role="function" id="Seat::DeviceRemoved"/>The DeviceRemoved signal</title><indexterm><primary>DeviceRemoved</primary><secondary>Seat</secondary></indexterm><programlisting>DeviceRemoved ('(ss)' device)</programlisting>
          <para>Emitted when a device has been dissociated from the seat.</para>
        <variablelist role="params"><varlistentry><term><parameter>device</parameter>:</term><listitem><simpara>Device structure</simpara></listitem></varlistentry></variablelist></refsect2>
  </refsect1>
  <refsect1 role="property_details">
    <title role="property_details.title">Property Details</title>
    <refsect2><title><anchor role="function" id="Seat:name"/>The "name" property</title><indexterm><primary>name</primary><secondary>Seat</secondary></indexterm><programlisting>'name'  read      's'
</programlisting>
          <para>The Seat's name, such as Seat0</para>
          <para>Since 1.1.1</para>
        </refsect2>
  </refsect1>
</refentry>
