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