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