xref: /openbmc/qemu/qapi/ui.json (revision 2746f060)
1# -*- Mode: Python -*-
2# vim: filetype=python
3#
4
5##
6# = Remote desktop
7##
8
9{ 'include': 'common.json' }
10{ 'include': 'sockets.json' }
11
12##
13# @DisplayProtocol:
14#
15# Display protocols which support changing password options.
16#
17# Since: 7.0
18##
19{ 'enum': 'DisplayProtocol',
20  'data': [ 'vnc', 'spice' ] }
21
22##
23# @SetPasswordAction:
24#
25# An action to take on changing a password on a connection with active
26# clients.
27#
28# @keep: maintain existing clients
29#
30# @fail: fail the command if clients are connected
31#
32# @disconnect: disconnect existing clients
33#
34# Since: 7.0
35##
36{ 'enum': 'SetPasswordAction',
37  'data': [ 'keep', 'fail', 'disconnect' ] }
38
39##
40# @SetPasswordOptions:
41#
42# Options for set_password.
43#
44# @protocol:
45#     - 'vnc' to modify the VNC server password
46#     - 'spice' to modify the Spice server password
47#
48# @password: the new password
49#
50# @connected: How to handle existing clients when changing the
51#     password.  If nothing is specified, defaults to 'keep'. For VNC,
52#     only 'keep' is currently implemented.
53#
54# Since: 7.0
55##
56{ 'union': 'SetPasswordOptions',
57  'base': { 'protocol': 'DisplayProtocol',
58            'password': 'str',
59            '*connected': 'SetPasswordAction' },
60  'discriminator': 'protocol',
61  'data': { 'vnc': 'SetPasswordOptionsVnc' } }
62
63##
64# @SetPasswordOptionsVnc:
65#
66# Options for set_password specific to the VNC protocol.
67#
68# @display: The id of the display where the password should be
69#     changed.  Defaults to the first.
70#
71# Since: 7.0
72##
73{ 'struct': 'SetPasswordOptionsVnc',
74  'data': { '*display': 'str' } }
75
76##
77# @set_password:
78#
79# Set the password of a remote display server.
80#
81# Returns:
82#     - Nothing on success
83#
84# Errors:
85#     - If Spice is not enabled, DeviceNotFound
86#
87# Since: 0.14
88#
89# Example:
90#
91#     -> { "execute": "set_password", "arguments": { "protocol": "vnc",
92#                                                    "password": "secret" } }
93#     <- { "return": {} }
94##
95{ 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' }
96
97##
98# @ExpirePasswordOptions:
99#
100# General options for expire_password.
101#
102# @protocol:
103#     - 'vnc' to modify the VNC server expiration
104#     - 'spice' to modify the Spice server expiration
105#
106# @time: when to expire the password.
107#
108#     - 'now' to expire the password immediately
109#     - 'never' to cancel password expiration
110#     - '+INT' where INT is the number of seconds from now (integer)
111#     - 'INT' where INT is the absolute time in seconds
112#
113# Notes: Time is relative to the server and currently there is no way
114#     to coordinate server time with client time.  It is not
115#     recommended to use the absolute time version of the @time
116#     parameter unless you're sure you are on the same machine as the
117#     QEMU instance.
118#
119# Since: 7.0
120##
121{ 'union': 'ExpirePasswordOptions',
122  'base': { 'protocol': 'DisplayProtocol',
123            'time': 'str' },
124  'discriminator': 'protocol',
125  'data': { 'vnc': 'ExpirePasswordOptionsVnc' } }
126
127##
128# @ExpirePasswordOptionsVnc:
129#
130# Options for expire_password specific to the VNC protocol.
131#
132# @display: The id of the display where the expiration should be
133#     changed.  Defaults to the first.
134#
135# Since: 7.0
136##
137{ 'struct': 'ExpirePasswordOptionsVnc',
138  'data': { '*display': 'str' } }
139
140##
141# @expire_password:
142#
143# Expire the password of a remote display server.
144#
145# Returns:
146#     - Nothing on success
147#
148# Errors:
149#     - If @protocol is 'spice' and Spice is not active,
150#       DeviceNotFound
151#
152# Since: 0.14
153#
154# Example:
155#
156#     -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
157#                                                       "time": "+60" } }
158#     <- { "return": {} }
159##
160{ 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
161
162##
163# @ImageFormat:
164#
165# Supported image format types.
166#
167# @png: PNG format
168#
169# @ppm: PPM format
170#
171# Since: 7.1
172##
173{ 'enum': 'ImageFormat',
174  'data': ['ppm', 'png'] }
175
176##
177# @screendump:
178#
179# Capture the contents of a screen and write it to a file.
180#
181# @filename: the path of a new file to store the image
182#
183# @device: ID of the display device that should be dumped.  If this
184#     parameter is missing, the primary display will be used.  (Since
185#     2.12)
186#
187# @head: head to use in case the device supports multiple heads.  If
188#     this parameter is missing, head #0 will be used.  Also note that
189#     the head can only be specified in conjunction with the device
190#     ID. (Since 2.12)
191#
192# @format: image format for screendump.  (default: ppm) (Since 7.1)
193#
194# Returns: Nothing on success
195#
196# Since: 0.14
197#
198# Example:
199#
200#     -> { "execute": "screendump",
201#          "arguments": { "filename": "/tmp/image" } }
202#     <- { "return": {} }
203##
204{ 'command': 'screendump',
205  'data': {'filename': 'str', '*device': 'str', '*head': 'int',
206           '*format': 'ImageFormat'},
207  'coroutine': true,
208  'if': 'CONFIG_PIXMAN' }
209
210##
211# == Spice
212##
213
214##
215# @SpiceBasicInfo:
216#
217# The basic information for SPICE network connection
218#
219# @host: IP address
220#
221# @port: port number
222#
223# @family: address family
224#
225# Since: 2.1
226##
227{ 'struct': 'SpiceBasicInfo',
228  'data': { 'host': 'str',
229            'port': 'str',
230            'family': 'NetworkAddressFamily' },
231  'if': 'CONFIG_SPICE' }
232
233##
234# @SpiceServerInfo:
235#
236# Information about a SPICE server
237#
238# @auth: authentication method
239#
240# Since: 2.1
241##
242{ 'struct': 'SpiceServerInfo',
243  'base': 'SpiceBasicInfo',
244  'data': { '*auth': 'str' },
245  'if': 'CONFIG_SPICE' }
246
247##
248# @SpiceChannel:
249#
250# Information about a SPICE client channel.
251#
252# @connection-id: SPICE connection id number.  All channels with the
253#     same id belong to the same SPICE session.
254#
255# @channel-type: SPICE channel type number.  "1" is the main control
256#     channel, filter for this one if you want to track spice sessions
257#     only
258#
259# @channel-id: SPICE channel ID number.  Usually "0", might be
260#     different when multiple channels of the same type exist, such as
261#     multiple display channels in a multihead setup
262#
263# @tls: true if the channel is encrypted, false otherwise.
264#
265# Since: 0.14
266##
267{ 'struct': 'SpiceChannel',
268  'base': 'SpiceBasicInfo',
269  'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
270           'tls': 'bool'},
271  'if': 'CONFIG_SPICE' }
272
273##
274# @SpiceQueryMouseMode:
275#
276# An enumeration of Spice mouse states.
277#
278# @client: Mouse cursor position is determined by the client.
279#
280# @server: Mouse cursor position is determined by the server.
281#
282# @unknown: No information is available about mouse mode used by the
283#     spice server.
284#
285# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
286#
287# Since: 1.1
288##
289{ 'enum': 'SpiceQueryMouseMode',
290  'data': [ 'client', 'server', 'unknown' ],
291  'if': 'CONFIG_SPICE' }
292
293##
294# @SpiceInfo:
295#
296# Information about the SPICE session.
297#
298# @enabled: true if the SPICE server is enabled, false otherwise
299#
300# @migrated: true if the last guest migration completed and spice
301#     migration had completed as well.  false otherwise.  (since 1.4)
302#
303# @host: The hostname the SPICE server is bound to.  This depends on
304#     the name resolution on the host and may be an IP address.
305#
306# @port: The SPICE server's port number.
307#
308# @compiled-version: SPICE server version.
309#
310# @tls-port: The SPICE server's TLS port number.
311#
312# @auth: the current authentication type used by the server
313#
314#     - 'none'  if no authentication is being used
315#     - 'spice' uses SASL or direct TLS authentication, depending on
316#       command line options
317#
318# @mouse-mode: The mode in which the mouse cursor is displayed
319#     currently.  Can be determined by the client or the server, or
320#     unknown if spice server doesn't provide this information.
321#     (since: 1.1)
322#
323# @channels: a list of @SpiceChannel for each active spice channel
324#
325# Since: 0.14
326##
327{ 'struct': 'SpiceInfo',
328  'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
329           '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
330           'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
331  'if': 'CONFIG_SPICE' }
332
333##
334# @query-spice:
335#
336# Returns information about the current SPICE server
337#
338# Returns: @SpiceInfo
339#
340# Since: 0.14
341#
342# Example:
343#
344#     -> { "execute": "query-spice" }
345#     <- { "return": {
346#              "enabled": true,
347#              "auth": "spice",
348#              "port": 5920,
349#              "migrated":false,
350#              "tls-port": 5921,
351#              "host": "0.0.0.0",
352#              "mouse-mode":"client",
353#              "channels": [
354#                 {
355#                    "port": "54924",
356#                    "family": "ipv4",
357#                    "channel-type": 1,
358#                    "connection-id": 1804289383,
359#                    "host": "127.0.0.1",
360#                    "channel-id": 0,
361#                    "tls": true
362#                 },
363#                 {
364#                    "port": "36710",
365#                    "family": "ipv4",
366#                    "channel-type": 4,
367#                    "connection-id": 1804289383,
368#                    "host": "127.0.0.1",
369#                    "channel-id": 0,
370#                    "tls": false
371#                 },
372#                 [ ... more channels follow ... ]
373#              ]
374#           }
375#        }
376##
377{ 'command': 'query-spice', 'returns': 'SpiceInfo',
378  'if': 'CONFIG_SPICE' }
379
380##
381# @SPICE_CONNECTED:
382#
383# Emitted when a SPICE client establishes a connection
384#
385# @server: server information
386#
387# @client: client information
388#
389# Since: 0.14
390#
391# Example:
392#
393#     <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
394#          "event": "SPICE_CONNECTED",
395#          "data": {
396#            "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
397#            "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
398#        }}
399##
400{ 'event': 'SPICE_CONNECTED',
401  'data': { 'server': 'SpiceBasicInfo',
402            'client': 'SpiceBasicInfo' },
403  'if': 'CONFIG_SPICE' }
404
405##
406# @SPICE_INITIALIZED:
407#
408# Emitted after initial handshake and authentication takes place (if
409# any) and the SPICE channel is up and running
410#
411# @server: server information
412#
413# @client: client information
414#
415# Since: 0.14
416#
417# Example:
418#
419#     <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
420#          "event": "SPICE_INITIALIZED",
421#          "data": {"server": {"auth": "spice", "port": "5921",
422#                              "family": "ipv4", "host": "127.0.0.1"},
423#                   "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
424#                              "connection-id": 1804289383, "host": "127.0.0.1",
425#                              "channel-id": 0, "tls": true}
426#        }}
427##
428{ 'event': 'SPICE_INITIALIZED',
429  'data': { 'server': 'SpiceServerInfo',
430            'client': 'SpiceChannel' },
431  'if': 'CONFIG_SPICE' }
432
433##
434# @SPICE_DISCONNECTED:
435#
436# Emitted when the SPICE connection is closed
437#
438# @server: server information
439#
440# @client: client information
441#
442# Since: 0.14
443#
444# Example:
445#
446#     <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
447#          "event": "SPICE_DISCONNECTED",
448#          "data": {
449#            "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
450#            "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
451#        }}
452##
453{ 'event': 'SPICE_DISCONNECTED',
454  'data': { 'server': 'SpiceBasicInfo',
455            'client': 'SpiceBasicInfo' },
456  'if': 'CONFIG_SPICE' }
457
458##
459# @SPICE_MIGRATE_COMPLETED:
460#
461# Emitted when SPICE migration has completed
462#
463# Since: 1.3
464#
465# Example:
466#
467#     <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
468#          "event": "SPICE_MIGRATE_COMPLETED" }
469##
470{ 'event': 'SPICE_MIGRATE_COMPLETED',
471  'if': 'CONFIG_SPICE' }
472
473##
474# == VNC
475##
476
477##
478# @VncBasicInfo:
479#
480# The basic information for vnc network connection
481#
482# @host: IP address
483#
484# @service: The service name of the vnc port.  This may depend on the
485#     host system's service database so symbolic names should not be
486#     relied on.
487#
488# @family: address family
489#
490# @websocket: true in case the socket is a websocket (since 2.3).
491#
492# Since: 2.1
493##
494{ 'struct': 'VncBasicInfo',
495  'data': { 'host': 'str',
496            'service': 'str',
497            'family': 'NetworkAddressFamily',
498            'websocket': 'bool' },
499  'if': 'CONFIG_VNC' }
500
501##
502# @VncServerInfo:
503#
504# The network connection information for server
505#
506# @auth: authentication method used for the plain (non-websocket) VNC
507#     server
508#
509# Since: 2.1
510##
511{ 'struct': 'VncServerInfo',
512  'base': 'VncBasicInfo',
513  'data': { '*auth': 'str' },
514  'if': 'CONFIG_VNC' }
515
516##
517# @VncClientInfo:
518#
519# Information about a connected VNC client.
520#
521# @x509_dname: If x509 authentication is in use, the Distinguished
522#     Name of the client.
523#
524# @sasl_username: If SASL authentication is in use, the SASL username
525#     used for authentication.
526#
527# Since: 0.14
528##
529{ 'struct': 'VncClientInfo',
530  'base': 'VncBasicInfo',
531  'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
532  'if': 'CONFIG_VNC' }
533
534##
535# @VncInfo:
536#
537# Information about the VNC session.
538#
539# @enabled: true if the VNC server is enabled, false otherwise
540#
541# @host: The hostname the VNC server is bound to.  This depends on the
542#     name resolution on the host and may be an IP address.
543#
544# @family:
545#     - 'ipv6' if the host is listening for IPv6 connections
546#     - 'ipv4' if the host is listening for IPv4 connections
547#     - 'unix' if the host is listening on a unix domain socket
548#     - 'unknown' otherwise
549#
550# @service: The service name of the server's port.  This may depends
551#     on the host system's service database so symbolic names should
552#     not be relied on.
553#
554# @auth: the current authentication type used by the server
555#
556#     - 'none' if no authentication is being used
557#     - 'vnc' if VNC authentication is being used
558#     - 'vencrypt+plain' if VEncrypt is used with plain text
559#       authentication
560#     - 'vencrypt+tls+none' if VEncrypt is used with TLS and no
561#       authentication
562#     - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC
563#       authentication
564#     - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain
565#       text auth
566#     - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
567#     - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
568#     - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain
569#       text auth
570#     - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
571#     - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL
572#       auth
573#
574# @clients: a list of @VncClientInfo of all currently connected
575#     clients
576#
577# Since: 0.14
578##
579{ 'struct': 'VncInfo',
580  'data': {'enabled': 'bool', '*host': 'str',
581           '*family': 'NetworkAddressFamily',
582           '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
583  'if': 'CONFIG_VNC' }
584
585##
586# @VncPrimaryAuth:
587#
588# vnc primary authentication method.
589#
590# Since: 2.3
591##
592{ 'enum': 'VncPrimaryAuth',
593  'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
594            'tls', 'vencrypt', 'sasl' ],
595  'if': 'CONFIG_VNC' }
596
597##
598# @VncVencryptSubAuth:
599#
600# vnc sub authentication method with vencrypt.
601#
602# Since: 2.3
603##
604{ 'enum': 'VncVencryptSubAuth',
605  'data': [ 'plain',
606            'tls-none',  'x509-none',
607            'tls-vnc',   'x509-vnc',
608            'tls-plain', 'x509-plain',
609            'tls-sasl',  'x509-sasl' ],
610  'if': 'CONFIG_VNC' }
611
612##
613# @VncServerInfo2:
614#
615# The network connection information for server
616#
617# @auth: The current authentication type used by the servers
618#
619# @vencrypt: The vencrypt sub authentication type used by the servers,
620#     only specified in case auth == vencrypt.
621#
622# Since: 2.9
623##
624{ 'struct': 'VncServerInfo2',
625  'base': 'VncBasicInfo',
626  'data': { 'auth'      : 'VncPrimaryAuth',
627            '*vencrypt' : 'VncVencryptSubAuth' },
628  'if': 'CONFIG_VNC' }
629
630##
631# @VncInfo2:
632#
633# Information about a vnc server
634#
635# @id: vnc server name.
636#
637# @server: A list of @VncBasincInfo describing all listening sockets.
638#     The list can be empty (in case the vnc server is disabled). It
639#     also may have multiple entries: normal + websocket, possibly
640#     also ipv4 + ipv6 in the future.
641#
642# @clients: A list of @VncClientInfo of all currently connected
643#     clients.  The list can be empty, for obvious reasons.
644#
645# @auth: The current authentication type used by the non-websockets
646#     servers
647#
648# @vencrypt: The vencrypt authentication type used by the servers,
649#     only specified in case auth == vencrypt.
650#
651# @display: The display device the vnc server is linked to.
652#
653# Since: 2.3
654##
655{ 'struct': 'VncInfo2',
656  'data': { 'id'        : 'str',
657            'server'    : ['VncServerInfo2'],
658            'clients'   : ['VncClientInfo'],
659            'auth'      : 'VncPrimaryAuth',
660            '*vencrypt' : 'VncVencryptSubAuth',
661            '*display'  : 'str' },
662  'if': 'CONFIG_VNC' }
663
664##
665# @query-vnc:
666#
667# Returns information about the current VNC server
668#
669# Returns: @VncInfo
670#
671# Since: 0.14
672#
673# Example:
674#
675#     -> { "execute": "query-vnc" }
676#     <- { "return": {
677#              "enabled":true,
678#              "host":"0.0.0.0",
679#              "service":"50402",
680#              "auth":"vnc",
681#              "family":"ipv4",
682#              "clients":[
683#                 {
684#                    "host":"127.0.0.1",
685#                    "service":"50401",
686#                    "family":"ipv4",
687#                    "websocket":false
688#                 }
689#              ]
690#           }
691#        }
692##
693{ 'command': 'query-vnc', 'returns': 'VncInfo',
694  'if': 'CONFIG_VNC' }
695##
696# @query-vnc-servers:
697#
698# Returns a list of vnc servers.  The list can be empty.
699#
700# Returns: a list of @VncInfo2
701#
702# Since: 2.3
703##
704{ 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
705  'if': 'CONFIG_VNC' }
706
707##
708# @change-vnc-password:
709#
710# Change the VNC server password.
711#
712# @password: the new password to use with VNC authentication
713#
714# Since: 1.1
715#
716# Notes: An empty password in this command will set the password to
717#     the empty string.  Existing clients are unaffected by executing
718#     this command.
719##
720{ 'command': 'change-vnc-password',
721  'data': { 'password': 'str' },
722  'if': 'CONFIG_VNC' }
723
724##
725# @VNC_CONNECTED:
726#
727# Emitted when a VNC client establishes a connection
728#
729# @server: server information
730#
731# @client: client information
732#
733# Note: This event is emitted before any authentication takes place,
734#     thus the authentication ID is not provided
735#
736# Since: 0.13
737#
738# Example:
739#
740#     <- { "event": "VNC_CONNECTED",
741#          "data": {
742#                "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
743#                            "service": "5901", "host": "0.0.0.0" },
744#                "client": { "family": "ipv4", "service": "58425",
745#                            "host": "127.0.0.1", "websocket": false } },
746#          "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
747##
748{ 'event': 'VNC_CONNECTED',
749  'data': { 'server': 'VncServerInfo',
750            'client': 'VncBasicInfo' },
751  'if': 'CONFIG_VNC' }
752
753##
754# @VNC_INITIALIZED:
755#
756# Emitted after authentication takes place (if any) and the VNC
757# session is made active
758#
759# @server: server information
760#
761# @client: client information
762#
763# Since: 0.13
764#
765# Example:
766#
767#     <-  { "event": "VNC_INITIALIZED",
768#           "data": {
769#                "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
770#                            "service": "5901", "host": "0.0.0.0"},
771#                "client": { "family": "ipv4", "service": "46089", "websocket": false,
772#                            "host": "127.0.0.1", "sasl_username": "luiz" } },
773#           "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
774##
775{ 'event': 'VNC_INITIALIZED',
776  'data': { 'server': 'VncServerInfo',
777            'client': 'VncClientInfo' },
778  'if': 'CONFIG_VNC' }
779
780##
781# @VNC_DISCONNECTED:
782#
783# Emitted when the connection is closed
784#
785# @server: server information
786#
787# @client: client information
788#
789# Since: 0.13
790#
791# Example:
792#
793#     <- { "event": "VNC_DISCONNECTED",
794#          "data": {
795#                "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
796#                            "service": "5901", "host": "0.0.0.0" },
797#                "client": { "family": "ipv4", "service": "58425", "websocket": false,
798#                            "host": "127.0.0.1", "sasl_username": "luiz" } },
799#          "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
800##
801{ 'event': 'VNC_DISCONNECTED',
802  'data': { 'server': 'VncServerInfo',
803            'client': 'VncClientInfo' },
804  'if': 'CONFIG_VNC' }
805
806##
807# = Input
808##
809
810##
811# @MouseInfo:
812#
813# Information about a mouse device.
814#
815# @name: the name of the mouse device
816#
817# @index: the index of the mouse device
818#
819# @current: true if this device is currently receiving mouse events
820#
821# @absolute: true if this device supports absolute coordinates as
822#     input
823#
824# Since: 0.14
825##
826{ 'struct': 'MouseInfo',
827  'data': {'name': 'str', 'index': 'int', 'current': 'bool',
828           'absolute': 'bool'} }
829
830##
831# @query-mice:
832#
833# Returns information about each active mouse device
834#
835# Returns: a list of @MouseInfo for each device
836#
837# Since: 0.14
838#
839# Example:
840#
841#     -> { "execute": "query-mice" }
842#     <- { "return": [
843#              {
844#                 "name":"QEMU Microsoft Mouse",
845#                 "index":0,
846#                 "current":false,
847#                 "absolute":false
848#              },
849#              {
850#                 "name":"QEMU PS/2 Mouse",
851#                 "index":1,
852#                 "current":true,
853#                 "absolute":true
854#              }
855#           ]
856#        }
857##
858{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
859
860##
861# @QKeyCode:
862#
863# An enumeration of key name.
864#
865# This is used by the @send-key command.
866#
867# @unmapped: since 2.0
868#
869# @pause: since 2.0
870#
871# @ro: since 2.4
872#
873# @kp_comma: since 2.4
874#
875# @kp_equals: since 2.6
876#
877# @power: since 2.6
878#
879# @hiragana: since 2.9
880#
881# @henkan: since 2.9
882#
883# @yen: since 2.9
884#
885# @sleep: since 2.10
886#
887# @wake: since 2.10
888#
889# @audionext: since 2.10
890#
891# @audioprev: since 2.10
892#
893# @audiostop: since 2.10
894#
895# @audioplay: since 2.10
896#
897# @audiomute: since 2.10
898#
899# @volumeup: since 2.10
900#
901# @volumedown: since 2.10
902#
903# @mediaselect: since 2.10
904#
905# @mail: since 2.10
906#
907# @calculator: since 2.10
908#
909# @computer: since 2.10
910#
911# @ac_home: since 2.10
912#
913# @ac_back: since 2.10
914#
915# @ac_forward: since 2.10
916#
917# @ac_refresh: since 2.10
918#
919# @ac_bookmarks: since 2.10
920#
921# @muhenkan: since 2.12
922#
923# @katakanahiragana: since 2.12
924#
925# @lang1: since 6.1
926#
927# @lang2: since 6.1
928#
929# @f13: since 8.0
930#
931# @f14: since 8.0
932#
933# @f15: since 8.0
934#
935# @f16: since 8.0
936#
937# @f17: since 8.0
938#
939# @f18: since 8.0
940#
941# @f19: since 8.0
942#
943# @f20: since 8.0
944#
945# @f21: since 8.0
946#
947# @f22: since 8.0
948#
949# @f23: since 8.0
950#
951# @f24: since 8.0
952#
953# 'sysrq' was mistakenly added to hack around the fact that the ps2
954# driver was not generating correct scancodes sequences when
955# 'alt+print' was pressed.  This flaw is now fixed and the 'sysrq' key
956# serves no further purpose.  Any further use of 'sysrq' will be
957# transparently changed to 'print', so they are effectively synonyms.
958#
959# Since: 1.3
960##
961{ 'enum': 'QKeyCode',
962  'data': [ 'unmapped',
963            'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
964            'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
965            '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
966            'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
967            'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
968            'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
969            'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
970            'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
971            'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
972            'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
973            'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
974            'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
975            'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
976            'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
977            'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
978            'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
979            'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
980            'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
981            'volumeup', 'volumedown', 'mediaselect',
982            'mail', 'calculator', 'computer',
983            'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
984            'lang1', 'lang2','f13','f14','f15','f16','f17','f18','f19','f20','f21','f22','f23','f24' ] }
985
986##
987# @KeyValueKind:
988#
989# Since: 1.3
990##
991{ 'enum': 'KeyValueKind',
992  'data': [ 'number', 'qcode' ] }
993
994##
995# @IntWrapper:
996#
997# @data: a numeric key code
998#
999# Since: 1.3
1000##
1001{ 'struct': 'IntWrapper',
1002  'data': { 'data': 'int' } }
1003
1004##
1005# @QKeyCodeWrapper:
1006#
1007# @data: An enumeration of key name
1008#
1009# Since: 1.3
1010##
1011{ 'struct': 'QKeyCodeWrapper',
1012  'data': { 'data': 'QKeyCode' } }
1013
1014##
1015# @KeyValue:
1016#
1017# Represents a keyboard key.
1018#
1019# @type: key encoding
1020#
1021# Since: 1.3
1022##
1023{ 'union': 'KeyValue',
1024  'base': { 'type': 'KeyValueKind' },
1025  'discriminator': 'type',
1026  'data': {
1027    'number': 'IntWrapper',
1028    'qcode': 'QKeyCodeWrapper' } }
1029
1030##
1031# @send-key:
1032#
1033# Send keys to guest.
1034#
1035# @keys: An array of @KeyValue elements.  All @KeyValues in this array
1036#     are simultaneously sent to the guest.  A @KeyValue.number value
1037#     is sent directly to the guest, while @KeyValue.qcode must be a
1038#     valid @QKeyCode value
1039#
1040# @hold-time: time to delay key up events, milliseconds.  Defaults to
1041#     100
1042#
1043# Returns:
1044#     - Nothing on success
1045#
1046# Errors:
1047#     - If key is unknown or redundant, GenericError
1048#
1049# Since: 1.3
1050#
1051# Example:
1052#
1053#     -> { "execute": "send-key",
1054#          "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
1055#                                   { "type": "qcode", "data": "alt" },
1056#                                   { "type": "qcode", "data": "delete" } ] } }
1057#     <- { "return": {} }
1058##
1059{ 'command': 'send-key',
1060  'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
1061
1062##
1063# @InputButton:
1064#
1065# Button of a pointer input device (mouse, tablet).
1066#
1067# @side: front side button of a 5-button mouse (since 2.9)
1068#
1069# @extra: rear side button of a 5-button mouse (since 2.9)
1070#
1071# @touch: screen contact on a multi-touch device (since 8.1)
1072#
1073# Since: 2.0
1074##
1075{ 'enum'  : 'InputButton',
1076  'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
1077  'extra', 'wheel-left', 'wheel-right', 'touch' ] }
1078
1079##
1080# @InputAxis:
1081#
1082# Position axis of a pointer input device (mouse, tablet).
1083#
1084# Since: 2.0
1085##
1086{ 'enum'  : 'InputAxis',
1087  'data'  : [ 'x', 'y' ] }
1088
1089##
1090# @InputMultiTouchType:
1091#
1092# Type of a multi-touch event.
1093#
1094# Since: 8.1
1095##
1096{ 'enum'  : 'InputMultiTouchType',
1097  'data'  : [ 'begin', 'update', 'end', 'cancel', 'data' ] }
1098
1099
1100##
1101# @InputKeyEvent:
1102#
1103# Keyboard input event.
1104#
1105# @key: Which key this event is for.
1106#
1107# @down: True for key-down and false for key-up events.
1108#
1109# Since: 2.0
1110##
1111{ 'struct'  : 'InputKeyEvent',
1112  'data'  : { 'key'     : 'KeyValue',
1113              'down'    : 'bool' } }
1114
1115##
1116# @InputBtnEvent:
1117#
1118# Pointer button input event.
1119#
1120# @button: Which button this event is for.
1121#
1122# @down: True for key-down and false for key-up events.
1123#
1124# Since: 2.0
1125##
1126{ 'struct'  : 'InputBtnEvent',
1127  'data'  : { 'button'  : 'InputButton',
1128              'down'    : 'bool' } }
1129
1130##
1131# @InputMoveEvent:
1132#
1133# Pointer motion input event.
1134#
1135# @axis: Which axis is referenced by @value.
1136#
1137# @value: Pointer position.  For absolute coordinates the valid range
1138#     is 0 -> 0x7ffff
1139#
1140# Since: 2.0
1141##
1142{ 'struct'  : 'InputMoveEvent',
1143  'data'  : { 'axis'    : 'InputAxis',
1144              'value'   : 'int' } }
1145
1146##
1147# @InputMultiTouchEvent:
1148#
1149# MultiTouch input event.
1150#
1151# @slot: Which slot has generated the event.
1152#
1153# @tracking-id: ID to correlate this event with previously generated
1154#     events.
1155#
1156# @axis: Which axis is referenced by @value.
1157#
1158# @value: Contact position.
1159#
1160# Since: 8.1
1161##
1162{ 'struct'  : 'InputMultiTouchEvent',
1163  'data'  : { 'type'       : 'InputMultiTouchType',
1164              'slot'       : 'int',
1165              'tracking-id': 'int',
1166              'axis'       : 'InputAxis',
1167              'value'      : 'int' } }
1168
1169##
1170# @InputEventKind:
1171#
1172# @key: a keyboard input event
1173#
1174# @btn: a pointer button input event
1175#
1176# @rel: a relative pointer motion input event
1177#
1178# @abs: an absolute pointer motion input event
1179#
1180# @mtt: a multi-touch input event
1181#
1182# Since: 2.0
1183##
1184{ 'enum': 'InputEventKind',
1185  'data': [ 'key', 'btn', 'rel', 'abs', 'mtt' ] }
1186
1187##
1188# @InputKeyEventWrapper:
1189#
1190# @data: Keyboard input event
1191#
1192# Since: 2.0
1193##
1194{ 'struct': 'InputKeyEventWrapper',
1195  'data': { 'data': 'InputKeyEvent' } }
1196
1197##
1198# @InputBtnEventWrapper:
1199#
1200# @data: Pointer button input event
1201#
1202# Since: 2.0
1203##
1204{ 'struct': 'InputBtnEventWrapper',
1205  'data': { 'data': 'InputBtnEvent' } }
1206
1207##
1208# @InputMoveEventWrapper:
1209#
1210# @data: Pointer motion input event
1211#
1212# Since: 2.0
1213##
1214{ 'struct': 'InputMoveEventWrapper',
1215  'data': { 'data': 'InputMoveEvent' } }
1216
1217##
1218# @InputMultiTouchEventWrapper:
1219#
1220# @data: MultiTouch input event
1221#
1222# Since: 8.1
1223##
1224{ 'struct': 'InputMultiTouchEventWrapper',
1225  'data': { 'data': 'InputMultiTouchEvent' } }
1226
1227##
1228# @InputEvent:
1229#
1230# Input event union.
1231#
1232# @type: the type of input event
1233#
1234# Since: 2.0
1235##
1236{ 'union' : 'InputEvent',
1237  'base': { 'type': 'InputEventKind' },
1238  'discriminator': 'type',
1239  'data'  : { 'key'     : 'InputKeyEventWrapper',
1240              'btn'     : 'InputBtnEventWrapper',
1241              'rel'     : 'InputMoveEventWrapper',
1242              'abs'     : 'InputMoveEventWrapper',
1243              'mtt'     : 'InputMultiTouchEventWrapper' } }
1244
1245##
1246# @input-send-event:
1247#
1248# Send input event(s) to guest.
1249#
1250# The @device and @head parameters can be used to send the input event
1251# to specific input devices in case (a) multiple input devices of the
1252# same kind are added to the virtual machine and (b) you have
1253# configured input routing (see docs/multiseat.txt) for those input
1254# devices.  The parameters work exactly like the device and head
1255# properties of input devices.  If @device is missing, only devices
1256# that have no input routing config are admissible.  If @device is
1257# specified, both input devices with and without input routing config
1258# are admissible, but devices with input routing config take
1259# precedence.
1260#
1261# @device: display device to send event(s) to.
1262#
1263# @head: head to send event(s) to, in case the display device supports
1264#     multiple scanouts.
1265#
1266# @events: List of InputEvent union.
1267#
1268# Returns: Nothing on success.
1269#
1270# Since: 2.6
1271#
1272# Note: The consoles are visible in the qom tree, under
1273#     /backend/console[$index]. They have a device link and head
1274#     property, so it is possible to map which console belongs to
1275#     which device and display.
1276#
1277# Examples:
1278#
1279#     1. Press left mouse button.
1280#
1281#     -> { "execute": "input-send-event",
1282#         "arguments": { "device": "video0",
1283#                        "events": [ { "type": "btn",
1284#                        "data" : { "down": true, "button": "left" } } ] } }
1285#     <- { "return": {} }
1286#
1287#     -> { "execute": "input-send-event",
1288#         "arguments": { "device": "video0",
1289#                        "events": [ { "type": "btn",
1290#                        "data" : { "down": false, "button": "left" } } ] } }
1291#     <- { "return": {} }
1292#
1293#     2. Press ctrl-alt-del.
1294#
1295#     -> { "execute": "input-send-event",
1296#          "arguments": { "events": [
1297#             { "type": "key", "data" : { "down": true,
1298#               "key": {"type": "qcode", "data": "ctrl" } } },
1299#             { "type": "key", "data" : { "down": true,
1300#               "key": {"type": "qcode", "data": "alt" } } },
1301#             { "type": "key", "data" : { "down": true,
1302#               "key": {"type": "qcode", "data": "delete" } } } ] } }
1303#     <- { "return": {} }
1304#
1305#     3. Move mouse pointer to absolute coordinates (20000, 400).
1306#
1307#     -> { "execute": "input-send-event" ,
1308#       "arguments": { "events": [
1309#                    { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1310#                    { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1311#     <- { "return": {} }
1312##
1313{ 'command': 'input-send-event',
1314  'data': { '*device': 'str',
1315            '*head'  : 'int',
1316            'events' : [ 'InputEvent' ] } }
1317
1318##
1319# @DisplayGTK:
1320#
1321# GTK display options.
1322#
1323# @grab-on-hover: Grab keyboard input on mouse hover.
1324#
1325# @zoom-to-fit: Zoom guest display to fit into the host window.  When
1326#     turned off the host window will be resized instead.  In case the
1327#     display device can notify the guest on window resizes
1328#     (virtio-gpu) this will default to "on", assuming the guest will
1329#     resize the display to match the window size then.  Otherwise it
1330#     defaults to "off". (Since 3.1)
1331#
1332# @show-tabs: Display the tab bar for switching between the various
1333#     graphical interfaces (e.g. VGA and virtual console character
1334#     devices) by default.  (Since 7.1)
1335#
1336# @show-menubar: Display the main window menubar.  Defaults to "on".
1337#     (Since 8.0)
1338#
1339# Since: 2.12
1340##
1341{ 'struct'  : 'DisplayGTK',
1342  'data'    : { '*grab-on-hover' : 'bool',
1343                '*zoom-to-fit'   : 'bool',
1344                '*show-tabs'     : 'bool',
1345                '*show-menubar'  : 'bool'  } }
1346
1347##
1348# @DisplayEGLHeadless:
1349#
1350# EGL headless display options.
1351#
1352# @rendernode: Which DRM render node should be used.  Default is the
1353#     first available node on the host.
1354#
1355# Since: 3.1
1356##
1357{ 'struct'  : 'DisplayEGLHeadless',
1358  'data'    : { '*rendernode' : 'str' } }
1359
1360##
1361# @DisplayDBus:
1362#
1363# DBus display options.
1364#
1365# @addr: The D-Bus bus address (default to the session bus).
1366#
1367# @rendernode: Which DRM render node should be used.  Default is the
1368#     first available node on the host.
1369#
1370# @p2p: Whether to use peer-to-peer connections (accepted through
1371#     @add_client).
1372#
1373# @audiodev: Use the specified DBus audiodev to export audio.
1374#
1375# Since: 7.0
1376##
1377{ 'struct'  : 'DisplayDBus',
1378  'data'    : { '*rendernode' : 'str',
1379                '*addr': 'str',
1380                '*p2p': 'bool',
1381                '*audiodev': 'str' } }
1382
1383##
1384# @DisplayGLMode:
1385#
1386# Display OpenGL mode.
1387#
1388# @off: Disable OpenGL (default).
1389#
1390# @on: Use OpenGL, pick context type automatically.  Would better be
1391#     named 'auto' but is called 'on' for backward compatibility with
1392#     bool type.
1393#
1394# @core: Use OpenGL with Core (desktop) Context.
1395#
1396# @es: Use OpenGL with ES (embedded systems) Context.
1397#
1398# Since: 3.0
1399##
1400{ 'enum'    : 'DisplayGLMode',
1401  'data'    : [ 'off', 'on', 'core', 'es' ] }
1402
1403##
1404# @DisplayCurses:
1405#
1406# Curses display options.
1407#
1408# @charset: Font charset used by guest (default: CP437).
1409#
1410# Since: 4.0
1411##
1412{ 'struct'  : 'DisplayCurses',
1413  'data'    : { '*charset'       : 'str' } }
1414
1415##
1416# @DisplayCocoa:
1417#
1418# Cocoa display options.
1419#
1420# @left-command-key: Enable/disable forwarding of left command key to
1421#     guest.  Allows command-tab window switching on the host without
1422#     sending this key to the guest when "off". Defaults to "on"
1423#
1424# @full-grab: Capture all key presses, including system combos.  This
1425#     requires accessibility permissions, since it performs a global
1426#     grab on key events.  (default: off) See
1427#     https://support.apple.com/en-in/guide/mac-help/mh32356/mac
1428#
1429# @swap-opt-cmd: Swap the Option and Command keys so that their key
1430#     codes match their position on non-Mac keyboards and you can use
1431#     Meta/Super and Alt where you expect them.  (default: off)
1432#
1433# @zoom-to-fit: Zoom guest display to fit into the host window. When
1434#     turned off the host window will be resized instead. Defaults to
1435#     "off". (Since 8.2)
1436#
1437# Since: 7.0
1438##
1439{ 'struct': 'DisplayCocoa',
1440  'data': {
1441      '*left-command-key': 'bool',
1442      '*full-grab': 'bool',
1443      '*swap-opt-cmd': 'bool',
1444      '*zoom-to-fit': 'bool'
1445  } }
1446
1447##
1448# @HotKeyMod:
1449#
1450# Set of modifier keys that need to be held for shortcut key actions.
1451#
1452# Since: 7.1
1453##
1454{ 'enum'  : 'HotKeyMod',
1455  'data'  : [ 'lctrl-lalt', 'lshift-lctrl-lalt', 'rctrl' ] }
1456
1457##
1458# @DisplaySDL:
1459#
1460# SDL2 display options.
1461#
1462# @grab-mod: Modifier keys that should be pressed together with the
1463#     "G" key to release the mouse grab.
1464#
1465# Since: 7.1
1466##
1467{ 'struct'  : 'DisplaySDL',
1468  'data'    : { '*grab-mod'   : 'HotKeyMod' } }
1469
1470##
1471# @DisplayType:
1472#
1473# Display (user interface) type.
1474#
1475# @default: The default user interface, selecting from the first
1476#     available of gtk, sdl, cocoa, and vnc.
1477#
1478# @none: No user interface or video output display.  The guest will
1479#     still see an emulated graphics card, but its output will not be
1480#     displayed to the QEMU user.
1481#
1482# @gtk: The GTK user interface.
1483#
1484# @sdl: The SDL user interface.
1485#
1486# @egl-headless: No user interface, offload GL operations to a local
1487#     DRI device.  Graphical display need to be paired with VNC or
1488#     Spice.  (Since 3.1)
1489#
1490# @curses: Display video output via curses.  For graphics device
1491#     models which support a text mode, QEMU can display this output
1492#     using a curses/ncurses interface.  Nothing is displayed when the
1493#     graphics device is in graphical mode or if the graphics device
1494#     does not support a text mode.  Generally only the VGA device
1495#     models support text mode.
1496#
1497# @cocoa: The Cocoa user interface.
1498#
1499# @spice-app: Set up a Spice server and run the default associated
1500#     application to connect to it.  The server will redirect the
1501#     serial console and QEMU monitors.  (Since 4.0)
1502#
1503# @dbus: Start a D-Bus service for the display.  (Since 7.0)
1504#
1505# Since: 2.12
1506##
1507{ 'enum'    : 'DisplayType',
1508  'data'    : [
1509    { 'name': 'default' },
1510    { 'name': 'none' },
1511    { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1512    { 'name': 'sdl', 'if': 'CONFIG_SDL' },
1513    { 'name': 'egl-headless', 'if': 'CONFIG_OPENGL' },
1514    { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1515    { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
1516    { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1517    { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1518  ]
1519}
1520
1521##
1522# @DisplayOptions:
1523#
1524# Display (user interface) options.
1525#
1526# @type: Which DisplayType qemu should use.
1527#
1528# @full-screen: Start user interface in fullscreen mode
1529#     (default: off).
1530#
1531# @window-close: Allow to quit qemu with window close button
1532#     (default: on).
1533#
1534# @show-cursor: Force showing the mouse cursor (default: off).
1535#     (since: 5.0)
1536#
1537# @gl: Enable OpenGL support (default: off).
1538#
1539# Since: 2.12
1540##
1541{ 'union'   : 'DisplayOptions',
1542  'base'    : { 'type'           : 'DisplayType',
1543                '*full-screen'   : 'bool',
1544                '*window-close'  : 'bool',
1545                '*show-cursor'   : 'bool',
1546                '*gl'            : 'DisplayGLMode' },
1547  'discriminator' : 'type',
1548  'data'    : {
1549      'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
1550      'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
1551      'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
1552      'egl-headless': { 'type': 'DisplayEGLHeadless',
1553                        'if': 'CONFIG_OPENGL' },
1554      'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' },
1555      'sdl': { 'type': 'DisplaySDL', 'if': 'CONFIG_SDL' }
1556  }
1557}
1558
1559##
1560# @query-display-options:
1561#
1562# Returns information about display configuration
1563#
1564# Returns: @DisplayOptions
1565#
1566# Since: 3.1
1567##
1568{ 'command': 'query-display-options',
1569  'returns': 'DisplayOptions' }
1570
1571##
1572# @DisplayReloadType:
1573#
1574# Available DisplayReload types.
1575#
1576# @vnc: VNC display
1577#
1578# Since: 6.0
1579##
1580{ 'enum': 'DisplayReloadType',
1581  'data': ['vnc'] }
1582
1583##
1584# @DisplayReloadOptionsVNC:
1585#
1586# Specify the VNC reload options.
1587#
1588# @tls-certs: reload tls certs or not.
1589#
1590# Since: 6.0
1591##
1592{ 'struct': 'DisplayReloadOptionsVNC',
1593  'data': { '*tls-certs': 'bool' } }
1594
1595##
1596# @DisplayReloadOptions:
1597#
1598# Options of the display configuration reload.
1599#
1600# @type: Specify the display type.
1601#
1602# Since: 6.0
1603##
1604{ 'union': 'DisplayReloadOptions',
1605  'base': {'type': 'DisplayReloadType'},
1606  'discriminator': 'type',
1607  'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1608
1609##
1610# @display-reload:
1611#
1612# Reload display configuration.
1613#
1614# Returns: Nothing on success.
1615#
1616# Since: 6.0
1617#
1618# Example:
1619#
1620#     -> { "execute": "display-reload",
1621#          "arguments": { "type": "vnc", "tls-certs": true  } }
1622#     <- { "return": {} }
1623##
1624{ 'command': 'display-reload',
1625  'data': 'DisplayReloadOptions',
1626  'boxed' : true }
1627
1628##
1629# @DisplayUpdateType:
1630#
1631# Available DisplayUpdate types.
1632#
1633# @vnc: VNC display
1634#
1635# Since: 7.1
1636##
1637{ 'enum': 'DisplayUpdateType',
1638  'data': ['vnc'] }
1639
1640##
1641# @DisplayUpdateOptionsVNC:
1642#
1643# Specify the VNC reload options.
1644#
1645# @addresses: If specified, change set of addresses to listen for
1646#     connections.  Addresses configured for websockets are not
1647#     touched.
1648#
1649# Since: 7.1
1650##
1651{ 'struct': 'DisplayUpdateOptionsVNC',
1652  'data': { '*addresses': ['SocketAddress'] } }
1653
1654##
1655# @DisplayUpdateOptions:
1656#
1657# Options of the display configuration reload.
1658#
1659# @type: Specify the display type.
1660#
1661# Since: 7.1
1662##
1663{ 'union': 'DisplayUpdateOptions',
1664  'base': {'type': 'DisplayUpdateType'},
1665  'discriminator': 'type',
1666  'data': { 'vnc': 'DisplayUpdateOptionsVNC' } }
1667
1668##
1669# @display-update:
1670#
1671# Update display configuration.
1672#
1673# Returns: Nothing on success.
1674#
1675# Since: 7.1
1676#
1677# Example:
1678#
1679#     -> { "execute": "display-update",
1680#          "arguments": { "type": "vnc", "addresses":
1681#                         [ { "type": "inet", "host": "0.0.0.0",
1682#                             "port": "5901" } ] } }
1683#     <- { "return": {} }
1684##
1685{ 'command': 'display-update',
1686  'data': 'DisplayUpdateOptions',
1687  'boxed' : true }
1688
1689##
1690# @client_migrate_info:
1691#
1692# Set migration information for remote display.  This makes the server
1693# ask the client to automatically reconnect using the new parameters
1694# once migration finished successfully.  Only implemented for SPICE.
1695#
1696# @protocol: must be "spice"
1697#
1698# @hostname: migration target hostname
1699#
1700# @port: spice tcp port for plaintext channels
1701#
1702# @tls-port: spice tcp port for tls-secured channels
1703#
1704# @cert-subject: server certificate subject
1705#
1706# Since: 0.14
1707#
1708# Example:
1709#
1710#     -> { "execute": "client_migrate_info",
1711#          "arguments": { "protocol": "spice",
1712#                         "hostname": "virt42.lab.kraxel.org",
1713#                         "port": 1234 } }
1714#     <- { "return": {} }
1715##
1716{ 'command': 'client_migrate_info',
1717  'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1718            '*tls-port': 'int', '*cert-subject': 'str' } }
1719