···11+<?xml version="1.0" encoding="UTF-8"?>
22+<protocol name="seat_v1" version="1">
33+ <object name="seat_manager" version="1">
44+ <description summary="seat manager">
55+ Interface for creating client seat connections.
66+ </description>
77+ <c2s name="open_seat">
88+ <description summary="open the caller's seat">
99+ Creates a seat object for the client's current session.
1010+ The daemon sends either enabled or disabled to indicate the initial seat
1111+ state.
1212+ </description>
1313+ <returns iface="seat"/>
1414+ </c2s>
1515+ <c2s name="destroy" destructor="true">
1616+ <description summary="destroy this object"/>
1717+ </c2s>
1818+ </object>
1919+2020+ <object name="seat" version="1">
2121+ <description summary="client seat">
2222+ Seat control interface based on libseat. A client opens a seat, reacts to
2323+ enabled and disabled events, opens device objects while enabled, and may
2424+ request session switches when supported by the daemon.
2525+ </description>
2626+ <s2c name="enabled">
2727+ <description summary="seat is active for this client">
2828+ Sent when the client may open and use seat devices.
2929+ </description>
3030+ </s2c>
3131+ <s2c name="disabled">
3232+ <description summary="seat is inactive for this client">
3333+ Sent when the client must stop using devices opened through this seat and
3434+ acknowledge the state change with ack_disabled.
3535+ </description>
3636+ </s2c>
3737+ <s2c name="session_switched">
3838+ <description summary="session switch became active">
3939+ Emitted when a session switch has taken effect.
4040+ </description>
4141+ <arg name="session" type="uint" summary="active session or VT number"/>
4242+ </s2c>
4343+ <s2c name="seat_error">
4444+ <description summary="fatal seat protocol error">
4545+ Sent before the seat object is terminated after a fatal seat-scoped
4646+ protocol error.
4747+ </description>
4848+ <arg name="seat_error" type="enum" interface="seat_error" summary="error kind"/>
4949+ <arg name="message" type="varchar" summary="human-readable error detail"/>
5050+ </s2c>
5151+ <c2s name="ack_disabled">
5252+ <description summary="acknowledge disabled state">
5353+ Acknowledges the most recent disabled event.
5454+ </description>
5555+ </c2s>
5656+ <c2s name="open_device">
5757+ <description summary="open a device on this seat">
5858+ Opens path and returns a device object. The returned object resolves
5959+ exactly once with either opened or failed.
6060+ </description>
6161+ <returns iface="device"/>
6262+ <arg name="path" type="varchar" summary="device path"/>
6363+ </c2s>
6464+ <c2s name="switch_session">
6565+ <description summary="switch to another session or VT">
6666+ Requests switching to the given target session. The daemon reports a seat
6767+ error if switching is not supported.
6868+ </description>
6969+ <arg name="session" type="uint" summary="target session or VT number"/>
7070+ </c2s>
7171+ <c2s name="destroy" destructor="true">
7272+ <description summary="close the seat">
7373+ Closes the seat and any devices still associated with it.
7474+ </description>
7575+ </c2s>
7676+ </object>
7777+7878+ <object name="device" version="1">
7979+ <description summary="seat device">
8080+ Device object created by seat.open_device. It resolves exactly once with
8181+ either opened or failed. If revoked is emitted, the device is permanently
8282+ unusable and the client should destroy the object.
8383+ </description>
8484+ <s2c name="opened">
8585+ <description summary="device opened successfully"/>
8686+ <arg name="device_id" type="uint" summary="device id"/>
8787+ <arg name="fd" type="fd" summary="opened device file descriptor"/>
8888+ <arg name="path" type="varchar" summary="device path"/>
8989+ </s2c>
9090+ <s2c name="failed">
9191+ <description summary="device open failed"/>
9292+ <arg name="device_error" type="enum" interface="device_error" summary="error kind"/>
9393+ <arg name="errno" type="uint" summary="system errno value"/>
9494+ <arg name="message" type="varchar" summary="human-readable error detail"/>
9595+ </s2c>
9696+ <s2c name="revoked">
9797+ <description summary="device revoked">
9898+ The fd and object must not be used again after this event.
9999+ </description>
100100+ </s2c>
101101+ <c2s name="destroy" destructor="true">
102102+ <description summary="close the device handle"/>
103103+ </c2s>
104104+ </object>
105105+106106+ <enum name="device_error">
107107+ <value idx="0" name="seat_disabled" summary="seat was disabled when opening the device"/>
108108+ <value idx="1" name="open_failed" summary="device open failed"/>
109109+ </enum>
110110+111111+ <enum name="seat_error">
112112+ <value idx="0" name="invalid_ack_disabled" summary="ack_disabled was sent while enabled"/>
113113+ <value idx="1" name="already_disabled" summary="disabled state was already acknowledged"/>
114114+ <value idx="2" name="invalid_switch_session" summary="session switching is not supported"/>
115115+ </enum>
116116+</protocol>
+4-3
protocols/session_core_v1.xml
···5858 <s2c name="username">
5959 <arg name="username" type="varchar" summary="username"/>
6060 </s2c>
6161- <s2c name="tty">
6262- <arg name="tty" type="varchar" summary="TTY device"/>
6161+ <s2c name="vt">
6262+ <arg name="vt" type="uint" summary="virtual terminal number"/>
6363 </s2c>
6464 <s2c name="seat">
6565 <arg name="seat" type="varchar" summary="seat name"/>
···7272 </s2c>
7373 <s2c name="active">
7474 <description summary="session active state"/>
7575- <arg name="state" type="uint" enum="active_state" summary="session active state"/>
7575+ <arg name="state" type="enum" interface="active_state" summary="session active state"/>
7676 </s2c>
7777 <s2c name="locked">
7878 <description summary="session is locked"/>
···118118 <value idx="0" name="online" summary="session is logged in but not in the foreground"/>
119119 <value idx="1" name="active" summary="session is in the foreground"/>
120120 <value idx="2" name="closing" summary="session is being destroyed"/>
121121+ <value idx="3" name="opening" summary="session is being created"/>
121122 </enum>
122123123124 <enum name="error_code">
+2-1
protocols/session_management_v1.xml
···1212 </description>
1313 <arg name="uid" type="uint" summary="user id"/>
1414 <arg name="username" type="varchar" summary="username"/>
1515- <arg name="tty" type="varchar" summary="TTY device"/>
1515+ <arg name="vt" type="uint" summary="virtual terminal number"/>
1616 </c2s>
1717 <s2c name="session_created">
1818 <description summary="session ID assigned to the new session">
1919 Sent only to the manager that called create_session.
2020 </description>
2121 <arg name="session_id" type="uint" summary="unique session identifier"/>
2222+ <arg name="seat" type="varchar" summary="seat name assigned to the session"/>
2223 </s2c>
2324 <c2s name="destroy_session">
2425 <description summary="deregister a session">