2017-08-24 21:14:00 +02:00
|
|
|
# -*- Mode: Python -*-
|
2020-07-29 20:50:24 +02:00
|
|
|
# vim: filetype=python
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
##
|
|
|
|
# = Remote desktop
|
|
|
|
##
|
|
|
|
|
2020-10-20 12:47:58 +02:00
|
|
|
{ 'include': 'common.json' }
|
2017-08-24 21:14:00 +02:00
|
|
|
{ 'include': 'sockets.json' }
|
|
|
|
|
2022-02-25 09:49:48 +01:00
|
|
|
##
|
|
|
|
# @DisplayProtocol:
|
|
|
|
#
|
|
|
|
# Display protocols which support changing password options.
|
|
|
|
#
|
|
|
|
# Since: 7.0
|
|
|
|
##
|
|
|
|
{ 'enum': 'DisplayProtocol',
|
|
|
|
'data': [ 'vnc', 'spice' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @SetPasswordAction:
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# An action to take on changing a password on a connection with active
|
|
|
|
# clients.
|
2022-02-25 09:49:48 +01:00
|
|
|
#
|
|
|
|
# @keep: maintain existing clients
|
|
|
|
#
|
|
|
|
# @fail: fail the command if clients are connected
|
|
|
|
#
|
|
|
|
# @disconnect: disconnect existing clients
|
|
|
|
#
|
|
|
|
# Since: 7.0
|
|
|
|
##
|
|
|
|
{ 'enum': 'SetPasswordAction',
|
|
|
|
'data': [ 'keep', 'fail', 'disconnect' ] }
|
|
|
|
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
2022-02-25 09:49:49 +01:00
|
|
|
# @SetPasswordOptions:
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2022-02-25 09:49:49 +01:00
|
|
|
# Options for set_password.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @protocol:
|
|
|
|
# - 'vnc' to modify the VNC server password
|
|
|
|
# - 'spice' to modify the Spice server password
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @password: the new password
|
|
|
|
#
|
2022-02-25 09:49:49 +01:00
|
|
|
# @connected: How to handle existing clients when changing the
|
2023-04-28 12:54:29 +02:00
|
|
|
# password. If nothing is specified, defaults to 'keep'. For VNC,
|
|
|
|
# only 'keep' is currently implemented.
|
2022-02-25 09:49:49 +01:00
|
|
|
#
|
|
|
|
# Since: 7.0
|
|
|
|
##
|
|
|
|
{ 'union': 'SetPasswordOptions',
|
|
|
|
'base': { 'protocol': 'DisplayProtocol',
|
|
|
|
'password': 'str',
|
|
|
|
'*connected': 'SetPasswordAction' },
|
|
|
|
'discriminator': 'protocol',
|
|
|
|
'data': { 'vnc': 'SetPasswordOptionsVnc' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @SetPasswordOptionsVnc:
|
|
|
|
#
|
2024-02-20 09:52:22 +01:00
|
|
|
# Options for set_password specific to the VNC protocol.
|
2022-02-25 09:49:49 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @display: The id of the display where the password should be
|
|
|
|
# changed. Defaults to the first.
|
2022-02-25 09:49:49 +01:00
|
|
|
#
|
|
|
|
# Since: 7.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'SetPasswordOptionsVnc',
|
|
|
|
'data': { '*display': 'str' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @set_password:
|
|
|
|
#
|
|
|
|
# Set the password of a remote display server.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2024-02-27 12:39:12 +01:00
|
|
|
# Errors:
|
2023-04-28 12:54:29 +02:00
|
|
|
# - If Spice is not enabled, DeviceNotFound
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "set_password", "arguments": { "protocol": "vnc",
|
|
|
|
# "password": "secret" } }
|
|
|
|
# <- { "return": {} }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
2022-02-25 09:49:49 +01:00
|
|
|
{ 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
2022-02-25 09:49:49 +01:00
|
|
|
# @ExpirePasswordOptions:
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2022-02-25 09:49:49 +01:00
|
|
|
# General options for expire_password.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @protocol:
|
|
|
|
# - 'vnc' to modify the VNC server expiration
|
|
|
|
# - 'spice' to modify the Spice server expiration
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @time: when to expire the password.
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# - 'now' to expire the password immediately
|
|
|
|
# - 'never' to cancel password expiration
|
|
|
|
# - '+INT' where INT is the number of seconds from now (integer)
|
|
|
|
# - 'INT' where INT is the absolute time in seconds
|
2020-02-13 18:56:30 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# Notes: Time is relative to the server and currently there is no way
|
|
|
|
# to coordinate server time with client time. It is not
|
|
|
|
# recommended to use the absolute time version of the @time
|
|
|
|
# parameter unless you're sure you are on the same machine as the
|
|
|
|
# QEMU instance.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2022-02-25 09:49:49 +01:00
|
|
|
# Since: 7.0
|
|
|
|
##
|
|
|
|
{ 'union': 'ExpirePasswordOptions',
|
|
|
|
'base': { 'protocol': 'DisplayProtocol',
|
|
|
|
'time': 'str' },
|
|
|
|
'discriminator': 'protocol',
|
|
|
|
'data': { 'vnc': 'ExpirePasswordOptionsVnc' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @ExpirePasswordOptionsVnc:
|
|
|
|
#
|
2024-02-20 09:52:22 +01:00
|
|
|
# Options for expire_password specific to the VNC protocol.
|
2022-02-25 09:49:49 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @display: The id of the display where the expiration should be
|
|
|
|
# changed. Defaults to the first.
|
2022-02-25 09:49:49 +01:00
|
|
|
#
|
|
|
|
# Since: 7.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'ExpirePasswordOptionsVnc',
|
|
|
|
'data': { '*display': 'str' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @expire_password:
|
|
|
|
#
|
|
|
|
# Expire the password of a remote display server.
|
|
|
|
#
|
2024-02-27 12:39:12 +01:00
|
|
|
# Errors:
|
2023-04-28 12:54:29 +02:00
|
|
|
# - If @protocol is 'spice' and Spice is not active,
|
|
|
|
# DeviceNotFound
|
2022-02-25 09:49:49 +01:00
|
|
|
#
|
|
|
|
# Since: 0.14
|
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
|
|
|
|
# "time": "+60" } }
|
|
|
|
# <- { "return": {} }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
2022-02-25 09:49:49 +01:00
|
|
|
{ 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
2022-04-08 09:13:35 +02:00
|
|
|
##
|
|
|
|
# @ImageFormat:
|
|
|
|
#
|
|
|
|
# Supported image format types.
|
|
|
|
#
|
|
|
|
# @png: PNG format
|
|
|
|
#
|
|
|
|
# @ppm: PPM format
|
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'enum': 'ImageFormat',
|
|
|
|
'data': ['ppm', 'png'] }
|
|
|
|
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
# @screendump:
|
|
|
|
#
|
2022-04-08 09:13:35 +02:00
|
|
|
# Capture the contents of a screen and write it to a file.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2022-04-08 09:13:35 +02:00
|
|
|
# @filename: the path of a new file to store the image
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @device: ID of the display device that should be dumped. If this
|
|
|
|
# parameter is missing, the primary display will be used. (Since
|
|
|
|
# 2.12)
|
2018-03-05 17:37:48 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @head: head to use in case the device supports multiple heads. If
|
|
|
|
# this parameter is missing, head #0 will be used. Also note that
|
|
|
|
# the head can only be specified in conjunction with the device
|
|
|
|
# ID. (Since 2.12)
|
2018-03-05 17:37:48 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @format: image format for screendump. (default: ppm) (Since 7.1)
|
2022-04-08 09:13:35 +02:00
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "screendump",
|
|
|
|
# "arguments": { "filename": "/tmp/image" } }
|
|
|
|
# <- { "return": {} }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
2018-03-05 17:37:48 +01:00
|
|
|
{ 'command': 'screendump',
|
2022-04-08 09:13:35 +02:00
|
|
|
'data': {'filename': 'str', '*device': 'str', '*head': 'int',
|
|
|
|
'*format': 'ImageFormat'},
|
2023-08-30 11:38:29 +02:00
|
|
|
'coroutine': true,
|
|
|
|
'if': 'CONFIG_PIXMAN' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# == Spice
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# @SpiceBasicInfo:
|
|
|
|
#
|
|
|
|
# The basic information for SPICE network connection
|
|
|
|
#
|
|
|
|
# @host: IP address
|
|
|
|
#
|
|
|
|
# @port: port number
|
|
|
|
#
|
|
|
|
# @family: address family
|
|
|
|
#
|
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'SpiceBasicInfo',
|
|
|
|
'data': { 'host': 'str',
|
|
|
|
'port': 'str',
|
2018-07-03 17:56:48 +02:00
|
|
|
'family': 'NetworkAddressFamily' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_SPICE' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SpiceServerInfo:
|
|
|
|
#
|
|
|
|
# Information about a SPICE server
|
|
|
|
#
|
|
|
|
# @auth: authentication method
|
|
|
|
#
|
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'SpiceServerInfo',
|
|
|
|
'base': 'SpiceBasicInfo',
|
2018-07-03 17:56:48 +02:00
|
|
|
'data': { '*auth': 'str' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_SPICE' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SpiceChannel:
|
|
|
|
#
|
|
|
|
# Information about a SPICE client channel.
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @connection-id: SPICE connection id number. All channels with the
|
|
|
|
# same id belong to the same SPICE session.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @channel-type: SPICE channel type number. "1" is the main control
|
2023-04-28 12:54:29 +02:00
|
|
|
# channel, filter for this one if you want to track spice sessions
|
|
|
|
# only
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @channel-id: SPICE channel ID number. Usually "0", might be
|
|
|
|
# different when multiple channels of the same type exist, such as
|
|
|
|
# multiple display channels in a multihead setup
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @tls: true if the channel is encrypted, false otherwise.
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'SpiceChannel',
|
|
|
|
'base': 'SpiceBasicInfo',
|
|
|
|
'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
|
2018-07-03 17:56:48 +02:00
|
|
|
'tls': 'bool'},
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_SPICE' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SpiceQueryMouseMode:
|
|
|
|
#
|
|
|
|
# An enumeration of Spice mouse states.
|
|
|
|
#
|
|
|
|
# @client: Mouse cursor position is determined by the client.
|
|
|
|
#
|
|
|
|
# @server: Mouse cursor position is determined by the server.
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @unknown: No information is available about mouse mode used by the
|
|
|
|
# spice server.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
|
|
|
|
#
|
|
|
|
# Since: 1.1
|
|
|
|
##
|
|
|
|
{ 'enum': 'SpiceQueryMouseMode',
|
2018-07-03 17:56:48 +02:00
|
|
|
'data': [ 'client', 'server', 'unknown' ],
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_SPICE' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SpiceInfo:
|
|
|
|
#
|
|
|
|
# Information about the SPICE session.
|
|
|
|
#
|
|
|
|
# @enabled: true if the SPICE server is enabled, false otherwise
|
|
|
|
#
|
|
|
|
# @migrated: true if the last guest migration completed and spice
|
2023-04-28 12:54:29 +02:00
|
|
|
# migration had completed as well. false otherwise. (since 1.4)
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @host: The hostname the SPICE server is bound to. This depends on
|
2023-04-28 12:54:29 +02:00
|
|
|
# the name resolution on the host and may be an IP address.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @port: The SPICE server's port number.
|
|
|
|
#
|
|
|
|
# @compiled-version: SPICE server version.
|
|
|
|
#
|
|
|
|
# @tls-port: The SPICE server's TLS port number.
|
|
|
|
#
|
|
|
|
# @auth: the current authentication type used by the server
|
2020-02-13 18:56:30 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# - 'none' if no authentication is being used
|
|
|
|
# - 'spice' uses SASL or direct TLS authentication, depending on
|
|
|
|
# command line options
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @mouse-mode: The mode in which the mouse cursor is displayed
|
|
|
|
# currently. Can be determined by the client or the server, or
|
|
|
|
# unknown if spice server doesn't provide this information.
|
|
|
|
# (since: 1.1)
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @channels: a list of @SpiceChannel for each active spice channel
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'SpiceInfo',
|
|
|
|
'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
|
|
|
|
'*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
|
2018-07-03 17:56:48 +02:00
|
|
|
'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_SPICE' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @query-spice:
|
|
|
|
#
|
|
|
|
# Returns information about the current SPICE server
|
|
|
|
#
|
|
|
|
# Returns: @SpiceInfo
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "query-spice" }
|
|
|
|
# <- { "return": {
|
|
|
|
# "enabled": true,
|
|
|
|
# "auth": "spice",
|
|
|
|
# "port": 5920,
|
|
|
|
# "migrated":false,
|
|
|
|
# "tls-port": 5921,
|
|
|
|
# "host": "0.0.0.0",
|
|
|
|
# "mouse-mode":"client",
|
|
|
|
# "channels": [
|
|
|
|
# {
|
|
|
|
# "port": "54924",
|
|
|
|
# "family": "ipv4",
|
|
|
|
# "channel-type": 1,
|
|
|
|
# "connection-id": 1804289383,
|
|
|
|
# "host": "127.0.0.1",
|
|
|
|
# "channel-id": 0,
|
|
|
|
# "tls": true
|
|
|
|
# },
|
|
|
|
# {
|
|
|
|
# "port": "36710",
|
|
|
|
# "family": "ipv4",
|
|
|
|
# "channel-type": 4,
|
|
|
|
# "connection-id": 1804289383,
|
|
|
|
# "host": "127.0.0.1",
|
|
|
|
# "channel-id": 0,
|
|
|
|
# "tls": false
|
|
|
|
# },
|
|
|
|
# [ ... more channels follow ... ]
|
|
|
|
# ]
|
|
|
|
# }
|
|
|
|
# }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
2018-07-03 17:56:48 +02:00
|
|
|
{ 'command': 'query-spice', 'returns': 'SpiceInfo',
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_SPICE' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SPICE_CONNECTED:
|
|
|
|
#
|
|
|
|
# Emitted when a SPICE client establishes a connection
|
|
|
|
#
|
|
|
|
# @server: server information
|
|
|
|
#
|
|
|
|
# @client: client information
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
|
|
|
|
# "event": "SPICE_CONNECTED",
|
|
|
|
# "data": {
|
|
|
|
# "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
|
|
|
|
# "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
|
|
|
|
# }}
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'event': 'SPICE_CONNECTED',
|
|
|
|
'data': { 'server': 'SpiceBasicInfo',
|
2018-07-03 17:56:48 +02:00
|
|
|
'client': 'SpiceBasicInfo' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_SPICE' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SPICE_INITIALIZED:
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# Emitted after initial handshake and authentication takes place (if
|
|
|
|
# any) and the SPICE channel is up and running
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @server: server information
|
|
|
|
#
|
|
|
|
# @client: client information
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
|
|
|
|
# "event": "SPICE_INITIALIZED",
|
|
|
|
# "data": {"server": {"auth": "spice", "port": "5921",
|
|
|
|
# "family": "ipv4", "host": "127.0.0.1"},
|
|
|
|
# "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
|
|
|
|
# "connection-id": 1804289383, "host": "127.0.0.1",
|
|
|
|
# "channel-id": 0, "tls": true}
|
|
|
|
# }}
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'event': 'SPICE_INITIALIZED',
|
|
|
|
'data': { 'server': 'SpiceServerInfo',
|
2018-07-03 17:56:48 +02:00
|
|
|
'client': 'SpiceChannel' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_SPICE' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SPICE_DISCONNECTED:
|
|
|
|
#
|
|
|
|
# Emitted when the SPICE connection is closed
|
|
|
|
#
|
|
|
|
# @server: server information
|
|
|
|
#
|
|
|
|
# @client: client information
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
|
|
|
|
# "event": "SPICE_DISCONNECTED",
|
|
|
|
# "data": {
|
|
|
|
# "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
|
|
|
|
# "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
|
|
|
|
# }}
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'event': 'SPICE_DISCONNECTED',
|
|
|
|
'data': { 'server': 'SpiceBasicInfo',
|
2018-07-03 17:56:48 +02:00
|
|
|
'client': 'SpiceBasicInfo' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_SPICE' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SPICE_MIGRATE_COMPLETED:
|
|
|
|
#
|
|
|
|
# Emitted when SPICE migration has completed
|
|
|
|
#
|
|
|
|
# Since: 1.3
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
|
|
|
|
# "event": "SPICE_MIGRATE_COMPLETED" }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
2018-07-03 17:56:48 +02:00
|
|
|
{ 'event': 'SPICE_MIGRATE_COMPLETED',
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_SPICE' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# == VNC
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VncBasicInfo:
|
|
|
|
#
|
|
|
|
# The basic information for vnc network connection
|
|
|
|
#
|
|
|
|
# @host: IP address
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @service: The service name of the vnc port. This may depend on the
|
|
|
|
# host system's service database so symbolic names should not be
|
|
|
|
# relied on.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @family: address family
|
|
|
|
#
|
|
|
|
# @websocket: true in case the socket is a websocket (since 2.3).
|
|
|
|
#
|
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'VncBasicInfo',
|
|
|
|
'data': { 'host': 'str',
|
|
|
|
'service': 'str',
|
|
|
|
'family': 'NetworkAddressFamily',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'websocket': 'bool' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VncServerInfo:
|
|
|
|
#
|
|
|
|
# The network connection information for server
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @auth: authentication method used for the plain (non-websocket) VNC
|
|
|
|
# server
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'VncServerInfo',
|
|
|
|
'base': 'VncBasicInfo',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'data': { '*auth': 'str' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VncClientInfo:
|
|
|
|
#
|
|
|
|
# Information about a connected VNC client.
|
|
|
|
#
|
|
|
|
# @x509_dname: If x509 authentication is in use, the Distinguished
|
2023-04-28 12:54:29 +02:00
|
|
|
# Name of the client.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @sasl_username: If SASL authentication is in use, the SASL username
|
2023-04-28 12:54:29 +02:00
|
|
|
# used for authentication.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VncClientInfo',
|
|
|
|
'base': 'VncBasicInfo',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VncInfo:
|
|
|
|
#
|
|
|
|
# Information about the VNC session.
|
|
|
|
#
|
|
|
|
# @enabled: true if the VNC server is enabled, false otherwise
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @host: The hostname the VNC server is bound to. This depends on the
|
|
|
|
# name resolution on the host and may be an IP address.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @family:
|
|
|
|
# - 'ipv6' if the host is listening for IPv6 connections
|
|
|
|
# - 'ipv4' if the host is listening for IPv4 connections
|
|
|
|
# - 'unix' if the host is listening on a unix domain socket
|
|
|
|
# - 'unknown' otherwise
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @service: The service name of the server's port. This may depends
|
2023-04-28 12:54:29 +02:00
|
|
|
# on the host system's service database so symbolic names should
|
|
|
|
# not be relied on.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @auth: the current authentication type used by the server
|
2020-02-13 18:56:30 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# - 'none' if no authentication is being used
|
|
|
|
# - 'vnc' if VNC authentication is being used
|
|
|
|
# - 'vencrypt+plain' if VEncrypt is used with plain text
|
|
|
|
# authentication
|
|
|
|
# - 'vencrypt+tls+none' if VEncrypt is used with TLS and no
|
|
|
|
# authentication
|
|
|
|
# - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC
|
|
|
|
# authentication
|
|
|
|
# - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain
|
|
|
|
# text auth
|
|
|
|
# - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
|
|
|
|
# - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
|
|
|
|
# - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain
|
|
|
|
# text auth
|
|
|
|
# - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
|
|
|
|
# - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL
|
|
|
|
# auth
|
|
|
|
#
|
|
|
|
# @clients: a list of @VncClientInfo of all currently connected
|
|
|
|
# clients
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VncInfo',
|
|
|
|
'data': {'enabled': 'bool', '*host': 'str',
|
|
|
|
'*family': 'NetworkAddressFamily',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VncPrimaryAuth:
|
|
|
|
#
|
|
|
|
# vnc primary authentication method.
|
|
|
|
#
|
|
|
|
# Since: 2.3
|
|
|
|
##
|
|
|
|
{ 'enum': 'VncPrimaryAuth',
|
|
|
|
'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'tls', 'vencrypt', 'sasl' ],
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VncVencryptSubAuth:
|
|
|
|
#
|
|
|
|
# vnc sub authentication method with vencrypt.
|
|
|
|
#
|
|
|
|
# Since: 2.3
|
|
|
|
##
|
|
|
|
{ 'enum': 'VncVencryptSubAuth',
|
|
|
|
'data': [ 'plain',
|
|
|
|
'tls-none', 'x509-none',
|
|
|
|
'tls-vnc', 'x509-vnc',
|
|
|
|
'tls-plain', 'x509-plain',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'tls-sasl', 'x509-sasl' ],
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VncServerInfo2:
|
|
|
|
#
|
|
|
|
# The network connection information for server
|
|
|
|
#
|
|
|
|
# @auth: The current authentication type used by the servers
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @vencrypt: The vencrypt sub authentication type used by the servers,
|
|
|
|
# only specified in case auth == vencrypt.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Since: 2.9
|
|
|
|
##
|
|
|
|
{ 'struct': 'VncServerInfo2',
|
|
|
|
'base': 'VncBasicInfo',
|
|
|
|
'data': { 'auth' : 'VncPrimaryAuth',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'*vencrypt' : 'VncVencryptSubAuth' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VncInfo2:
|
|
|
|
#
|
|
|
|
# Information about a vnc server
|
|
|
|
#
|
|
|
|
# @id: vnc server name.
|
|
|
|
#
|
|
|
|
# @server: A list of @VncBasincInfo describing all listening sockets.
|
2023-04-28 12:54:29 +02:00
|
|
|
# The list can be empty (in case the vnc server is disabled). It
|
|
|
|
# also may have multiple entries: normal + websocket, possibly
|
|
|
|
# also ipv4 + ipv6 in the future.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @clients: A list of @VncClientInfo of all currently connected
|
|
|
|
# clients. The list can be empty, for obvious reasons.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @auth: The current authentication type used by the non-websockets
|
|
|
|
# servers
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @vencrypt: The vencrypt authentication type used by the servers,
|
2023-04-28 12:54:29 +02:00
|
|
|
# only specified in case auth == vencrypt.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @display: The display device the vnc server is linked to.
|
|
|
|
#
|
|
|
|
# Since: 2.3
|
|
|
|
##
|
|
|
|
{ 'struct': 'VncInfo2',
|
|
|
|
'data': { 'id' : 'str',
|
|
|
|
'server' : ['VncServerInfo2'],
|
|
|
|
'clients' : ['VncClientInfo'],
|
|
|
|
'auth' : 'VncPrimaryAuth',
|
|
|
|
'*vencrypt' : 'VncVencryptSubAuth',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'*display' : 'str' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @query-vnc:
|
|
|
|
#
|
|
|
|
# Returns information about the current VNC server
|
|
|
|
#
|
|
|
|
# Returns: @VncInfo
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "query-vnc" }
|
|
|
|
# <- { "return": {
|
|
|
|
# "enabled":true,
|
|
|
|
# "host":"0.0.0.0",
|
|
|
|
# "service":"50402",
|
|
|
|
# "auth":"vnc",
|
|
|
|
# "family":"ipv4",
|
|
|
|
# "clients":[
|
|
|
|
# {
|
|
|
|
# "host":"127.0.0.1",
|
|
|
|
# "service":"50401",
|
|
|
|
# "family":"ipv4",
|
|
|
|
# "websocket":false
|
|
|
|
# }
|
|
|
|
# ]
|
|
|
|
# }
|
|
|
|
# }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
{ 'command': 'query-vnc', 'returns': 'VncInfo',
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
# @query-vnc-servers:
|
|
|
|
#
|
|
|
|
# Returns a list of vnc servers. The list can be empty.
|
|
|
|
#
|
|
|
|
# Returns: a list of @VncInfo2
|
|
|
|
#
|
|
|
|
# Since: 2.3
|
|
|
|
##
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
{ 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @change-vnc-password:
|
|
|
|
#
|
|
|
|
# Change the VNC server password.
|
|
|
|
#
|
2020-02-13 18:56:26 +01:00
|
|
|
# @password: the new password to use with VNC authentication
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Since: 1.1
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# Notes: An empty password in this command will set the password to
|
|
|
|
# the empty string. Existing clients are unaffected by executing
|
|
|
|
# this command.
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
2018-12-08 12:16:04 +01:00
|
|
|
{ 'command': 'change-vnc-password',
|
|
|
|
'data': { 'password': 'str' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VNC_CONNECTED:
|
|
|
|
#
|
|
|
|
# Emitted when a VNC client establishes a connection
|
|
|
|
#
|
|
|
|
# @server: server information
|
|
|
|
#
|
|
|
|
# @client: client information
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# Note: This event is emitted before any authentication takes place,
|
|
|
|
# thus the authentication ID is not provided
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.13
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# <- { "event": "VNC_CONNECTED",
|
|
|
|
# "data": {
|
|
|
|
# "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
|
|
|
|
# "service": "5901", "host": "0.0.0.0" },
|
|
|
|
# "client": { "family": "ipv4", "service": "58425",
|
|
|
|
# "host": "127.0.0.1", "websocket": false } },
|
|
|
|
# "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'event': 'VNC_CONNECTED',
|
|
|
|
'data': { 'server': 'VncServerInfo',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'client': 'VncBasicInfo' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VNC_INITIALIZED:
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# Emitted after authentication takes place (if any) and the VNC
|
|
|
|
# session is made active
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# @server: server information
|
|
|
|
#
|
|
|
|
# @client: client information
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.13
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# <- { "event": "VNC_INITIALIZED",
|
|
|
|
# "data": {
|
|
|
|
# "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
|
|
|
|
# "service": "5901", "host": "0.0.0.0"},
|
|
|
|
# "client": { "family": "ipv4", "service": "46089", "websocket": false,
|
|
|
|
# "host": "127.0.0.1", "sasl_username": "luiz" } },
|
|
|
|
# "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'event': 'VNC_INITIALIZED',
|
|
|
|
'data': { 'server': 'VncServerInfo',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'client': 'VncClientInfo' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VNC_DISCONNECTED:
|
|
|
|
#
|
|
|
|
# Emitted when the connection is closed
|
|
|
|
#
|
|
|
|
# @server: server information
|
|
|
|
#
|
|
|
|
# @client: client information
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.13
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# <- { "event": "VNC_DISCONNECTED",
|
|
|
|
# "data": {
|
|
|
|
# "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
|
|
|
|
# "service": "5901", "host": "0.0.0.0" },
|
|
|
|
# "client": { "family": "ipv4", "service": "58425", "websocket": false,
|
|
|
|
# "host": "127.0.0.1", "sasl_username": "luiz" } },
|
|
|
|
# "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'event': 'VNC_DISCONNECTED',
|
|
|
|
'data': { 'server': 'VncServerInfo',
|
qapi: add conditions to VNC type/commands/events on the schema
Add #if defined(CONFIG_VNC) in generated code, and adjust the
qmp/hmp code accordingly.
query-qmp-schema no longer reports the command/events etc as
available when disabled at compile.
Commands made conditional:
* query-vnc, query-vnc-servers, change-vnc-password
Before the patch, the commands for !CONFIG_VNC are stubs that fail
like this:
{"error": {"class": "GenericError",
"desc": "The feature 'vnc' is not enabled"}}
Afterwards, they fail like this:
{"error": {"class": "CommandNotFound",
"desc": "The command FOO has not been found"}}
I call that an improvement, because it lets clients distinguish
between command unavailable (class CommandNotFound) and command failed
(class GenericError).
Events made conditional:
* VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED
HMP change:
* info vnc
Will return "unknown command: 'info vnc'" when VNC is compiled
out (same as error for spice when --disable-spice)
Occurrences of VNC (case insensitive) in the schema that aren't
covered by this change:
* add_client
Command has other uses, including "socket bases character devices".
These are unconditional as far as I can tell.
* set_password, expire_password
In theory, these commands could be used for managing any service's
password. In practice, they're used for VNC and SPICE services.
They're documented for "remote display session" / "remote display
server".
The service is selected by argument @protocol. The code special-cases
protocol-specific argument checking, then calls a protocol-specific
function to do the work. If it fails, the command fails with "Could
not set password". It does when the service isn't compiled in (it's a
stub then).
We could make these commands conditional on the conjunction of all
services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)],
but I doubt it's worthwhile.
* change
Command has other uses, namely changing media.
This patch inlines a stub; no functional change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03 17:56:47 +02:00
|
|
|
'client': 'VncClientInfo' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'if': 'CONFIG_VNC' }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# = Input
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# @MouseInfo:
|
|
|
|
#
|
|
|
|
# Information about a mouse device.
|
|
|
|
#
|
|
|
|
# @name: the name of the mouse device
|
|
|
|
#
|
|
|
|
# @index: the index of the mouse device
|
|
|
|
#
|
|
|
|
# @current: true if this device is currently receiving mouse events
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @absolute: true if this device supports absolute coordinates as
|
|
|
|
# input
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'MouseInfo',
|
|
|
|
'data': {'name': 'str', 'index': 'int', 'current': 'bool',
|
|
|
|
'absolute': 'bool'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-mice:
|
|
|
|
#
|
|
|
|
# Returns information about each active mouse device
|
|
|
|
#
|
|
|
|
# Returns: a list of @MouseInfo for each device
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 0.14
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "query-mice" }
|
|
|
|
# <- { "return": [
|
|
|
|
# {
|
|
|
|
# "name":"QEMU Microsoft Mouse",
|
|
|
|
# "index":0,
|
|
|
|
# "current":false,
|
|
|
|
# "absolute":false
|
|
|
|
# },
|
|
|
|
# {
|
|
|
|
# "name":"QEMU PS/2 Mouse",
|
|
|
|
# "index":1,
|
|
|
|
# "current":true,
|
|
|
|
# "absolute":true
|
|
|
|
# }
|
|
|
|
# ]
|
|
|
|
# }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @QKeyCode:
|
|
|
|
#
|
|
|
|
# An enumeration of key name.
|
|
|
|
#
|
|
|
|
# This is used by the @send-key command.
|
|
|
|
#
|
|
|
|
# @unmapped: since 2.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @pause: since 2.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @ro: since 2.4
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @kp_comma: since 2.4
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @kp_equals: since 2.6
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @power: since 2.6
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @hiragana: since 2.9
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @henkan: since 2.9
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @yen: since 2.9
|
|
|
|
#
|
|
|
|
# @sleep: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @wake: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @audionext: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @audioprev: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @audiostop: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @audioplay: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @audiomute: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @volumeup: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @volumedown: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @mediaselect: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @mail: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @calculator: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @computer: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @ac_home: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @ac_back: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @ac_forward: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @ac_refresh: since 2.10
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# @ac_bookmarks: since 2.10
|
|
|
|
#
|
2018-01-16 14:42:14 +01:00
|
|
|
# @muhenkan: since 2.12
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2018-01-16 14:42:14 +01:00
|
|
|
# @katakanahiragana: since 2.12
|
|
|
|
#
|
2021-06-17 04:31:13 +02:00
|
|
|
# @lang1: since 6.1
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2021-06-17 04:31:13 +02:00
|
|
|
# @lang2: since 6.1
|
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f13: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f14: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f15: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f16: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f17: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f18: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f19: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f20: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f21: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f22: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f23: since 8.0
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 13:52:11 +01:00
|
|
|
# @f24: since 8.0
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# 'sysrq' was mistakenly added to hack around the fact that the ps2
|
|
|
|
# driver was not generating correct scancodes sequences when
|
|
|
|
# 'alt+print' was pressed. This flaw is now fixed and the 'sysrq' key
|
|
|
|
# serves no further purpose. Any further use of 'sysrq' will be
|
|
|
|
# transparently changed to 'print', so they are effectively synonyms.
|
2017-10-19 16:28:47 +02:00
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 1.3
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'enum': 'QKeyCode',
|
|
|
|
'data': [ 'unmapped',
|
|
|
|
'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
|
|
|
|
'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
|
|
|
|
'9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
|
|
|
|
'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
|
|
|
|
'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
|
|
|
|
'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
|
|
|
|
'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
|
|
|
|
'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
|
|
|
|
'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
|
|
|
|
'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
|
|
|
|
'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
|
|
|
|
'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
|
|
|
|
'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
|
|
|
|
'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
|
|
|
|
'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
|
2018-01-16 14:42:14 +01:00
|
|
|
'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
|
2017-08-24 21:14:00 +02:00
|
|
|
'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
|
|
|
|
'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
|
|
|
|
'volumeup', 'volumedown', 'mediaselect',
|
|
|
|
'mail', 'calculator', 'computer',
|
2021-06-17 04:31:13 +02:00
|
|
|
'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
|
2023-03-01 13:52:11 +01:00
|
|
|
'lang1', 'lang2','f13','f14','f15','f16','f17','f18','f19','f20','f21','f22','f23','f24' ] }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
2021-09-17 16:31:14 +02:00
|
|
|
##
|
|
|
|
# @KeyValueKind:
|
|
|
|
#
|
|
|
|
# Since: 1.3
|
|
|
|
##
|
|
|
|
{ 'enum': 'KeyValueKind',
|
|
|
|
'data': [ 'number', 'qcode' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @IntWrapper:
|
|
|
|
#
|
2024-02-05 08:47:06 +01:00
|
|
|
# @data: a numeric key code
|
|
|
|
#
|
2021-09-17 16:31:14 +02:00
|
|
|
# Since: 1.3
|
|
|
|
##
|
|
|
|
{ 'struct': 'IntWrapper',
|
|
|
|
'data': { 'data': 'int' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @QKeyCodeWrapper:
|
|
|
|
#
|
2024-02-05 08:47:06 +01:00
|
|
|
# @data: An enumeration of key name
|
|
|
|
#
|
2021-09-17 16:31:14 +02:00
|
|
|
# Since: 1.3
|
|
|
|
##
|
|
|
|
{ 'struct': 'QKeyCodeWrapper',
|
|
|
|
'data': { 'data': 'QKeyCode' } }
|
|
|
|
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
# @KeyValue:
|
|
|
|
#
|
|
|
|
# Represents a keyboard key.
|
|
|
|
#
|
2024-02-05 08:47:09 +01:00
|
|
|
# @type: key encoding
|
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 1.3
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'union': 'KeyValue',
|
2021-09-17 16:31:14 +02:00
|
|
|
'base': { 'type': 'KeyValueKind' },
|
|
|
|
'discriminator': 'type',
|
2017-08-24 21:14:00 +02:00
|
|
|
'data': {
|
2021-09-17 16:31:14 +02:00
|
|
|
'number': 'IntWrapper',
|
|
|
|
'qcode': 'QKeyCodeWrapper' } }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @send-key:
|
|
|
|
#
|
|
|
|
# Send keys to guest.
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @keys: An array of @KeyValue elements. All @KeyValues in this array
|
|
|
|
# are simultaneously sent to the guest. A @KeyValue.number value
|
|
|
|
# is sent directly to the guest, while @KeyValue.qcode must be a
|
|
|
|
# valid @QKeyCode value
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @hold-time: time to delay key up events, milliseconds. Defaults to
|
|
|
|
# 100
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2024-02-27 12:39:12 +01:00
|
|
|
# Errors:
|
2023-04-28 12:54:29 +02:00
|
|
|
# - If key is unknown or redundant, GenericError
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2020-11-18 07:41:58 +01:00
|
|
|
# Since: 1.3
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "send-key",
|
|
|
|
# "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
|
|
|
|
# { "type": "qcode", "data": "alt" },
|
|
|
|
# { "type": "qcode", "data": "delete" } ] } }
|
|
|
|
# <- { "return": {} }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'command': 'send-key',
|
|
|
|
'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @InputButton:
|
|
|
|
#
|
|
|
|
# Button of a pointer input device (mouse, tablet).
|
|
|
|
#
|
|
|
|
# @side: front side button of a 5-button mouse (since 2.9)
|
|
|
|
#
|
|
|
|
# @extra: rear side button of a 5-button mouse (since 2.9)
|
|
|
|
#
|
2023-05-26 13:29:21 +02:00
|
|
|
# @touch: screen contact on a multi-touch device (since 8.1)
|
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'enum' : 'InputButton',
|
|
|
|
'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
|
2023-05-26 13:29:21 +02:00
|
|
|
'extra', 'wheel-left', 'wheel-right', 'touch' ] }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @InputAxis:
|
|
|
|
#
|
|
|
|
# Position axis of a pointer input device (mouse, tablet).
|
|
|
|
#
|
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'enum' : 'InputAxis',
|
|
|
|
'data' : [ 'x', 'y' ] }
|
|
|
|
|
2023-05-26 13:29:21 +02:00
|
|
|
##
|
|
|
|
# @InputMultiTouchType:
|
|
|
|
#
|
|
|
|
# Type of a multi-touch event.
|
|
|
|
#
|
|
|
|
# Since: 8.1
|
|
|
|
##
|
|
|
|
{ 'enum' : 'InputMultiTouchType',
|
|
|
|
'data' : [ 'begin', 'update', 'end', 'cancel', 'data' ] }
|
|
|
|
|
|
|
|
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
# @InputKeyEvent:
|
|
|
|
#
|
|
|
|
# Keyboard input event.
|
|
|
|
#
|
2022-05-03 09:37:36 +02:00
|
|
|
# @key: Which key this event is for.
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2022-05-03 09:37:36 +02:00
|
|
|
# @down: True for key-down and false for key-up events.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'struct' : 'InputKeyEvent',
|
|
|
|
'data' : { 'key' : 'KeyValue',
|
|
|
|
'down' : 'bool' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @InputBtnEvent:
|
|
|
|
#
|
|
|
|
# Pointer button input event.
|
|
|
|
#
|
|
|
|
# @button: Which button this event is for.
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2022-05-03 09:37:36 +02:00
|
|
|
# @down: True for key-down and false for key-up events.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'struct' : 'InputBtnEvent',
|
|
|
|
'data' : { 'button' : 'InputButton',
|
|
|
|
'down' : 'bool' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @InputMoveEvent:
|
|
|
|
#
|
|
|
|
# Pointer motion input event.
|
|
|
|
#
|
2020-02-13 18:56:26 +01:00
|
|
|
# @axis: Which axis is referenced by @value.
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
|
|
|
# @value: Pointer position. For absolute coordinates the valid range
|
|
|
|
# is 0 -> 0x7ffff
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'struct' : 'InputMoveEvent',
|
|
|
|
'data' : { 'axis' : 'InputAxis',
|
|
|
|
'value' : 'int' } }
|
|
|
|
|
2023-05-26 13:29:21 +02:00
|
|
|
##
|
|
|
|
# @InputMultiTouchEvent:
|
|
|
|
#
|
|
|
|
# MultiTouch input event.
|
|
|
|
#
|
|
|
|
# @slot: Which slot has generated the event.
|
|
|
|
#
|
|
|
|
# @tracking-id: ID to correlate this event with previously generated
|
|
|
|
# events.
|
|
|
|
#
|
|
|
|
# @axis: Which axis is referenced by @value.
|
|
|
|
#
|
|
|
|
# @value: Contact position.
|
|
|
|
#
|
|
|
|
# Since: 8.1
|
|
|
|
##
|
|
|
|
{ 'struct' : 'InputMultiTouchEvent',
|
|
|
|
'data' : { 'type' : 'InputMultiTouchType',
|
|
|
|
'slot' : 'int',
|
|
|
|
'tracking-id': 'int',
|
|
|
|
'axis' : 'InputAxis',
|
|
|
|
'value' : 'int' } }
|
|
|
|
|
2021-09-17 16:31:15 +02:00
|
|
|
##
|
|
|
|
# @InputEventKind:
|
|
|
|
#
|
2023-05-26 13:29:21 +02:00
|
|
|
# @key: a keyboard input event
|
|
|
|
#
|
|
|
|
# @btn: a pointer button input event
|
|
|
|
#
|
|
|
|
# @rel: a relative pointer motion input event
|
|
|
|
#
|
|
|
|
# @abs: an absolute pointer motion input event
|
|
|
|
#
|
|
|
|
# @mtt: a multi-touch input event
|
|
|
|
#
|
2021-09-17 16:31:15 +02:00
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'enum': 'InputEventKind',
|
2023-05-26 13:29:21 +02:00
|
|
|
'data': [ 'key', 'btn', 'rel', 'abs', 'mtt' ] }
|
2021-09-17 16:31:15 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @InputKeyEventWrapper:
|
|
|
|
#
|
2024-02-05 08:47:06 +01:00
|
|
|
# @data: Keyboard input event
|
|
|
|
#
|
2021-09-17 16:31:15 +02:00
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'InputKeyEventWrapper',
|
|
|
|
'data': { 'data': 'InputKeyEvent' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @InputBtnEventWrapper:
|
|
|
|
#
|
2024-02-05 08:47:06 +01:00
|
|
|
# @data: Pointer button input event
|
|
|
|
#
|
2021-09-17 16:31:15 +02:00
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'InputBtnEventWrapper',
|
|
|
|
'data': { 'data': 'InputBtnEvent' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @InputMoveEventWrapper:
|
|
|
|
#
|
2024-02-05 08:47:06 +01:00
|
|
|
# @data: Pointer motion input event
|
|
|
|
#
|
2021-09-17 16:31:15 +02:00
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'InputMoveEventWrapper',
|
|
|
|
'data': { 'data': 'InputMoveEvent' } }
|
|
|
|
|
2023-05-26 13:29:21 +02:00
|
|
|
##
|
|
|
|
# @InputMultiTouchEventWrapper:
|
|
|
|
#
|
2024-02-05 08:47:06 +01:00
|
|
|
# @data: MultiTouch input event
|
|
|
|
#
|
2023-05-26 13:29:21 +02:00
|
|
|
# Since: 8.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'InputMultiTouchEventWrapper',
|
|
|
|
'data': { 'data': 'InputMultiTouchEvent' } }
|
|
|
|
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
# @InputEvent:
|
|
|
|
#
|
|
|
|
# Input event union.
|
|
|
|
#
|
2023-05-26 13:29:21 +02:00
|
|
|
# @type: the type of input event
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'union' : 'InputEvent',
|
2021-09-17 16:31:15 +02:00
|
|
|
'base': { 'type': 'InputEventKind' },
|
|
|
|
'discriminator': 'type',
|
|
|
|
'data' : { 'key' : 'InputKeyEventWrapper',
|
|
|
|
'btn' : 'InputBtnEventWrapper',
|
|
|
|
'rel' : 'InputMoveEventWrapper',
|
2023-05-26 13:29:21 +02:00
|
|
|
'abs' : 'InputMoveEventWrapper',
|
|
|
|
'mtt' : 'InputMultiTouchEventWrapper' } }
|
2017-08-24 21:14:00 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @input-send-event:
|
|
|
|
#
|
|
|
|
# Send input event(s) to guest.
|
|
|
|
#
|
|
|
|
# The @device and @head parameters can be used to send the input event
|
|
|
|
# to specific input devices in case (a) multiple input devices of the
|
|
|
|
# same kind are added to the virtual machine and (b) you have
|
|
|
|
# configured input routing (see docs/multiseat.txt) for those input
|
|
|
|
# devices. The parameters work exactly like the device and head
|
|
|
|
# properties of input devices. If @device is missing, only devices
|
|
|
|
# that have no input routing config are admissible. If @device is
|
|
|
|
# specified, both input devices with and without input routing config
|
|
|
|
# are admissible, but devices with input routing config take
|
|
|
|
# precedence.
|
|
|
|
#
|
2020-02-13 18:56:28 +01:00
|
|
|
# @device: display device to send event(s) to.
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
|
|
|
# @head: head to send event(s) to, in case the display device supports
|
|
|
|
# multiple scanouts.
|
|
|
|
#
|
2020-02-13 18:56:28 +01:00
|
|
|
# @events: List of InputEvent union.
|
|
|
|
#
|
2017-08-24 21:14:00 +02:00
|
|
|
# Since: 2.6
|
|
|
|
#
|
|
|
|
# Note: The consoles are visible in the qom tree, under
|
2023-04-28 12:54:29 +02:00
|
|
|
# /backend/console[$index]. They have a device link and head
|
|
|
|
# property, so it is possible to map which console belongs to
|
|
|
|
# which device and display.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2023-04-25 08:42:14 +02:00
|
|
|
# Examples:
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# 1. Press left mouse button.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "input-send-event",
|
|
|
|
# "arguments": { "device": "video0",
|
|
|
|
# "events": [ { "type": "btn",
|
|
|
|
# "data" : { "down": true, "button": "left" } } ] } }
|
|
|
|
# <- { "return": {} }
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "input-send-event",
|
|
|
|
# "arguments": { "device": "video0",
|
|
|
|
# "events": [ { "type": "btn",
|
|
|
|
# "data" : { "down": false, "button": "left" } } ] } }
|
|
|
|
# <- { "return": {} }
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# 2. Press ctrl-alt-del.
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "input-send-event",
|
|
|
|
# "arguments": { "events": [
|
|
|
|
# { "type": "key", "data" : { "down": true,
|
|
|
|
# "key": {"type": "qcode", "data": "ctrl" } } },
|
|
|
|
# { "type": "key", "data" : { "down": true,
|
|
|
|
# "key": {"type": "qcode", "data": "alt" } } },
|
|
|
|
# { "type": "key", "data" : { "down": true,
|
|
|
|
# "key": {"type": "qcode", "data": "delete" } } } ] } }
|
|
|
|
# <- { "return": {} }
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# 3. Move mouse pointer to absolute coordinates (20000, 400).
|
2017-08-24 21:14:00 +02:00
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "input-send-event" ,
|
|
|
|
# "arguments": { "events": [
|
|
|
|
# { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
|
|
|
|
# { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
|
|
|
|
# <- { "return": {} }
|
2017-08-24 21:14:00 +02:00
|
|
|
##
|
|
|
|
{ 'command': 'input-send-event',
|
|
|
|
'data': { '*device': 'str',
|
|
|
|
'*head' : 'int',
|
|
|
|
'events' : [ 'InputEvent' ] } }
|
2018-02-02 12:10:14 +01:00
|
|
|
|
|
|
|
##
|
|
|
|
# @DisplayGTK:
|
|
|
|
#
|
|
|
|
# GTK display options.
|
|
|
|
#
|
|
|
|
# @grab-on-hover: Grab keyboard input on mouse hover.
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2018-08-27 11:56:20 +02:00
|
|
|
# @zoom-to-fit: Zoom guest display to fit into the host window. When
|
2023-04-28 12:54:29 +02:00
|
|
|
# turned off the host window will be resized instead. In case the
|
|
|
|
# display device can notify the guest on window resizes
|
|
|
|
# (virtio-gpu) this will default to "on", assuming the guest will
|
|
|
|
# resize the display to match the window size then. Otherwise it
|
|
|
|
# defaults to "off". (Since 3.1)
|
|
|
|
#
|
|
|
|
# @show-tabs: Display the tab bar for switching between the various
|
2023-07-20 09:16:09 +02:00
|
|
|
# graphical interfaces (e.g. VGA and virtual console character
|
2023-04-28 12:54:29 +02:00
|
|
|
# devices) by default. (Since 7.1)
|
|
|
|
#
|
|
|
|
# @show-menubar: Display the main window menubar. Defaults to "on".
|
|
|
|
# (Since 8.0)
|
2018-02-02 12:10:14 +01:00
|
|
|
#
|
|
|
|
# Since: 2.12
|
|
|
|
##
|
|
|
|
{ 'struct' : 'DisplayGTK',
|
2018-08-27 11:56:20 +02:00
|
|
|
'data' : { '*grab-on-hover' : 'bool',
|
2022-07-12 15:37:53 +02:00
|
|
|
'*zoom-to-fit' : 'bool',
|
2022-10-11 15:58:21 +02:00
|
|
|
'*show-tabs' : 'bool',
|
|
|
|
'*show-menubar' : 'bool' } }
|
2018-02-02 12:10:14 +01:00
|
|
|
|
2018-11-16 11:14:42 +01:00
|
|
|
##
|
|
|
|
# @DisplayEGLHeadless:
|
|
|
|
#
|
|
|
|
# EGL headless display options.
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @rendernode: Which DRM render node should be used. Default is the
|
|
|
|
# first available node on the host.
|
2018-11-16 11:14:42 +01:00
|
|
|
#
|
|
|
|
# Since: 3.1
|
|
|
|
##
|
|
|
|
{ 'struct' : 'DisplayEGLHeadless',
|
|
|
|
'data' : { '*rendernode' : 'str' } }
|
|
|
|
|
2021-07-15 09:53:53 +02:00
|
|
|
##
|
|
|
|
# @DisplayDBus:
|
|
|
|
#
|
|
|
|
# DBus display options.
|
|
|
|
#
|
|
|
|
# @addr: The D-Bus bus address (default to the session bus).
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @rendernode: Which DRM render node should be used. Default is the
|
|
|
|
# first available node on the host.
|
2021-07-15 09:53:53 +02:00
|
|
|
#
|
2021-10-09 22:16:57 +02:00
|
|
|
# @p2p: Whether to use peer-to-peer connections (accepted through
|
2023-04-28 12:54:29 +02:00
|
|
|
# @add_client).
|
2021-10-09 22:16:57 +02:00
|
|
|
#
|
2021-03-09 14:15:28 +01:00
|
|
|
# @audiodev: Use the specified DBus audiodev to export audio.
|
|
|
|
#
|
2021-07-15 09:53:53 +02:00
|
|
|
# Since: 7.0
|
|
|
|
##
|
|
|
|
{ 'struct' : 'DisplayDBus',
|
|
|
|
'data' : { '*rendernode' : 'str',
|
2021-10-09 22:16:57 +02:00
|
|
|
'*addr': 'str',
|
2021-03-09 14:15:28 +01:00
|
|
|
'*p2p': 'bool',
|
|
|
|
'*audiodev': 'str' } }
|
2021-07-15 09:53:53 +02:00
|
|
|
|
2022-05-03 09:37:31 +02:00
|
|
|
##
|
|
|
|
# @DisplayGLMode:
|
|
|
|
#
|
|
|
|
# Display OpenGL mode.
|
|
|
|
#
|
|
|
|
# @off: Disable OpenGL (default).
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
|
|
|
# @on: Use OpenGL, pick context type automatically. Would better be
|
|
|
|
# named 'auto' but is called 'on' for backward compatibility with
|
|
|
|
# bool type.
|
|
|
|
#
|
2022-05-03 09:37:31 +02:00
|
|
|
# @core: Use OpenGL with Core (desktop) Context.
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2022-05-03 09:37:31 +02:00
|
|
|
# @es: Use OpenGL with ES (embedded systems) Context.
|
|
|
|
#
|
|
|
|
# Since: 3.0
|
|
|
|
##
|
2020-07-30 11:16:56 +02:00
|
|
|
{ 'enum' : 'DisplayGLMode',
|
|
|
|
'data' : [ 'off', 'on', 'core', 'es' ] }
|
2018-04-13 15:58:40 +02:00
|
|
|
|
2019-03-11 14:51:27 +01:00
|
|
|
##
|
|
|
|
# @DisplayCurses:
|
|
|
|
#
|
|
|
|
# Curses display options.
|
|
|
|
#
|
2022-05-03 09:37:35 +02:00
|
|
|
# @charset: Font charset used by guest (default: CP437).
|
2019-03-11 14:51:27 +01:00
|
|
|
#
|
|
|
|
# Since: 4.0
|
|
|
|
##
|
|
|
|
{ 'struct' : 'DisplayCurses',
|
|
|
|
'data' : { '*charset' : 'str' } }
|
|
|
|
|
2022-01-02 18:41:52 +01:00
|
|
|
##
|
|
|
|
# @DisplayCocoa:
|
|
|
|
#
|
|
|
|
# Cocoa display options.
|
|
|
|
#
|
|
|
|
# @left-command-key: Enable/disable forwarding of left command key to
|
2023-04-28 12:54:29 +02:00
|
|
|
# guest. Allows command-tab window switching on the host without
|
|
|
|
# sending this key to the guest when "off". Defaults to "on"
|
2022-01-02 18:41:52 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @full-grab: Capture all key presses, including system combos. This
|
|
|
|
# requires accessibility permissions, since it performs a global
|
|
|
|
# grab on key events. (default: off) See
|
|
|
|
# https://support.apple.com/en-in/guide/mac-help/mh32356/mac
|
2022-03-06 13:11:18 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @swap-opt-cmd: Swap the Option and Command keys so that their key
|
|
|
|
# codes match their position on non-Mac keyboards and you can use
|
|
|
|
# Meta/Super and Alt where you expect them. (default: off)
|
2022-03-06 13:11:19 +01:00
|
|
|
#
|
2023-10-27 17:49:20 +02:00
|
|
|
# @zoom-to-fit: Zoom guest display to fit into the host window. When
|
|
|
|
# turned off the host window will be resized instead. Defaults to
|
|
|
|
# "off". (Since 8.2)
|
|
|
|
#
|
2023-11-10 17:17:29 +01:00
|
|
|
# @zoom-interpolation: Apply interpolation to smooth output when
|
|
|
|
# zoom-to-fit is enabled. Defaults to "off". (Since 9.0)
|
|
|
|
#
|
2022-01-02 18:41:52 +01:00
|
|
|
# Since: 7.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'DisplayCocoa',
|
|
|
|
'data': {
|
2022-03-06 13:11:18 +01:00
|
|
|
'*left-command-key': 'bool',
|
2022-03-06 13:11:19 +01:00
|
|
|
'*full-grab': 'bool',
|
2023-10-27 17:49:20 +02:00
|
|
|
'*swap-opt-cmd': 'bool',
|
2023-11-10 17:17:29 +01:00
|
|
|
'*zoom-to-fit': 'bool',
|
|
|
|
'*zoom-interpolation': 'bool'
|
2022-01-02 18:41:52 +01:00
|
|
|
} }
|
|
|
|
|
2022-05-19 17:56:24 +02:00
|
|
|
##
|
|
|
|
# @HotKeyMod:
|
|
|
|
#
|
|
|
|
# Set of modifier keys that need to be held for shortcut key actions.
|
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'enum' : 'HotKeyMod',
|
|
|
|
'data' : [ 'lctrl-lalt', 'lshift-lctrl-lalt', 'rctrl' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @DisplaySDL:
|
|
|
|
#
|
|
|
|
# SDL2 display options.
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @grab-mod: Modifier keys that should be pressed together with the
|
|
|
|
# "G" key to release the mouse grab.
|
2022-05-19 17:56:24 +02:00
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'struct' : 'DisplaySDL',
|
|
|
|
'data' : { '*grab-mod' : 'HotKeyMod' } }
|
|
|
|
|
2018-02-02 12:10:14 +01:00
|
|
|
##
|
|
|
|
# @DisplayType:
|
|
|
|
#
|
|
|
|
# Display (user interface) type.
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @default: The default user interface, selecting from the first
|
|
|
|
# available of gtk, sdl, cocoa, and vnc.
|
2019-02-21 12:07:01 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @none: No user interface or video output display. The guest will
|
|
|
|
# still see an emulated graphics card, but its output will not be
|
|
|
|
# displayed to the QEMU user.
|
2019-02-21 12:07:01 +01:00
|
|
|
#
|
|
|
|
# @gtk: The GTK user interface.
|
|
|
|
#
|
|
|
|
# @sdl: The SDL user interface.
|
|
|
|
#
|
|
|
|
# @egl-headless: No user interface, offload GL operations to a local
|
2023-04-28 12:54:29 +02:00
|
|
|
# DRI device. Graphical display need to be paired with VNC or
|
|
|
|
# Spice. (Since 3.1)
|
2019-02-21 12:07:01 +01:00
|
|
|
#
|
|
|
|
# @curses: Display video output via curses. For graphics device
|
2023-04-28 12:54:29 +02:00
|
|
|
# models which support a text mode, QEMU can display this output
|
|
|
|
# using a curses/ncurses interface. Nothing is displayed when the
|
|
|
|
# graphics device is in graphical mode or if the graphics device
|
|
|
|
# does not support a text mode. Generally only the VGA device
|
|
|
|
# models support text mode.
|
2019-02-21 12:07:01 +01:00
|
|
|
#
|
|
|
|
# @cocoa: The Cocoa user interface.
|
|
|
|
#
|
2019-02-21 12:07:03 +01:00
|
|
|
# @spice-app: Set up a Spice server and run the default associated
|
2023-04-28 12:54:29 +02:00
|
|
|
# application to connect to it. The server will redirect the
|
|
|
|
# serial console and QEMU monitors. (Since 4.0)
|
2019-02-21 12:07:03 +01:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @dbus: Start a D-Bus service for the display. (Since 7.0)
|
2021-07-15 09:53:53 +02:00
|
|
|
#
|
2018-02-02 12:10:14 +01:00
|
|
|
# Since: 2.12
|
|
|
|
##
|
|
|
|
{ 'enum' : 'DisplayType',
|
ui: Make the DisplayType enum entries conditional
Libvirt's "domcapabilities" command has a way to state whether certain
graphic frontends are available in QEMU or not. Originally, libvirt
looked at the "--help" output of the QEMU binary to determine whether
SDL was available or not (by looking for the "-sdl" parameter in the
help text), but since libvirt stopped doing this analysis of the help
text, the detection of SDL is currently broken, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1790902
QEMU should provide a way via the QMP interface instead. A simple way,
without introducing additional commands, is to make the DisplayType
enum entries conditional, so that the enum only contains the entries if
the corresponding CONFIG_xxx switches have been set. This of course
only gives an indication which possibilities have been enabled during
compile-time of QEMU (and does not take into account whether modules
are later available or not for example - for this we'd need a separate
command), but anyway, this should already be good enough for the above
bug ticket, and it's a good idea anyway to make the QMP interface
conditional here, so let's simply do it.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210615090439.70926-1-thuth@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-06-15 11:04:39 +02:00
|
|
|
'data' : [
|
|
|
|
{ 'name': 'default' },
|
|
|
|
{ 'name': 'none' },
|
2021-08-04 10:31:05 +02:00
|
|
|
{ 'name': 'gtk', 'if': 'CONFIG_GTK' },
|
|
|
|
{ 'name': 'sdl', 'if': 'CONFIG_SDL' },
|
2023-06-06 13:56:49 +02:00
|
|
|
{ 'name': 'egl-headless', 'if': 'CONFIG_OPENGL' },
|
2021-08-04 10:31:05 +02:00
|
|
|
{ 'name': 'curses', 'if': 'CONFIG_CURSES' },
|
|
|
|
{ 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
|
2021-07-15 09:53:53 +02:00
|
|
|
{ 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
|
|
|
|
{ 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
|
|
|
|
]
|
|
|
|
}
|
2018-02-02 12:10:14 +01:00
|
|
|
|
|
|
|
##
|
|
|
|
# @DisplayOptions:
|
|
|
|
#
|
|
|
|
# Display (user interface) options.
|
|
|
|
#
|
2022-05-03 09:37:36 +02:00
|
|
|
# @type: Which DisplayType qemu should use.
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
|
|
|
# @full-screen: Start user interface in fullscreen mode
|
|
|
|
# (default: off).
|
|
|
|
#
|
|
|
|
# @window-close: Allow to quit qemu with window close button
|
|
|
|
# (default: on).
|
|
|
|
#
|
|
|
|
# @show-cursor: Force showing the mouse cursor (default: off).
|
|
|
|
# (since: 5.0)
|
|
|
|
#
|
2022-05-03 09:37:36 +02:00
|
|
|
# @gl: Enable OpenGL support (default: off).
|
2018-02-02 12:10:14 +01:00
|
|
|
#
|
|
|
|
# Since: 2.12
|
|
|
|
##
|
|
|
|
{ 'union' : 'DisplayOptions',
|
|
|
|
'base' : { 'type' : 'DisplayType',
|
|
|
|
'*full-screen' : 'bool',
|
|
|
|
'*window-close' : 'bool',
|
2020-01-31 11:45:18 +01:00
|
|
|
'*show-cursor' : 'bool',
|
2018-04-13 15:58:40 +02:00
|
|
|
'*gl' : 'DisplayGLMode' },
|
2018-02-02 12:10:14 +01:00
|
|
|
'discriminator' : 'type',
|
ui: Make the DisplayType enum entries conditional
Libvirt's "domcapabilities" command has a way to state whether certain
graphic frontends are available in QEMU or not. Originally, libvirt
looked at the "--help" output of the QEMU binary to determine whether
SDL was available or not (by looking for the "-sdl" parameter in the
help text), but since libvirt stopped doing this analysis of the help
text, the detection of SDL is currently broken, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1790902
QEMU should provide a way via the QMP interface instead. A simple way,
without introducing additional commands, is to make the DisplayType
enum entries conditional, so that the enum only contains the entries if
the corresponding CONFIG_xxx switches have been set. This of course
only gives an indication which possibilities have been enabled during
compile-time of QEMU (and does not take into account whether modules
are later available or not for example - for this we'd need a separate
command), but anyway, this should already be good enough for the above
bug ticket, and it's a good idea anyway to make the QMP interface
conditional here, so let's simply do it.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210615090439.70926-1-thuth@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-06-15 11:04:39 +02:00
|
|
|
'data' : {
|
2021-08-04 10:31:05 +02:00
|
|
|
'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
|
2022-01-02 18:41:52 +01:00
|
|
|
'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
|
2021-08-04 10:31:05 +02:00
|
|
|
'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
|
ui: Make the DisplayType enum entries conditional
Libvirt's "domcapabilities" command has a way to state whether certain
graphic frontends are available in QEMU or not. Originally, libvirt
looked at the "--help" output of the QEMU binary to determine whether
SDL was available or not (by looking for the "-sdl" parameter in the
help text), but since libvirt stopped doing this analysis of the help
text, the detection of SDL is currently broken, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1790902
QEMU should provide a way via the QMP interface instead. A simple way,
without introducing additional commands, is to make the DisplayType
enum entries conditional, so that the enum only contains the entries if
the corresponding CONFIG_xxx switches have been set. This of course
only gives an indication which possibilities have been enabled during
compile-time of QEMU (and does not take into account whether modules
are later available or not for example - for this we'd need a separate
command), but anyway, this should already be good enough for the above
bug ticket, and it's a good idea anyway to make the QMP interface
conditional here, so let's simply do it.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210615090439.70926-1-thuth@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-06-15 11:04:39 +02:00
|
|
|
'egl-headless': { 'type': 'DisplayEGLHeadless',
|
2023-06-06 13:56:49 +02:00
|
|
|
'if': 'CONFIG_OPENGL' },
|
2022-05-19 17:56:24 +02:00
|
|
|
'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' },
|
|
|
|
'sdl': { 'type': 'DisplaySDL', 'if': 'CONFIG_SDL' }
|
ui: Make the DisplayType enum entries conditional
Libvirt's "domcapabilities" command has a way to state whether certain
graphic frontends are available in QEMU or not. Originally, libvirt
looked at the "--help" output of the QEMU binary to determine whether
SDL was available or not (by looking for the "-sdl" parameter in the
help text), but since libvirt stopped doing this analysis of the help
text, the detection of SDL is currently broken, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1790902
QEMU should provide a way via the QMP interface instead. A simple way,
without introducing additional commands, is to make the DisplayType
enum entries conditional, so that the enum only contains the entries if
the corresponding CONFIG_xxx switches have been set. This of course
only gives an indication which possibilities have been enabled during
compile-time of QEMU (and does not take into account whether modules
are later available or not for example - for this we'd need a separate
command), but anyway, this should already be good enough for the above
bug ticket, and it's a good idea anyway to make the QMP interface
conditional here, so let's simply do it.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210615090439.70926-1-thuth@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-06-15 11:04:39 +02:00
|
|
|
}
|
|
|
|
}
|
2018-11-22 08:16:13 +01:00
|
|
|
|
|
|
|
##
|
|
|
|
# @query-display-options:
|
|
|
|
#
|
|
|
|
# Returns information about display configuration
|
|
|
|
#
|
|
|
|
# Returns: @DisplayOptions
|
|
|
|
#
|
|
|
|
# Since: 3.1
|
|
|
|
##
|
|
|
|
{ 'command': 'query-display-options',
|
|
|
|
'returns': 'DisplayOptions' }
|
2021-03-16 08:58:45 +01:00
|
|
|
|
|
|
|
##
|
|
|
|
# @DisplayReloadType:
|
|
|
|
#
|
|
|
|
# Available DisplayReload types.
|
|
|
|
#
|
|
|
|
# @vnc: VNC display
|
|
|
|
#
|
|
|
|
# Since: 6.0
|
|
|
|
##
|
|
|
|
{ 'enum': 'DisplayReloadType',
|
|
|
|
'data': ['vnc'] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @DisplayReloadOptionsVNC:
|
|
|
|
#
|
|
|
|
# Specify the VNC reload options.
|
|
|
|
#
|
|
|
|
# @tls-certs: reload tls certs or not.
|
|
|
|
#
|
|
|
|
# Since: 6.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'DisplayReloadOptionsVNC',
|
|
|
|
'data': { '*tls-certs': 'bool' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @DisplayReloadOptions:
|
|
|
|
#
|
|
|
|
# Options of the display configuration reload.
|
|
|
|
#
|
|
|
|
# @type: Specify the display type.
|
|
|
|
#
|
|
|
|
# Since: 6.0
|
|
|
|
##
|
|
|
|
{ 'union': 'DisplayReloadOptions',
|
|
|
|
'base': {'type': 'DisplayReloadType'},
|
|
|
|
'discriminator': 'type',
|
|
|
|
'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @display-reload:
|
|
|
|
#
|
|
|
|
# Reload display configuration.
|
|
|
|
#
|
|
|
|
# Since: 6.0
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "display-reload",
|
|
|
|
# "arguments": { "type": "vnc", "tls-certs": true } }
|
|
|
|
# <- { "return": {} }
|
2021-03-16 08:58:45 +01:00
|
|
|
##
|
|
|
|
{ 'command': 'display-reload',
|
|
|
|
'data': 'DisplayReloadOptions',
|
|
|
|
'boxed' : true }
|
2022-04-01 16:39:35 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @DisplayUpdateType:
|
|
|
|
#
|
|
|
|
# Available DisplayUpdate types.
|
|
|
|
#
|
|
|
|
# @vnc: VNC display
|
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'enum': 'DisplayUpdateType',
|
|
|
|
'data': ['vnc'] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @DisplayUpdateOptionsVNC:
|
|
|
|
#
|
|
|
|
# Specify the VNC reload options.
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @addresses: If specified, change set of addresses to listen for
|
|
|
|
# connections. Addresses configured for websockets are not
|
|
|
|
# touched.
|
2022-04-01 16:39:35 +02:00
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'DisplayUpdateOptionsVNC',
|
|
|
|
'data': { '*addresses': ['SocketAddress'] } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @DisplayUpdateOptions:
|
|
|
|
#
|
|
|
|
# Options of the display configuration reload.
|
|
|
|
#
|
|
|
|
# @type: Specify the display type.
|
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'union': 'DisplayUpdateOptions',
|
|
|
|
'base': {'type': 'DisplayUpdateType'},
|
|
|
|
'discriminator': 'type',
|
|
|
|
'data': { 'vnc': 'DisplayUpdateOptionsVNC' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @display-update:
|
|
|
|
#
|
|
|
|
# Update display configuration.
|
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "display-update",
|
|
|
|
# "arguments": { "type": "vnc", "addresses":
|
|
|
|
# [ { "type": "inet", "host": "0.0.0.0",
|
|
|
|
# "port": "5901" } ] } }
|
|
|
|
# <- { "return": {} }
|
2022-04-01 16:39:35 +02:00
|
|
|
##
|
|
|
|
{ 'command': 'display-update',
|
|
|
|
'data': 'DisplayUpdateOptions',
|
|
|
|
'boxed' : true }
|
2023-03-01 19:40:14 +01:00
|
|
|
|
|
|
|
##
|
|
|
|
# @client_migrate_info:
|
|
|
|
#
|
|
|
|
# Set migration information for remote display. This makes the server
|
|
|
|
# ask the client to automatically reconnect using the new parameters
|
|
|
|
# once migration finished successfully. Only implemented for SPICE.
|
|
|
|
#
|
|
|
|
# @protocol: must be "spice"
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 19:40:14 +01:00
|
|
|
# @hostname: migration target hostname
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 19:40:14 +01:00
|
|
|
# @port: spice tcp port for plaintext channels
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 19:40:14 +01:00
|
|
|
# @tls-port: spice tcp port for tls-secured channels
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2023-03-01 19:40:14 +01:00
|
|
|
# @cert-subject: server certificate subject
|
|
|
|
#
|
|
|
|
# Since: 0.14
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2024-02-16 15:58:34 +01:00
|
|
|
# -> { "execute": "client_migrate_info",
|
|
|
|
# "arguments": { "protocol": "spice",
|
|
|
|
# "hostname": "virt42.lab.kraxel.org",
|
|
|
|
# "port": 1234 } }
|
|
|
|
# <- { "return": {} }
|
2023-03-01 19:40:14 +01:00
|
|
|
##
|
|
|
|
{ 'command': 'client_migrate_info',
|
|
|
|
'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
|
|
|
|
'*tls-port': 'int', '*cert-subject': 'str' } }
|