avocado/ppc_prep_40p.py: check TCG accel in all tests
[qemu.git] / qapi / ui.json
blob4a13f883a30139dc7b870df4c2e43aaa5aedccf3
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = Remote desktop
7 ##
9 { 'include': 'common.json' }
10 { 'include': 'sockets.json' }
13 # @DisplayProtocol:
15 # Display protocols which support changing password options.
17 # Since: 7.0
20 { 'enum': 'DisplayProtocol',
21   'data': [ 'vnc', 'spice' ] }
24 # @SetPasswordAction:
26 # An action to take on changing a password on a connection with active clients.
28 # @keep: maintain existing clients
30 # @fail: fail the command if clients are connected
32 # @disconnect: disconnect existing clients
34 # Since: 7.0
37 { 'enum': 'SetPasswordAction',
38   'data': [ 'keep', 'fail', 'disconnect' ] }
41 # @SetPasswordOptions:
43 # Options for set_password.
45 # @protocol: - 'vnc' to modify the VNC server password
46 #            - 'spice' to modify the Spice server password
48 # @password: the new password
50 # @connected: How to handle existing clients when changing the
51 #             password. If nothing is specified, defaults to 'keep'.
52 #             For VNC, only 'keep' is currently implemented.
54 # Since: 7.0
57 { 'union': 'SetPasswordOptions',
58   'base': { 'protocol': 'DisplayProtocol',
59             'password': 'str',
60             '*connected': 'SetPasswordAction' },
61   'discriminator': 'protocol',
62   'data': { 'vnc': 'SetPasswordOptionsVnc' } }
65 # @SetPasswordOptionsVnc:
67 # Options for set_password specific to the VNC procotol.
69 # @display: The id of the display where the password should be changed.
70 #           Defaults to the first.
72 # Since: 7.0
75 { 'struct': 'SetPasswordOptionsVnc',
76   'data': { '*display': 'str' } }
79 # @set_password:
81 # Set the password of a remote display server.
83 # Returns: - Nothing on success
84 #          - If Spice is not enabled, DeviceNotFound
86 # Since: 0.14
88 # Example:
90 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
91 #                                                "password": "secret" } }
92 # <- { "return": {} }
95 { 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' }
98 # @ExpirePasswordOptions:
100 # General options for expire_password.
102 # @protocol: - 'vnc' to modify the VNC server expiration
103 #            - 'spice' to modify the Spice server expiration
105 # @time: when to expire the password.
107 #        - 'now' to expire the password immediately
108 #        - 'never' to cancel password expiration
109 #        - '+INT' where INT is the number of seconds from now (integer)
110 #        - 'INT' where INT is the absolute time in seconds
112 # Notes: Time is relative to the server and currently there is no way to
113 #        coordinate server time with client time.  It is not recommended to
114 #        use the absolute time version of the @time parameter unless you're
115 #        sure you are on the same machine as the QEMU instance.
117 # Since: 7.0
120 { 'union': 'ExpirePasswordOptions',
121   'base': { 'protocol': 'DisplayProtocol',
122             'time': 'str' },
123   'discriminator': 'protocol',
124   'data': { 'vnc': 'ExpirePasswordOptionsVnc' } }
127 # @ExpirePasswordOptionsVnc:
129 # Options for expire_password specific to the VNC procotol.
131 # @display: The id of the display where the expiration should be changed.
132 #           Defaults to the first.
134 # Since: 7.0
138 { 'struct': 'ExpirePasswordOptionsVnc',
139   'data': { '*display': 'str' } }
142 # @expire_password:
144 # Expire the password of a remote display server.
146 # Returns: - Nothing on success
147 #          - If @protocol is 'spice' and Spice is not active, DeviceNotFound
149 # Since: 0.14
151 # Example:
153 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
154 #                                                   "time": "+60" } }
155 # <- { "return": {} }
158 { 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
161 # @screendump:
163 # Write a PPM of the VGA screen to a file.
165 # @filename: the path of a new PPM file to store the image
167 # @device: ID of the display device that should be dumped. If this parameter
168 #          is missing, the primary display will be used. (Since 2.12)
170 # @head: head to use in case the device supports multiple heads. If this
171 #        parameter is missing, head #0 will be used. Also note that the head
172 #        can only be specified in conjunction with the device ID. (Since 2.12)
174 # Returns: Nothing on success
176 # Since: 0.14
178 # Example:
180 # -> { "execute": "screendump",
181 #      "arguments": { "filename": "/tmp/image" } }
182 # <- { "return": {} }
185 { 'command': 'screendump',
186   'data': {'filename': 'str', '*device': 'str', '*head': 'int'},
187   'coroutine': true }
190 # == Spice
194 # @SpiceBasicInfo:
196 # The basic information for SPICE network connection
198 # @host: IP address
200 # @port: port number
202 # @family: address family
204 # Since: 2.1
206 { 'struct': 'SpiceBasicInfo',
207   'data': { 'host': 'str',
208             'port': 'str',
209             'family': 'NetworkAddressFamily' },
210   'if': 'CONFIG_SPICE' }
213 # @SpiceServerInfo:
215 # Information about a SPICE server
217 # @auth: authentication method
219 # Since: 2.1
221 { 'struct': 'SpiceServerInfo',
222   'base': 'SpiceBasicInfo',
223   'data': { '*auth': 'str' },
224   'if': 'CONFIG_SPICE' }
227 # @SpiceChannel:
229 # Information about a SPICE client channel.
231 # @connection-id: SPICE connection id number.  All channels with the same id
232 #                 belong to the same SPICE session.
234 # @channel-type: SPICE channel type number.  "1" is the main control
235 #                channel, filter for this one if you want to track spice
236 #                sessions only
238 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
239 #              multiple channels of the same type exist, such as multiple
240 #              display channels in a multihead setup
242 # @tls: true if the channel is encrypted, false otherwise.
244 # Since: 0.14
246 { 'struct': 'SpiceChannel',
247   'base': 'SpiceBasicInfo',
248   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
249            'tls': 'bool'},
250   'if': 'CONFIG_SPICE' }
253 # @SpiceQueryMouseMode:
255 # An enumeration of Spice mouse states.
257 # @client: Mouse cursor position is determined by the client.
259 # @server: Mouse cursor position is determined by the server.
261 # @unknown: No information is available about mouse mode used by
262 #           the spice server.
264 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
266 # Since: 1.1
268 { 'enum': 'SpiceQueryMouseMode',
269   'data': [ 'client', 'server', 'unknown' ],
270   'if': 'CONFIG_SPICE' }
273 # @SpiceInfo:
275 # Information about the SPICE session.
277 # @enabled: true if the SPICE server is enabled, false otherwise
279 # @migrated: true if the last guest migration completed and spice
280 #            migration had completed as well. false otherwise. (since 1.4)
282 # @host: The hostname the SPICE server is bound to.  This depends on
283 #        the name resolution on the host and may be an IP address.
285 # @port: The SPICE server's port number.
287 # @compiled-version: SPICE server version.
289 # @tls-port: The SPICE server's TLS port number.
291 # @auth: the current authentication type used by the server
293 #        - 'none'  if no authentication is being used
294 #        - 'spice' uses SASL or direct TLS authentication, depending on command
295 #          line options
297 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
298 #              be determined by the client or the server, or unknown if spice
299 #              server doesn't provide this information. (since: 1.1)
301 # @channels: a list of @SpiceChannel for each active spice channel
303 # Since: 0.14
305 { 'struct': 'SpiceInfo',
306   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
307            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
308            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
309   'if': 'CONFIG_SPICE' }
312 # @query-spice:
314 # Returns information about the current SPICE server
316 # Returns: @SpiceInfo
318 # Since: 0.14
320 # Example:
322 # -> { "execute": "query-spice" }
323 # <- { "return": {
324 #          "enabled": true,
325 #          "auth": "spice",
326 #          "port": 5920,
327 #          "tls-port": 5921,
328 #          "host": "0.0.0.0",
329 #          "channels": [
330 #             {
331 #                "port": "54924",
332 #                "family": "ipv4",
333 #                "channel-type": 1,
334 #                "connection-id": 1804289383,
335 #                "host": "127.0.0.1",
336 #                "channel-id": 0,
337 #                "tls": true
338 #             },
339 #             {
340 #                "port": "36710",
341 #                "family": "ipv4",
342 #                "channel-type": 4,
343 #                "connection-id": 1804289383,
344 #                "host": "127.0.0.1",
345 #                "channel-id": 0,
346 #                "tls": false
347 #             },
348 #             [ ... more channels follow ... ]
349 #          ]
350 #       }
351 #    }
354 { 'command': 'query-spice', 'returns': 'SpiceInfo',
355   'if': 'CONFIG_SPICE' }
358 # @SPICE_CONNECTED:
360 # Emitted when a SPICE client establishes a connection
362 # @server: server information
364 # @client: client information
366 # Since: 0.14
368 # Example:
370 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
371 #      "event": "SPICE_CONNECTED",
372 #      "data": {
373 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
374 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
375 #    }}
378 { 'event': 'SPICE_CONNECTED',
379   'data': { 'server': 'SpiceBasicInfo',
380             'client': 'SpiceBasicInfo' },
381   'if': 'CONFIG_SPICE' }
384 # @SPICE_INITIALIZED:
386 # Emitted after initial handshake and authentication takes place (if any)
387 # and the SPICE channel is up and running
389 # @server: server information
391 # @client: client information
393 # Since: 0.14
395 # Example:
397 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
398 #      "event": "SPICE_INITIALIZED",
399 #      "data": {"server": {"auth": "spice", "port": "5921",
400 #                          "family": "ipv4", "host": "127.0.0.1"},
401 #               "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
402 #                          "connection-id": 1804289383, "host": "127.0.0.1",
403 #                          "channel-id": 0, "tls": true}
404 #    }}
407 { 'event': 'SPICE_INITIALIZED',
408   'data': { 'server': 'SpiceServerInfo',
409             'client': 'SpiceChannel' },
410   'if': 'CONFIG_SPICE' }
413 # @SPICE_DISCONNECTED:
415 # Emitted when the SPICE connection is closed
417 # @server: server information
419 # @client: client information
421 # Since: 0.14
423 # Example:
425 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
426 #      "event": "SPICE_DISCONNECTED",
427 #      "data": {
428 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
429 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
430 #    }}
433 { 'event': 'SPICE_DISCONNECTED',
434   'data': { 'server': 'SpiceBasicInfo',
435             'client': 'SpiceBasicInfo' },
436   'if': 'CONFIG_SPICE' }
439 # @SPICE_MIGRATE_COMPLETED:
441 # Emitted when SPICE migration has completed
443 # Since: 1.3
445 # Example:
447 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
448 #      "event": "SPICE_MIGRATE_COMPLETED" }
451 { 'event': 'SPICE_MIGRATE_COMPLETED',
452   'if': 'CONFIG_SPICE' }
455 # == VNC
459 # @VncBasicInfo:
461 # The basic information for vnc network connection
463 # @host: IP address
465 # @service: The service name of the vnc port. This may depend on the host
466 #           system's service database so symbolic names should not be relied
467 #           on.
469 # @family: address family
471 # @websocket: true in case the socket is a websocket (since 2.3).
473 # Since: 2.1
475 { 'struct': 'VncBasicInfo',
476   'data': { 'host': 'str',
477             'service': 'str',
478             'family': 'NetworkAddressFamily',
479             'websocket': 'bool' },
480   'if': 'CONFIG_VNC' }
483 # @VncServerInfo:
485 # The network connection information for server
487 # @auth: authentication method used for
488 #        the plain (non-websocket) VNC server
490 # Since: 2.1
492 { 'struct': 'VncServerInfo',
493   'base': 'VncBasicInfo',
494   'data': { '*auth': 'str' },
495   'if': 'CONFIG_VNC' }
498 # @VncClientInfo:
500 # Information about a connected VNC client.
502 # @x509_dname: If x509 authentication is in use, the Distinguished
503 #              Name of the client.
505 # @sasl_username: If SASL authentication is in use, the SASL username
506 #                 used for authentication.
508 # Since: 0.14
510 { 'struct': 'VncClientInfo',
511   'base': 'VncBasicInfo',
512   'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
513   'if': 'CONFIG_VNC' }
516 # @VncInfo:
518 # Information about the VNC session.
520 # @enabled: true if the VNC server is enabled, false otherwise
522 # @host: The hostname the VNC server is bound to.  This depends on
523 #        the name resolution on the host and may be an IP address.
525 # @family: - 'ipv6' if the host is listening for IPv6 connections
526 #          - 'ipv4' if the host is listening for IPv4 connections
527 #          - 'unix' if the host is listening on a unix domain socket
528 #          - 'unknown' otherwise
530 # @service: The service name of the server's port.  This may depends
531 #           on the host system's service database so symbolic names should not
532 #           be relied on.
534 # @auth: the current authentication type used by the server
536 #        - 'none' if no authentication is being used
537 #        - 'vnc' if VNC authentication is being used
538 #        - 'vencrypt+plain' if VEncrypt is used with plain text authentication
539 #        - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
540 #        - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
541 #        - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
542 #        - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
543 #        - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
544 #        - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
545 #        - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
546 #        - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
548 # @clients: a list of @VncClientInfo of all currently connected clients
550 # Since: 0.14
552 { 'struct': 'VncInfo',
553   'data': {'enabled': 'bool', '*host': 'str',
554            '*family': 'NetworkAddressFamily',
555            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
556   'if': 'CONFIG_VNC' }
559 # @VncPrimaryAuth:
561 # vnc primary authentication method.
563 # Since: 2.3
565 { 'enum': 'VncPrimaryAuth',
566   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
567             'tls', 'vencrypt', 'sasl' ],
568   'if': 'CONFIG_VNC' }
571 # @VncVencryptSubAuth:
573 # vnc sub authentication method with vencrypt.
575 # Since: 2.3
577 { 'enum': 'VncVencryptSubAuth',
578   'data': [ 'plain',
579             'tls-none',  'x509-none',
580             'tls-vnc',   'x509-vnc',
581             'tls-plain', 'x509-plain',
582             'tls-sasl',  'x509-sasl' ],
583   'if': 'CONFIG_VNC' }
586 # @VncServerInfo2:
588 # The network connection information for server
590 # @auth: The current authentication type used by the servers
592 # @vencrypt: The vencrypt sub authentication type used by the
593 #            servers, only specified in case auth == vencrypt.
595 # Since: 2.9
597 { 'struct': 'VncServerInfo2',
598   'base': 'VncBasicInfo',
599   'data': { 'auth'      : 'VncPrimaryAuth',
600             '*vencrypt' : 'VncVencryptSubAuth' },
601   'if': 'CONFIG_VNC' }
604 # @VncInfo2:
606 # Information about a vnc server
608 # @id: vnc server name.
610 # @server: A list of @VncBasincInfo describing all listening sockets.
611 #          The list can be empty (in case the vnc server is disabled).
612 #          It also may have multiple entries: normal + websocket,
613 #          possibly also ipv4 + ipv6 in the future.
615 # @clients: A list of @VncClientInfo of all currently connected clients.
616 #           The list can be empty, for obvious reasons.
618 # @auth: The current authentication type used by the non-websockets servers
620 # @vencrypt: The vencrypt authentication type used by the servers,
621 #            only specified in case auth == vencrypt.
623 # @display: The display device the vnc server is linked to.
625 # Since: 2.3
627 { 'struct': 'VncInfo2',
628   'data': { 'id'        : 'str',
629             'server'    : ['VncServerInfo2'],
630             'clients'   : ['VncClientInfo'],
631             'auth'      : 'VncPrimaryAuth',
632             '*vencrypt' : 'VncVencryptSubAuth',
633             '*display'  : 'str' },
634   'if': 'CONFIG_VNC' }
637 # @query-vnc:
639 # Returns information about the current VNC server
641 # Returns: @VncInfo
643 # Since: 0.14
645 # Example:
647 # -> { "execute": "query-vnc" }
648 # <- { "return": {
649 #          "enabled":true,
650 #          "host":"0.0.0.0",
651 #          "service":"50402",
652 #          "auth":"vnc",
653 #          "family":"ipv4",
654 #          "clients":[
655 #             {
656 #                "host":"127.0.0.1",
657 #                "service":"50401",
658 #                "family":"ipv4"
659 #             }
660 #          ]
661 #       }
662 #    }
665 { 'command': 'query-vnc', 'returns': 'VncInfo',
666   'if': 'CONFIG_VNC' }
668 # @query-vnc-servers:
670 # Returns a list of vnc servers.  The list can be empty.
672 # Returns: a list of @VncInfo2
674 # Since: 2.3
676 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
677   'if': 'CONFIG_VNC' }
680 # @change-vnc-password:
682 # Change the VNC server password.
684 # @password: the new password to use with VNC authentication
686 # Since: 1.1
688 # Notes: An empty password in this command will set the password to the empty
689 #        string.  Existing clients are unaffected by executing this command.
691 { 'command': 'change-vnc-password',
692   'data': { 'password': 'str' },
693   'if': 'CONFIG_VNC' }
696 # @VNC_CONNECTED:
698 # Emitted when a VNC client establishes a connection
700 # @server: server information
702 # @client: client information
704 # Note: This event is emitted before any authentication takes place, thus
705 #       the authentication ID is not provided
707 # Since: 0.13
709 # Example:
711 # <- { "event": "VNC_CONNECTED",
712 #      "data": {
713 #            "server": { "auth": "sasl", "family": "ipv4",
714 #                        "service": "5901", "host": "0.0.0.0" },
715 #            "client": { "family": "ipv4", "service": "58425",
716 #                        "host": "127.0.0.1" } },
717 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
720 { 'event': 'VNC_CONNECTED',
721   'data': { 'server': 'VncServerInfo',
722             'client': 'VncBasicInfo' },
723   'if': 'CONFIG_VNC' }
726 # @VNC_INITIALIZED:
728 # Emitted after authentication takes place (if any) and the VNC session is
729 # made active
731 # @server: server information
733 # @client: client information
735 # Since: 0.13
737 # Example:
739 # <-  { "event": "VNC_INITIALIZED",
740 #       "data": {
741 #            "server": { "auth": "sasl", "family": "ipv4",
742 #                        "service": "5901", "host": "0.0.0.0"},
743 #            "client": { "family": "ipv4", "service": "46089",
744 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
745 #       "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
748 { 'event': 'VNC_INITIALIZED',
749   'data': { 'server': 'VncServerInfo',
750             'client': 'VncClientInfo' },
751   'if': 'CONFIG_VNC' }
754 # @VNC_DISCONNECTED:
756 # Emitted when the connection is closed
758 # @server: server information
760 # @client: client information
762 # Since: 0.13
764 # Example:
766 # <- { "event": "VNC_DISCONNECTED",
767 #      "data": {
768 #            "server": { "auth": "sasl", "family": "ipv4",
769 #                        "service": "5901", "host": "0.0.0.0" },
770 #            "client": { "family": "ipv4", "service": "58425",
771 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
772 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
775 { 'event': 'VNC_DISCONNECTED',
776   'data': { 'server': 'VncServerInfo',
777             'client': 'VncClientInfo' },
778   'if': 'CONFIG_VNC' }
781 # = Input
785 # @MouseInfo:
787 # Information about a mouse device.
789 # @name: the name of the mouse device
791 # @index: the index of the mouse device
793 # @current: true if this device is currently receiving mouse events
795 # @absolute: true if this device supports absolute coordinates as input
797 # Since: 0.14
799 { 'struct': 'MouseInfo',
800   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
801            'absolute': 'bool'} }
804 # @query-mice:
806 # Returns information about each active mouse device
808 # Returns: a list of @MouseInfo for each device
810 # Since: 0.14
812 # Example:
814 # -> { "execute": "query-mice" }
815 # <- { "return": [
816 #          {
817 #             "name":"QEMU Microsoft Mouse",
818 #             "index":0,
819 #             "current":false,
820 #             "absolute":false
821 #          },
822 #          {
823 #             "name":"QEMU PS/2 Mouse",
824 #             "index":1,
825 #             "current":true,
826 #             "absolute":true
827 #          }
828 #       ]
829 #    }
832 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
835 # @QKeyCode:
837 # An enumeration of key name.
839 # This is used by the @send-key command.
841 # @unmapped: since 2.0
842 # @pause: since 2.0
843 # @ro: since 2.4
844 # @kp_comma: since 2.4
845 # @kp_equals: since 2.6
846 # @power: since 2.6
847 # @hiragana: since 2.9
848 # @henkan: since 2.9
849 # @yen: since 2.9
851 # @sleep: since 2.10
852 # @wake: since 2.10
853 # @audionext: since 2.10
854 # @audioprev: since 2.10
855 # @audiostop: since 2.10
856 # @audioplay: since 2.10
857 # @audiomute: since 2.10
858 # @volumeup: since 2.10
859 # @volumedown: since 2.10
860 # @mediaselect: since 2.10
861 # @mail: since 2.10
862 # @calculator: since 2.10
863 # @computer: since 2.10
864 # @ac_home: since 2.10
865 # @ac_back: since 2.10
866 # @ac_forward: since 2.10
867 # @ac_refresh: since 2.10
868 # @ac_bookmarks: since 2.10
870 # @muhenkan: since 2.12
871 # @katakanahiragana: since 2.12
873 # @lang1: since 6.1
874 # @lang2: since 6.1
876 # 'sysrq' was mistakenly added to hack around the fact that
877 # the ps2 driver was not generating correct scancodes sequences
878 # when 'alt+print' was pressed. This flaw is now fixed and the
879 # 'sysrq' key serves no further purpose. Any further use of
880 # 'sysrq' will be transparently changed to 'print', so they
881 # are effectively synonyms.
883 # Since: 1.3
886 { 'enum': 'QKeyCode',
887   'data': [ 'unmapped',
888             'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
889             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
890             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
891             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
892             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
893             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
894             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
895             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
896             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
897             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
898             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
899             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
900             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
901             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
902             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
903             'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
904             'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
905             'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
906             'volumeup', 'volumedown', 'mediaselect',
907             'mail', 'calculator', 'computer',
908             'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
909             'lang1', 'lang2' ] }
912 # @KeyValueKind:
914 # Since: 1.3
916 { 'enum': 'KeyValueKind',
917   'data': [ 'number', 'qcode' ] }
920 # @IntWrapper:
922 # Since: 1.3
924 { 'struct': 'IntWrapper',
925   'data': { 'data': 'int' } }
928 # @QKeyCodeWrapper:
930 # Since: 1.3
932 { 'struct': 'QKeyCodeWrapper',
933   'data': { 'data': 'QKeyCode' } }
936 # @KeyValue:
938 # Represents a keyboard key.
940 # Since: 1.3
942 { 'union': 'KeyValue',
943   'base': { 'type': 'KeyValueKind' },
944   'discriminator': 'type',
945   'data': {
946     'number': 'IntWrapper',
947     'qcode': 'QKeyCodeWrapper' } }
950 # @send-key:
952 # Send keys to guest.
954 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
955 #        simultaneously sent to the guest. A @KeyValue.number value is sent
956 #        directly to the guest, while @KeyValue.qcode must be a valid
957 #        @QKeyCode value
959 # @hold-time: time to delay key up events, milliseconds. Defaults
960 #             to 100
962 # Returns: - Nothing on success
963 #          - If key is unknown or redundant, InvalidParameter
965 # Since: 1.3
967 # Example:
969 # -> { "execute": "send-key",
970 #      "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
971 #                               { "type": "qcode", "data": "alt" },
972 #                               { "type": "qcode", "data": "delete" } ] } }
973 # <- { "return": {} }
976 { 'command': 'send-key',
977   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
980 # @InputButton:
982 # Button of a pointer input device (mouse, tablet).
984 # @side: front side button of a 5-button mouse (since 2.9)
986 # @extra: rear side button of a 5-button mouse (since 2.9)
988 # Since: 2.0
990 { 'enum'  : 'InputButton',
991   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
992   'extra', 'wheel-left', 'wheel-right' ] }
995 # @InputAxis:
997 # Position axis of a pointer input device (mouse, tablet).
999 # Since: 2.0
1001 { 'enum'  : 'InputAxis',
1002   'data'  : [ 'x', 'y' ] }
1005 # @InputKeyEvent:
1007 # Keyboard input event.
1009 # @key:    Which key this event is for.
1010 # @down:   True for key-down and false for key-up events.
1012 # Since: 2.0
1014 { 'struct'  : 'InputKeyEvent',
1015   'data'  : { 'key'     : 'KeyValue',
1016               'down'    : 'bool' } }
1019 # @InputBtnEvent:
1021 # Pointer button input event.
1023 # @button: Which button this event is for.
1024 # @down:   True for key-down and false for key-up events.
1026 # Since: 2.0
1028 { 'struct'  : 'InputBtnEvent',
1029   'data'  : { 'button'  : 'InputButton',
1030               'down'    : 'bool' } }
1033 # @InputMoveEvent:
1035 # Pointer motion input event.
1037 # @axis: Which axis is referenced by @value.
1038 # @value: Pointer position.  For absolute coordinates the
1039 #         valid range is 0 -> 0x7ffff
1041 # Since: 2.0
1043 { 'struct'  : 'InputMoveEvent',
1044   'data'  : { 'axis'    : 'InputAxis',
1045               'value'   : 'int' } }
1048 # @InputEventKind:
1050 # Since: 2.0
1052 { 'enum': 'InputEventKind',
1053   'data': [ 'key', 'btn', 'rel', 'abs' ] }
1056 # @InputKeyEventWrapper:
1058 # Since: 2.0
1060 { 'struct': 'InputKeyEventWrapper',
1061   'data': { 'data': 'InputKeyEvent' } }
1064 # @InputBtnEventWrapper:
1066 # Since: 2.0
1068 { 'struct': 'InputBtnEventWrapper',
1069   'data': { 'data': 'InputBtnEvent' } }
1072 # @InputMoveEventWrapper:
1074 # Since: 2.0
1076 { 'struct': 'InputMoveEventWrapper',
1077   'data': { 'data': 'InputMoveEvent' } }
1080 # @InputEvent:
1082 # Input event union.
1084 # @type: the input type, one of:
1086 #        - 'key': Input event of Keyboard
1087 #        - 'btn': Input event of pointer buttons
1088 #        - 'rel': Input event of relative pointer motion
1089 #        - 'abs': Input event of absolute pointer motion
1091 # Since: 2.0
1093 { 'union' : 'InputEvent',
1094   'base': { 'type': 'InputEventKind' },
1095   'discriminator': 'type',
1096   'data'  : { 'key'     : 'InputKeyEventWrapper',
1097               'btn'     : 'InputBtnEventWrapper',
1098               'rel'     : 'InputMoveEventWrapper',
1099               'abs'     : 'InputMoveEventWrapper' } }
1102 # @input-send-event:
1104 # Send input event(s) to guest.
1106 # The @device and @head parameters can be used to send the input event
1107 # to specific input devices in case (a) multiple input devices of the
1108 # same kind are added to the virtual machine and (b) you have
1109 # configured input routing (see docs/multiseat.txt) for those input
1110 # devices.  The parameters work exactly like the device and head
1111 # properties of input devices.  If @device is missing, only devices
1112 # that have no input routing config are admissible.  If @device is
1113 # specified, both input devices with and without input routing config
1114 # are admissible, but devices with input routing config take
1115 # precedence.
1117 # @device: display device to send event(s) to.
1118 # @head: head to send event(s) to, in case the
1119 #        display device supports multiple scanouts.
1120 # @events: List of InputEvent union.
1122 # Returns: Nothing on success.
1124 # Since: 2.6
1126 # Note: The consoles are visible in the qom tree, under
1127 #       /backend/console[$index]. They have a device link and head property,
1128 #       so it is possible to map which console belongs to which device and
1129 #       display.
1131 # Example:
1133 # 1. Press left mouse button.
1135 # -> { "execute": "input-send-event",
1136 #     "arguments": { "device": "video0",
1137 #                    "events": [ { "type": "btn",
1138 #                    "data" : { "down": true, "button": "left" } } ] } }
1139 # <- { "return": {} }
1141 # -> { "execute": "input-send-event",
1142 #     "arguments": { "device": "video0",
1143 #                    "events": [ { "type": "btn",
1144 #                    "data" : { "down": false, "button": "left" } } ] } }
1145 # <- { "return": {} }
1147 # 2. Press ctrl-alt-del.
1149 # -> { "execute": "input-send-event",
1150 #      "arguments": { "events": [
1151 #         { "type": "key", "data" : { "down": true,
1152 #           "key": {"type": "qcode", "data": "ctrl" } } },
1153 #         { "type": "key", "data" : { "down": true,
1154 #           "key": {"type": "qcode", "data": "alt" } } },
1155 #         { "type": "key", "data" : { "down": true,
1156 #           "key": {"type": "qcode", "data": "delete" } } } ] } }
1157 # <- { "return": {} }
1159 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1161 # -> { "execute": "input-send-event" ,
1162 #   "arguments": { "events": [
1163 #                { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1164 #                { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1165 # <- { "return": {} }
1168 { 'command': 'input-send-event',
1169   'data': { '*device': 'str',
1170             '*head'  : 'int',
1171             'events' : [ 'InputEvent' ] } }
1174 # @DisplayGTK:
1176 # GTK display options.
1178 # @grab-on-hover: Grab keyboard input on mouse hover.
1179 # @zoom-to-fit: Zoom guest display to fit into the host window.  When
1180 #               turned off the host window will be resized instead.
1181 #               In case the display device can notify the guest on
1182 #               window resizes (virtio-gpu) this will default to "on",
1183 #               assuming the guest will resize the display to match
1184 #               the window size then.  Otherwise it defaults to "off".
1185 #               Since 3.1
1187 # Since: 2.12
1190 { 'struct'  : 'DisplayGTK',
1191   'data'    : { '*grab-on-hover' : 'bool',
1192                 '*zoom-to-fit'   : 'bool'  } }
1195 # @DisplayEGLHeadless:
1197 # EGL headless display options.
1199 # @rendernode: Which DRM render node should be used. Default is the first
1200 #              available node on the host.
1202 # Since: 3.1
1205 { 'struct'  : 'DisplayEGLHeadless',
1206   'data'    : { '*rendernode' : 'str' } }
1209 # @DisplayDBus:
1211 # DBus display options.
1213 # @addr: The D-Bus bus address (default to the session bus).
1215 # @rendernode: Which DRM render node should be used. Default is the first
1216 #              available node on the host.
1218 # @p2p: Whether to use peer-to-peer connections (accepted through
1219 #       ``add_client``).
1221 # @audiodev: Use the specified DBus audiodev to export audio.
1223 # Since: 7.0
1226 { 'struct'  : 'DisplayDBus',
1227   'data'    : { '*rendernode' : 'str',
1228                 '*addr': 'str',
1229                 '*p2p': 'bool',
1230                 '*audiodev': 'str' } }
1232  ##
1233  # @DisplayGLMode:
1235  # Display OpenGL mode.
1237  # @off: Disable OpenGL (default).
1238  # @on: Use OpenGL, pick context type automatically.
1239  #      Would better be named 'auto' but is called 'on' for backward
1240  #      compatibility with bool type.
1241  # @core: Use OpenGL with Core (desktop) Context.
1242  # @es: Use OpenGL with ES (embedded systems) Context.
1244  # Since: 3.0
1246  ##
1247 { 'enum'    : 'DisplayGLMode',
1248   'data'    : [ 'off', 'on', 'core', 'es' ] }
1251 # @DisplayCurses:
1253 # Curses display options.
1255 # @charset:       Font charset used by guest (default: CP437).
1257 # Since: 4.0
1260 { 'struct'  : 'DisplayCurses',
1261   'data'    : { '*charset'       : 'str' } }
1264 # @DisplayType:
1266 # Display (user interface) type.
1268 # @default: The default user interface, selecting from the first available
1269 #           of gtk, sdl, cocoa, and vnc.
1271 # @none: No user interface or video output display. The guest will
1272 #        still see an emulated graphics card, but its output will not
1273 #        be displayed to the QEMU user.
1275 # @gtk: The GTK user interface.
1277 # @sdl: The SDL user interface.
1279 # @egl-headless: No user interface, offload GL operations to a local
1280 #                DRI device. Graphical display need to be paired with
1281 #                VNC or Spice. (Since 3.1)
1283 # @curses: Display video output via curses.  For graphics device
1284 #          models which support a text mode, QEMU can display this
1285 #          output using a curses/ncurses interface. Nothing is
1286 #          displayed when the graphics device is in graphical mode or
1287 #          if the graphics device does not support a text
1288 #          mode. Generally only the VGA device models support text
1289 #          mode.
1291 # @cocoa: The Cocoa user interface.
1293 # @spice-app: Set up a Spice server and run the default associated
1294 #             application to connect to it. The server will redirect
1295 #             the serial console and QEMU monitors. (Since 4.0)
1297 # @dbus: Start a D-Bus service for the display. (Since 7.0)
1299 # Since: 2.12
1302 { 'enum'    : 'DisplayType',
1303   'data'    : [
1304     { 'name': 'default' },
1305     { 'name': 'none' },
1306     { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1307     { 'name': 'sdl', 'if': 'CONFIG_SDL' },
1308     { 'name': 'egl-headless',
1309               'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1310     { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1311     { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
1312     { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1313     { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1314   ]
1318 # @DisplayOptions:
1320 # Display (user interface) options.
1322 # @type:          Which DisplayType qemu should use.
1323 # @full-screen:   Start user interface in fullscreen mode (default: off).
1324 # @window-close:  Allow to quit qemu with window close button (default: on).
1325 # @show-cursor:   Force showing the mouse cursor (default: off).
1326 #                 (since: 5.0)
1327 # @gl:            Enable OpenGL support (default: off).
1329 # Since: 2.12
1332 { 'union'   : 'DisplayOptions',
1333   'base'    : { 'type'           : 'DisplayType',
1334                 '*full-screen'   : 'bool',
1335                 '*window-close'  : 'bool',
1336                 '*show-cursor'   : 'bool',
1337                 '*gl'            : 'DisplayGLMode' },
1338   'discriminator' : 'type',
1339   'data'    : {
1340       'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
1341       'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
1342       'egl-headless': { 'type': 'DisplayEGLHeadless',
1343                         'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } },
1344       'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' }
1345   }
1349 # @query-display-options:
1351 # Returns information about display configuration
1353 # Returns: @DisplayOptions
1355 # Since: 3.1
1358 { 'command': 'query-display-options',
1359   'returns': 'DisplayOptions' }
1362 # @DisplayReloadType:
1364 # Available DisplayReload types.
1366 # @vnc: VNC display
1368 # Since: 6.0
1371 { 'enum': 'DisplayReloadType',
1372   'data': ['vnc'] }
1375 # @DisplayReloadOptionsVNC:
1377 # Specify the VNC reload options.
1379 # @tls-certs: reload tls certs or not.
1381 # Since: 6.0
1384 { 'struct': 'DisplayReloadOptionsVNC',
1385   'data': { '*tls-certs': 'bool' } }
1388 # @DisplayReloadOptions:
1390 # Options of the display configuration reload.
1392 # @type: Specify the display type.
1394 # Since: 6.0
1397 { 'union': 'DisplayReloadOptions',
1398   'base': {'type': 'DisplayReloadType'},
1399   'discriminator': 'type',
1400   'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1403 # @display-reload:
1405 # Reload display configuration.
1407 # Returns: Nothing on success.
1409 # Since: 6.0
1411 # Example:
1413 # -> { "execute": "display-reload",
1414 #      "arguments": { "type": "vnc", "tls-certs": true  } }
1415 # <- { "return": {} }
1418 { 'command': 'display-reload',
1419   'data': 'DisplayReloadOptions',
1420   'boxed' : true }