master
json 1,727 lines 42.4 KB
Raw
1 # -*- Mode: Python -*-
2 # vim: filetype=python
3 #
4
5 ##
6 # **************
7 # Remote desktop
8 # **************
9 ##
10
11 { 'include': 'common.json' }
12 { 'include': 'sockets.json' }
13
14 ##
15 # @DisplayProtocol:
16 #
17 # Display protocols which support changing password options.
18 #
19 # Since: 7.0
20 ##
21 { 'enum': 'DisplayProtocol',
22 'data': [ 'vnc', 'spice' ] }
23
24 ##
25 # @SetPasswordAction:
26 #
27 # An action to take on changing a password on a connection with active
28 # clients.
29 #
30 # @keep: maintain existing clients
31 #
32 # @fail: fail the command if clients are connected
33 #
34 # @disconnect: disconnect existing clients
35 #
36 # Since: 7.0
37 ##
38 { 'enum': 'SetPasswordAction',
39 'data': [ 'keep', 'fail', 'disconnect' ] }
40
41 ##
42 # @SetPasswordOptions:
43 #
44 # Options for `set_password`.
45 #
46 # @protocol:
47 # - 'vnc' to modify the VNC server password
48 # - 'spice' to modify the Spice server password
49 #
50 # @password: the new password
51 #
52 # @connected: How to handle existing clients when changing the
53 # password. If nothing is specified, defaults to 'keep'. For
54 # VNC, only 'keep' is currently implemented.
55 #
56 # Since: 7.0
57 ##
58 { 'union': 'SetPasswordOptions',
59 'base': { 'protocol': 'DisplayProtocol',
60 'password': 'str',
61 '*connected': 'SetPasswordAction' },
62 'discriminator': 'protocol',
63 'data': { 'vnc': 'SetPasswordOptionsVnc' } }
64
65 ##
66 # @SetPasswordOptionsVnc:
67 #
68 # Options for `set_password` specific to the VNC protocol.
69 #
70 # @display: The id of the display where the password should be
71 # changed. Defaults to the first.
72 #
73 # Since: 7.0
74 ##
75 { 'struct': 'SetPasswordOptionsVnc',
76 'data': { '*display': 'str' } }
77
78 ##
79 # @set_password:
80 #
81 # Set the password of a remote display server.
82 #
83 # Errors:
84 # - If Spice is not enabled, DeviceNotFound
85 #
86 # Since: 0.14
87 #
88 # .. qmp-example::
89 #
90 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
91 # "password": "secret" } }
92 # <- { "return": {} }
93 ##
94 { 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' }
95
96 ##
97 # @ExpirePasswordOptions:
98 #
99 # General options for `expire_password`.
100 #
101 # @protocol:
102 # - 'vnc' to modify the VNC server expiration
103 # - 'spice' to modify the Spice server expiration
104 #
105 # @time: when to expire the password.
106 #
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
111 #
112 # .. note:: Time is relative to the server and currently there is no
113 # way to coordinate server time with client time. It is not
114 # recommended to use the absolute time version of the @time
115 # parameter unless you're sure you are on the same machine as the
116 # QEMU instance.
117 #
118 # Since: 7.0
119 ##
120 { 'union': 'ExpirePasswordOptions',
121 'base': { 'protocol': 'DisplayProtocol',
122 'time': 'str' },
123 'discriminator': 'protocol',
124 'data': { 'vnc': 'ExpirePasswordOptionsVnc' } }
125
126 ##
127 # @ExpirePasswordOptionsVnc:
128 #
129 # Options for `expire_password` specific to the VNC protocol.
130 #
131 # @display: The id of the display where the expiration should be
132 # changed. Defaults to the first.
133 #
134 # Since: 7.0
135 ##
136 { 'struct': 'ExpirePasswordOptionsVnc',
137 'data': { '*display': 'str' } }
138
139 ##
140 # @expire_password:
141 #
142 # Expire the password of a remote display server.
143 #
144 # Errors:
145 # - If @protocol is 'spice' and Spice is not active,
146 # DeviceNotFound
147 #
148 # Since: 0.14
149 #
150 # .. qmp-example::
151 #
152 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
153 # "time": "+60" } }
154 # <- { "return": {} }
155 ##
156 { 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
157
158 ##
159 # @ImageFormat:
160 #
161 # Supported image format types.
162 #
163 # @png: PNG format
164 #
165 # @ppm: PPM format
166 #
167 # Since: 7.1
168 ##
169 { 'enum': 'ImageFormat',
170 'data': ['ppm', 'png'] }
171
172 ##
173 # @screendump:
174 #
175 # Capture the contents of a screen and write it to a file.
176 #
177 # @filename: the path of a new file to store the image
178 #
179 # @device: ID of the display device that should be dumped. If this
180 # parameter is missing, the primary display will be used.
181 # (Since 2.12)
182 #
183 # @head: head to use in case the device supports multiple heads. If
184 # this parameter is missing, head #0 will be used. Also note that
185 # the head can only be specified in conjunction with the device
186 # ID. (Since 2.12)
187 #
188 # @format: image format for `screendump`. (default: ppm) (Since 7.1)
189 #
190 # Since: 0.14
191 #
192 # .. qmp-example::
193 #
194 # -> { "execute": "screendump",
195 # "arguments": { "filename": "/tmp/image" } }
196 # <- { "return": {} }
197 ##
198 { 'command': 'screendump',
199 'data': {'filename': 'str', '*device': 'str', '*head': 'int',
200 '*format': 'ImageFormat'},
201 'coroutine': true,
202 'if': 'CONFIG_PIXMAN' }
203
204 ##
205 # Spice
206 # =====
207 ##
208
209 ##
210 # @SpiceBasicInfo:
211 #
212 # The basic information for SPICE network connection
213 #
214 # @host: IP address
215 #
216 # @port: port number
217 #
218 # @family: address family
219 #
220 # Since: 2.1
221 ##
222 { 'struct': 'SpiceBasicInfo',
223 'data': { 'host': 'str',
224 'port': 'str',
225 'family': 'NetworkAddressFamily' },
226 'if': 'CONFIG_SPICE' }
227
228 ##
229 # @SpiceServerInfo:
230 #
231 # Information about a SPICE server
232 #
233 # @auth: authentication method
234 #
235 # Since: 2.1
236 ##
237 { 'struct': 'SpiceServerInfo',
238 'base': 'SpiceBasicInfo',
239 'data': { '*auth': 'str' },
240 'if': 'CONFIG_SPICE' }
241
242 ##
243 # @SpiceChannel:
244 #
245 # Information about a SPICE client channel.
246 #
247 # @connection-id: SPICE connection id number. All channels with the
248 # same id belong to the same SPICE session.
249 #
250 # @channel-type: SPICE channel type number. "1" is the main control
251 # channel, filter for this one if you want to track spice sessions
252 # only
253 #
254 # @channel-id: SPICE channel ID number. Usually "0", might be
255 # different when multiple channels of the same type exist, such as
256 # multiple display channels in a multihead setup
257 #
258 # @tls: true if the channel is encrypted, false otherwise.
259 #
260 # Since: 0.14
261 ##
262 { 'struct': 'SpiceChannel',
263 'base': 'SpiceBasicInfo',
264 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
265 'tls': 'bool'},
266 'if': 'CONFIG_SPICE' }
267
268 ##
269 # @SpiceQueryMouseMode:
270 #
271 # An enumeration of Spice mouse states.
272 #
273 # @client: Mouse cursor position is determined by the client.
274 #
275 # @server: Mouse cursor position is determined by the server.
276 #
277 # @unknown: No information is available about mouse mode used by the
278 # spice server.
279 #
280 # Since: 1.1
281 ##
282 { 'enum': 'SpiceQueryMouseMode',
283 'data': [ 'client', 'server', 'unknown' ],
284 'if': 'CONFIG_SPICE' }
285
286 ##
287 # @SpiceInfo:
288 #
289 # Information about the SPICE session.
290 #
291 # @enabled: true if the SPICE server is enabled, false otherwise
292 #
293 # @migrated: true if the last guest migration completed and spice
294 # migration had completed as well, false otherwise (since 1.4)
295 #
296 # @host: The hostname the SPICE server is bound to. This depends on
297 # the name resolution on the host and may be an IP address.
298 #
299 # @port: The SPICE server's port number.
300 #
301 # @compiled-version: SPICE server version.
302 #
303 # @tls-port: The SPICE server's TLS port number.
304 #
305 # @auth: the current authentication type used by the server
306 #
307 # - 'none' if no authentication is being used
308 # - 'spice' uses SASL or direct TLS authentication, depending on
309 # command line options
310 #
311 # @mouse-mode: The mode in which the mouse cursor is displayed
312 # currently. Can be determined by the client or the server, or
313 # unknown if spice server doesn't provide this information.
314 # (since: 1.1)
315 #
316 # @channels: a list of `SpiceChannel` for each active spice channel
317 #
318 # Since: 0.14
319 ##
320 { 'struct': 'SpiceInfo',
321 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
322 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
323 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
324 'if': 'CONFIG_SPICE' }
325
326 ##
327 # @query-spice:
328 #
329 # Return information about the current SPICE server
330 #
331 # Since: 0.14
332 #
333 # .. qmp-example::
334 #
335 # -> { "execute": "query-spice" }
336 # <- { "return": {
337 # "enabled": true,
338 # "auth": "spice",
339 # "port": 5920,
340 # "migrated":false,
341 # "tls-port": 5921,
342 # "host": "0.0.0.0",
343 # "mouse-mode":"client",
344 # "channels": [
345 # {
346 # "port": "54924",
347 # "family": "ipv4",
348 # "channel-type": 1,
349 # "connection-id": 1804289383,
350 # "host": "127.0.0.1",
351 # "channel-id": 0,
352 # "tls": true
353 # },
354 # {
355 # "port": "36710",
356 # "family": "ipv4",
357 # "channel-type": 4,
358 # "connection-id": 1804289383,
359 # "host": "127.0.0.1",
360 # "channel-id": 0,
361 # "tls": false
362 # },
363 # ...
364 # ]
365 # }
366 # }
367 ##
368 { 'command': 'query-spice', 'returns': 'SpiceInfo',
369 'if': 'CONFIG_SPICE' }
370
371 ##
372 # @SPICE_CONNECTED:
373 #
374 # Emitted when a SPICE client establishes a connection
375 #
376 # @server: server information
377 #
378 # @client: client information
379 #
380 # Since: 0.14
381 #
382 # .. qmp-example::
383 #
384 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
385 # "event": "SPICE_CONNECTED",
386 # "data": {
387 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
388 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
389 # }}
390 ##
391 { 'event': 'SPICE_CONNECTED',
392 'data': { 'server': 'SpiceBasicInfo',
393 'client': 'SpiceBasicInfo' },
394 'if': 'CONFIG_SPICE' }
395
396 ##
397 # @SPICE_INITIALIZED:
398 #
399 # Emitted after initial handshake and authentication takes place (if
400 # any) and the SPICE channel is up and running
401 #
402 # @server: server information
403 #
404 # @client: client information
405 #
406 # Since: 0.14
407 #
408 # .. qmp-example::
409 #
410 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
411 # "event": "SPICE_INITIALIZED",
412 # "data": {"server": {"auth": "spice", "port": "5921",
413 # "family": "ipv4", "host": "127.0.0.1"},
414 # "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
415 # "connection-id": 1804289383, "host": "127.0.0.1",
416 # "channel-id": 0, "tls": true}
417 # }}
418 ##
419 { 'event': 'SPICE_INITIALIZED',
420 'data': { 'server': 'SpiceServerInfo',
421 'client': 'SpiceChannel' },
422 'if': 'CONFIG_SPICE' }
423
424 ##
425 # @SPICE_DISCONNECTED:
426 #
427 # Emitted when the SPICE connection is closed
428 #
429 # @server: server information
430 #
431 # @client: client information
432 #
433 # Since: 0.14
434 #
435 # .. qmp-example::
436 #
437 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
438 # "event": "SPICE_DISCONNECTED",
439 # "data": {
440 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
441 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
442 # }}
443 ##
444 { 'event': 'SPICE_DISCONNECTED',
445 'data': { 'server': 'SpiceBasicInfo',
446 'client': 'SpiceBasicInfo' },
447 'if': 'CONFIG_SPICE' }
448
449 ##
450 # @SPICE_MIGRATE_COMPLETED:
451 #
452 # Emitted when SPICE migration has completed
453 #
454 # Since: 1.3
455 #
456 # .. qmp-example::
457 #
458 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
459 # "event": "SPICE_MIGRATE_COMPLETED" }
460 ##
461 { 'event': 'SPICE_MIGRATE_COMPLETED',
462 'if': 'CONFIG_SPICE' }
463
464 ##
465 # VNC
466 # ===
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 `VncBasicInfo` 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 # Return information about the current VNC server
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 ##
687 # @query-vnc-servers:
688 #
689 # Return a list of vnc servers. The list can be empty.
690 #
691 # Since: 2.3
692 ##
693 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
694 'if': 'CONFIG_VNC' }
695
696 ##
697 # @change-vnc-password:
698 #
699 # Change the VNC server password.
700 #
701 # @password: the new password to use with VNC authentication
702 #
703 # Since: 1.1
704 #
705 # .. note:: An empty password in this command will set the password to
706 # the empty string. Existing clients are unaffected by executing
707 # this command.
708 ##
709 { 'command': 'change-vnc-password',
710 'data': { 'password': 'str' },
711 'if': 'CONFIG_VNC' }
712
713 ##
714 # @VNC_CONNECTED:
715 #
716 # Emitted when a VNC client establishes a connection
717 #
718 # @server: server information
719 #
720 # @client: client information
721 #
722 # .. note:: This event is emitted before any authentication takes
723 # place, thus the authentication ID is not provided.
724 #
725 # Since: 0.13
726 #
727 # .. qmp-example::
728 #
729 # <- { "event": "VNC_CONNECTED",
730 # "data": {
731 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
732 # "service": "5901", "host": "0.0.0.0" },
733 # "client": { "family": "ipv4", "service": "58425",
734 # "host": "127.0.0.1", "websocket": false } },
735 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
736 ##
737 { 'event': 'VNC_CONNECTED',
738 'data': { 'server': 'VncServerInfo',
739 'client': 'VncBasicInfo' },
740 'if': 'CONFIG_VNC' }
741
742 ##
743 # @VNC_INITIALIZED:
744 #
745 # Emitted after authentication takes place (if any) and the VNC
746 # session is made active
747 #
748 # @server: server information
749 #
750 # @client: client information
751 #
752 # Since: 0.13
753 #
754 # .. qmp-example::
755 #
756 # <- { "event": "VNC_INITIALIZED",
757 # "data": {
758 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
759 # "service": "5901", "host": "0.0.0.0"},
760 # "client": { "family": "ipv4", "service": "46089", "websocket": false,
761 # "host": "127.0.0.1", "sasl_username": "luiz" } },
762 # "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
763 ##
764 { 'event': 'VNC_INITIALIZED',
765 'data': { 'server': 'VncServerInfo',
766 'client': 'VncClientInfo' },
767 'if': 'CONFIG_VNC' }
768
769 ##
770 # @VNC_DISCONNECTED:
771 #
772 # Emitted when the connection is closed
773 #
774 # @server: server information
775 #
776 # @client: client information
777 #
778 # Since: 0.13
779 #
780 # .. qmp-example::
781 #
782 # <- { "event": "VNC_DISCONNECTED",
783 # "data": {
784 # "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
785 # "service": "5901", "host": "0.0.0.0" },
786 # "client": { "family": "ipv4", "service": "58425", "websocket": false,
787 # "host": "127.0.0.1", "sasl_username": "luiz" } },
788 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
789 ##
790 { 'event': 'VNC_DISCONNECTED',
791 'data': { 'server': 'VncServerInfo',
792 'client': 'VncClientInfo' },
793 'if': 'CONFIG_VNC' }
794
795 ##
796 # *****
797 # Input
798 # *****
799 ##
800
801 ##
802 # @MouseInfo:
803 #
804 # Information about a mouse device.
805 #
806 # @name: the name of the mouse device
807 #
808 # @index: the index of the mouse device
809 #
810 # @current: true if this device is currently receiving mouse events
811 #
812 # @absolute: true if this device supports absolute coordinates as
813 # input
814 #
815 # Since: 0.14
816 ##
817 { 'struct': 'MouseInfo',
818 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
819 'absolute': 'bool'} }
820
821 ##
822 # @query-mice:
823 #
824 # Return information about each active mouse device
825 #
826 # Returns: a list of info for each device
827 #
828 # Since: 0.14
829 #
830 # .. qmp-example::
831 #
832 # -> { "execute": "query-mice" }
833 # <- { "return": [
834 # {
835 # "name":"QEMU Microsoft Mouse",
836 # "index":0,
837 # "current":false,
838 # "absolute":false
839 # },
840 # {
841 # "name":"QEMU PS/2 Mouse",
842 # "index":1,
843 # "current":true,
844 # "absolute":true
845 # }
846 # ]
847 # }
848 ##
849 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
850
851 ##
852 # @QKeyCode:
853 #
854 # An enumeration of key name.
855 #
856 # This is used by the `send-key` command.
857 #
858 # @unmapped: since 2.0
859 #
860 # @pause: since 2.0
861 #
862 # @ro: since 2.4
863 #
864 # @kp_comma: since 2.4
865 #
866 # @kp_equals: since 2.6
867 #
868 # @power: since 2.6
869 #
870 # @hiragana: since 2.9
871 #
872 # @henkan: since 2.9
873 #
874 # @yen: since 2.9
875 #
876 # @sleep: since 2.10
877 #
878 # @wake: since 2.10
879 #
880 # @audionext: since 2.10
881 #
882 # @audioprev: since 2.10
883 #
884 # @audiostop: since 2.10
885 #
886 # @audioplay: since 2.10
887 #
888 # @audiomute: since 2.10
889 #
890 # @volumeup: since 2.10
891 #
892 # @volumedown: since 2.10
893 #
894 # @mediaselect: since 2.10
895 #
896 # @mail: since 2.10
897 #
898 # @calculator: since 2.10
899 #
900 # @computer: since 2.10
901 #
902 # @ac_home: since 2.10
903 #
904 # @ac_back: since 2.10
905 #
906 # @ac_forward: since 2.10
907 #
908 # @ac_refresh: since 2.10
909 #
910 # @ac_bookmarks: since 2.10
911 #
912 # @muhenkan: since 2.12
913 #
914 # @katakanahiragana: since 2.12
915 #
916 # @lang1: since 6.1
917 #
918 # @lang2: since 6.1
919 #
920 # @f13: since 8.0
921 #
922 # @f14: since 8.0
923 #
924 # @f15: since 8.0
925 #
926 # @f16: since 8.0
927 #
928 # @f17: since 8.0
929 #
930 # @f18: since 8.0
931 #
932 # @f19: since 8.0
933 #
934 # @f20: since 8.0
935 #
936 # @f21: since 8.0
937 #
938 # @f22: since 8.0
939 #
940 # @f23: since 8.0
941 #
942 # @f24: since 8.0
943 #
944 # 'sysrq' was mistakenly added to hack around the fact that the ps2
945 # driver was not generating correct scancodes sequences when
946 # 'alt+print' was pressed. This flaw is now fixed and the 'sysrq' key
947 # serves no further purpose. Any further use of 'sysrq' will be
948 # transparently changed to 'print', so they are effectively synonyms.
949 #
950 # Since: 1.3
951 ##
952 { 'enum': 'QKeyCode',
953 'prefix': 'Q_KEY_CODE',
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
1028 # array are simultaneously sent to the guest. A `KeyValue`.number
1029 # value is sent directly to the guest, while `KeyValue`.qcode must
1030 # be a 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 # .. qmp-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 # @InputKeyEvent:
1100 #
1101 # Keyboard input event.
1102 #
1103 # @key: Which key this event is for.
1104 #
1105 # @down: True for key-down and false for key-up events.
1106 #
1107 # Since: 2.0
1108 ##
1109 { 'struct' : 'InputKeyEvent',
1110 'data' : { 'key' : 'KeyValue',
1111 'down' : 'bool' } }
1112
1113 ##
1114 # @InputBtnEvent:
1115 #
1116 # Pointer button input event.
1117 #
1118 # @button: Which button this event is for.
1119 #
1120 # @down: True for key-down and false for key-up events.
1121 #
1122 # Since: 2.0
1123 ##
1124 { 'struct' : 'InputBtnEvent',
1125 'data' : { 'button' : 'InputButton',
1126 'down' : 'bool' } }
1127
1128 ##
1129 # @InputMoveEvent:
1130 #
1131 # Pointer motion input event.
1132 #
1133 # @axis: Which axis is referenced by @value.
1134 #
1135 # @value: Pointer position. For absolute coordinates the valid range
1136 # is 0 to 0x7fff.
1137 #
1138 # Since: 2.0
1139 ##
1140 { 'struct' : 'InputMoveEvent',
1141 'data' : { 'axis' : 'InputAxis',
1142 'value' : 'int' } }
1143
1144 ##
1145 # @InputMultiTouchEvent:
1146 #
1147 # MultiTouch input event.
1148 #
1149 # @type: The type of multi-touch event.
1150 #
1151 # @slot: Which slot has generated the event.
1152 #
1153 # @tracking-id: ID to correlate this event with previously generated
1154 # events.
1155 #
1156 # @axis: Which axis is referenced by @value.
1157 #
1158 # @value: Contact position.
1159 #
1160 # Since: 8.1
1161 ##
1162 { 'struct' : 'InputMultiTouchEvent',
1163 'data' : { 'type' : 'InputMultiTouchType',
1164 'slot' : 'int',
1165 'tracking-id': 'int',
1166 'axis' : 'InputAxis',
1167 'value' : 'int' } }
1168
1169 ##
1170 # @InputEventKind:
1171 #
1172 # @key: a keyboard input event
1173 #
1174 # @btn: a pointer button input event
1175 #
1176 # @rel: a relative pointer motion input event
1177 #
1178 # @abs: an absolute pointer motion input event
1179 #
1180 # @mtt: a multi-touch input event
1181 #
1182 # Since: 2.0
1183 ##
1184 { 'enum': 'InputEventKind',
1185 'data': [ 'key', 'btn', 'rel', 'abs', 'mtt' ] }
1186
1187 ##
1188 # @InputKeyEventWrapper:
1189 #
1190 # @data: Keyboard input event
1191 #
1192 # Since: 2.0
1193 ##
1194 { 'struct': 'InputKeyEventWrapper',
1195 'data': { 'data': 'InputKeyEvent' } }
1196
1197 ##
1198 # @InputBtnEventWrapper:
1199 #
1200 # @data: Pointer button input event
1201 #
1202 # Since: 2.0
1203 ##
1204 { 'struct': 'InputBtnEventWrapper',
1205 'data': { 'data': 'InputBtnEvent' } }
1206
1207 ##
1208 # @InputMoveEventWrapper:
1209 #
1210 # @data: Pointer motion input event
1211 #
1212 # Since: 2.0
1213 ##
1214 { 'struct': 'InputMoveEventWrapper',
1215 'data': { 'data': 'InputMoveEvent' } }
1216
1217 ##
1218 # @InputMultiTouchEventWrapper:
1219 #
1220 # @data: MultiTouch input event
1221 #
1222 # Since: 8.1
1223 ##
1224 { 'struct': 'InputMultiTouchEventWrapper',
1225 'data': { 'data': 'InputMultiTouchEvent' } }
1226
1227 ##
1228 # @InputEvent:
1229 #
1230 # Input event union.
1231 #
1232 # @type: the type of input event
1233 #
1234 # Since: 2.0
1235 ##
1236 { 'union' : 'InputEvent',
1237 'base': { 'type': 'InputEventKind' },
1238 'discriminator': 'type',
1239 'data' : { 'key' : 'InputKeyEventWrapper',
1240 'btn' : 'InputBtnEventWrapper',
1241 'rel' : 'InputMoveEventWrapper',
1242 'abs' : 'InputMoveEventWrapper',
1243 'mtt' : 'InputMultiTouchEventWrapper' } }
1244
1245 ##
1246 # @input-send-event:
1247 #
1248 # Send input event(s) to guest.
1249 #
1250 # The @device and @head parameters can be used to send the input event
1251 # to specific input devices in case (a) multiple input devices of the
1252 # same kind are added to the virtual machine and (b) you have
1253 # configured input routing (see docs/multiseat.txt) for those input
1254 # devices. The parameters work exactly like the device and head
1255 # properties of input devices. If @device is missing, only devices
1256 # that have no input routing config are admissible. If @device is
1257 # specified, both input devices with and without input routing config
1258 # are admissible, but devices with input routing config take
1259 # precedence.
1260 #
1261 # @device: display device to send event(s) to.
1262 #
1263 # @head: head to send event(s) to, in case the display device supports
1264 # multiple scanouts.
1265 #
1266 # @events: List of `InputEvent` union.
1267 #
1268 # Since: 2.6
1269 #
1270 # .. note:: The consoles are visible in the qom tree, under
1271 # ``/backend/console[$index]``. They have a device link and head
1272 # property, so it is possible to map which console belongs to which
1273 # device and display.
1274 #
1275 # .. qmp-example::
1276 # :title: Press left mouse button
1277 #
1278 # -> { "execute": "input-send-event",
1279 # "arguments": { "device": "video0",
1280 # "events": [ { "type": "btn",
1281 # "data" : { "down": true, "button": "left" } } ] } }
1282 # <- { "return": {} }
1283 #
1284 # -> { "execute": "input-send-event",
1285 # "arguments": { "device": "video0",
1286 # "events": [ { "type": "btn",
1287 # "data" : { "down": false, "button": "left" } } ] } }
1288 # <- { "return": {} }
1289 #
1290 # .. qmp-example::
1291 # :title: Press ctrl-alt-del
1292 #
1293 # -> { "execute": "input-send-event",
1294 # "arguments": { "events": [
1295 # { "type": "key", "data" : { "down": true,
1296 # "key": {"type": "qcode", "data": "ctrl" } } },
1297 # { "type": "key", "data" : { "down": true,
1298 # "key": {"type": "qcode", "data": "alt" } } },
1299 # { "type": "key", "data" : { "down": true,
1300 # "key": {"type": "qcode", "data": "delete" } } } ] } }
1301 # <- { "return": {} }
1302 #
1303 # .. qmp-example::
1304 # :title: Move mouse pointer to absolute coordinates
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 # @clipboard: Enable host-guest clipboard sharing. Defaults to "off".
1323 # (Since 11.1)
1324 #
1325 # @grab-on-hover: Grab keyboard input on mouse hover.
1326 #
1327 # @zoom-to-fit: Zoom guest display to fit into the host window. When
1328 # turned off the host window will be resized instead. In case the
1329 # display device can notify the guest on window resizes
1330 # (virtio-gpu) this will default to "on", assuming the guest will
1331 # resize the display to match the window size then. Otherwise it
1332 # defaults to "off". (Since 3.1)
1333 #
1334 # @show-tabs: Display the tab bar for switching between the various
1335 # graphical interfaces (e.g. VGA and virtual console character
1336 # devices) by default. (Since 7.1)
1337 #
1338 # @show-menubar: Display the main window menubar. Defaults to "on".
1339 # (Since 8.0)
1340 #
1341 # @keep-aspect-ratio: Keep width/height aspect ratio of guest content
1342 # when resizing host window. Defaults to "on". (Since 10.1)
1343 #
1344 # @scale: Set preferred scale of the display. Defaults to 1.0.
1345 # (Since 10.1)
1346 #
1347 # Since: 2.12
1348 ##
1349 { 'struct' : 'DisplayGTK',
1350 'data' : { '*clipboard' : 'bool',
1351 '*grab-on-hover' : 'bool',
1352 '*zoom-to-fit' : 'bool',
1353 '*show-tabs' : 'bool',
1354 '*show-menubar' : 'bool',
1355 '*keep-aspect-ratio' : 'bool',
1356 '*scale' : 'number' } }
1357
1358 ##
1359 # @DisplayEGLHeadless:
1360 #
1361 # EGL headless display options.
1362 #
1363 # @rendernode: Which DRM render node should be used. Default is the
1364 # first available node on the host.
1365 #
1366 # Since: 3.1
1367 ##
1368 { 'struct' : 'DisplayEGLHeadless',
1369 'data' : { '*rendernode' : 'str' } }
1370
1371 ##
1372 # @DisplayDBus:
1373 #
1374 # DBus display options.
1375 #
1376 # @addr: The D-Bus bus address (default to the session bus).
1377 #
1378 # @rendernode: Which DRM render node should be used. Default is the
1379 # first available node on the host.
1380 #
1381 # @p2p: Whether to use peer-to-peer connections (accepted through
1382 # `add_client`).
1383 #
1384 # @audiodev: Use the specified DBus audiodev to export audio.
1385 #
1386 # Since: 7.0
1387 ##
1388 { 'struct' : 'DisplayDBus',
1389 'data' : { '*rendernode' : 'str',
1390 '*addr': 'str',
1391 '*p2p': 'bool',
1392 '*audiodev': 'str' } }
1393
1394 ##
1395 # @DisplayGLMode:
1396 #
1397 # Display OpenGL mode.
1398 #
1399 # @off: Disable OpenGL (default).
1400 #
1401 # @on: Use OpenGL, pick context type automatically. Would better be
1402 # named 'auto' but is called 'on' for backward compatibility with
1403 # bool type.
1404 #
1405 # @core: Use OpenGL with Core (desktop) Context.
1406 #
1407 # @es: Use OpenGL with ES (embedded systems) Context.
1408 #
1409 # Since: 3.0
1410 ##
1411 { 'enum' : 'DisplayGLMode',
1412 'data' : [ 'off', 'on', 'core', 'es' ] }
1413
1414 ##
1415 # @DisplayCurses:
1416 #
1417 # Curses display options.
1418 #
1419 # @charset: Font charset used by guest (default: CP437).
1420 #
1421 # Since: 4.0
1422 ##
1423 { 'struct' : 'DisplayCurses',
1424 'data' : { '*charset' : 'str' } }
1425
1426 ##
1427 # @DisplayCocoa:
1428 #
1429 # Cocoa display options.
1430 #
1431 # @left-command-key: Enable/disable forwarding of left command key to
1432 # guest. Allows command-tab window switching on the host without
1433 # sending this key to the guest when "off". Defaults to "on"
1434 #
1435 # @full-grab: Capture all key presses, including system combos. This
1436 # requires accessibility permissions, since it performs a global
1437 # grab on key events. (default: off) See
1438 # https://support.apple.com/en-in/guide/mac-help/mh32356/mac
1439 #
1440 # @swap-opt-cmd: Swap the Option and Command keys so that their key
1441 # codes match their position on non-Mac keyboards and you can use
1442 # Meta/Super and Alt where you expect them. (default: off)
1443 #
1444 # @zoom-to-fit: Zoom guest display to fit into the host window. When
1445 # turned off the host window will be resized instead. Defaults to
1446 # "off". (Since 8.2)
1447 #
1448 # @zoom-interpolation: Apply interpolation to smooth output when
1449 # zoom-to-fit is enabled. Defaults to "off". (Since 9.0)
1450 #
1451 # Since: 7.0
1452 ##
1453 { 'struct': 'DisplayCocoa',
1454 'data': {
1455 '*left-command-key': 'bool',
1456 '*full-grab': 'bool',
1457 '*swap-opt-cmd': 'bool',
1458 '*zoom-to-fit': 'bool',
1459 '*zoom-interpolation': 'bool'
1460 } }
1461
1462 ##
1463 # @HotKeyMod:
1464 #
1465 # Set of modifier keys that need to be held for shortcut key actions.
1466 #
1467 # Since: 7.1
1468 ##
1469 { 'enum' : 'HotKeyMod',
1470 'data' : [ 'lctrl-lalt', 'lshift-lctrl-lalt', 'rctrl' ] }
1471
1472 ##
1473 # @DisplaySDL:
1474 #
1475 # SDL2 display options.
1476 #
1477 # @grab-mod: Modifier keys that should be pressed together with the
1478 # "G" key to release the mouse grab.
1479 #
1480 # Since: 7.1
1481 ##
1482 { 'struct' : 'DisplaySDL',
1483 'data' : { '*grab-mod' : 'HotKeyMod' } }
1484
1485 ##
1486 # @DisplayType:
1487 #
1488 # Display (user interface) type.
1489 #
1490 # @default: The default user interface, selecting from the first
1491 # available of gtk, sdl, cocoa, and vnc.
1492 #
1493 # @none: No user interface or video output display. The guest will
1494 # still see an emulated graphics card, but its output will not be
1495 # displayed to the QEMU user.
1496 #
1497 # @gtk: The GTK user interface.
1498 #
1499 # @sdl: The SDL user interface.
1500 #
1501 # @egl-headless: No user interface, offload GL operations to a local
1502 # DRI device. Graphical display need to be paired with VNC or
1503 # Spice. (Since 3.1)
1504 #
1505 # @curses: Display video output via curses. For graphics device
1506 # models which support a text mode, QEMU can display this output
1507 # using a curses/ncurses interface. Nothing is displayed when the
1508 # graphics device is in graphical mode or if the graphics device
1509 # does not support a text mode. Generally only the VGA device
1510 # models support text mode.
1511 #
1512 # @cocoa: The Cocoa user interface.
1513 #
1514 # @spice-app: Set up a Spice server and run the default associated
1515 # application to connect to it. The server will redirect the
1516 # serial console and QEMU monitors. (Since 4.0)
1517 #
1518 # @dbus: Start a D-Bus service for the display. (Since 7.0)
1519 #
1520 # Since: 2.12
1521 ##
1522 { 'enum' : 'DisplayType',
1523 'data' : [
1524 { 'name': 'default' },
1525 { 'name': 'none' },
1526 { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1527 { 'name': 'sdl', 'if': 'CONFIG_SDL' },
1528 { 'name': 'egl-headless', 'if': 'CONFIG_OPENGL' },
1529 { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1530 { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
1531 { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1532 { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1533 ]
1534 }
1535
1536 ##
1537 # @DisplayOptions:
1538 #
1539 # Display (user interface) options.
1540 #
1541 # @type: Which `DisplayType` QEMU should use.
1542 #
1543 # @full-screen: Start user interface in fullscreen mode
1544 # (default: off).
1545 #
1546 # @window-close: Allow to quit QEMU with window close button
1547 # (default: on).
1548 #
1549 # @show-cursor: Force showing the mouse cursor (default: off).
1550 # (since: 5.0)
1551 #
1552 # @gl: Enable OpenGL support (default: off).
1553 #
1554 # Since: 2.12
1555 ##
1556 { 'union' : 'DisplayOptions',
1557 'base' : { 'type' : 'DisplayType',
1558 '*full-screen' : 'bool',
1559 '*window-close' : 'bool',
1560 '*show-cursor' : 'bool',
1561 '*gl' : 'DisplayGLMode' },
1562 'discriminator' : 'type',
1563 'data' : {
1564 'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
1565 'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
1566 'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
1567 'egl-headless': { 'type': 'DisplayEGLHeadless',
1568 'if': 'CONFIG_OPENGL' },
1569 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' },
1570 'sdl': { 'type': 'DisplaySDL', 'if': 'CONFIG_SDL' }
1571 }
1572 }
1573
1574 ##
1575 # @query-display-options:
1576 #
1577 # Return information about display configuration
1578 #
1579 # Since: 3.1
1580 ##
1581 { 'command': 'query-display-options',
1582 'returns': 'DisplayOptions' }
1583
1584 ##
1585 # @DisplayReloadType:
1586 #
1587 # Available DisplayReload types.
1588 #
1589 # @vnc: VNC display
1590 #
1591 # Since: 6.0
1592 ##
1593 { 'enum': 'DisplayReloadType',
1594 'data': ['vnc'] }
1595
1596 ##
1597 # @DisplayReloadOptionsVNC:
1598 #
1599 # Specify the VNC reload options.
1600 #
1601 # @tls-certs: reload tls certs or not.
1602 #
1603 # Since: 6.0
1604 ##
1605 { 'struct': 'DisplayReloadOptionsVNC',
1606 'data': { '*tls-certs': 'bool' } }
1607
1608 ##
1609 # @DisplayReloadOptions:
1610 #
1611 # Options of the display configuration reload.
1612 #
1613 # @type: Specify the display type.
1614 #
1615 # Since: 6.0
1616 ##
1617 { 'union': 'DisplayReloadOptions',
1618 'base': {'type': 'DisplayReloadType'},
1619 'discriminator': 'type',
1620 'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1621
1622 ##
1623 # @display-reload:
1624 #
1625 # Reload display configuration.
1626 #
1627 # Since: 6.0
1628 #
1629 # .. qmp-example::
1630 #
1631 # -> { "execute": "display-reload",
1632 # "arguments": { "type": "vnc", "tls-certs": true } }
1633 # <- { "return": {} }
1634 ##
1635 { 'command': 'display-reload',
1636 'data': 'DisplayReloadOptions',
1637 'boxed' : true }
1638
1639 ##
1640 # @DisplayUpdateType:
1641 #
1642 # Available DisplayUpdate types.
1643 #
1644 # @vnc: VNC display
1645 #
1646 # Since: 7.1
1647 ##
1648 { 'enum': 'DisplayUpdateType',
1649 'data': ['vnc'] }
1650
1651 ##
1652 # @DisplayUpdateOptionsVNC:
1653 #
1654 # Specify the VNC reload options.
1655 #
1656 # @addresses: If specified, change set of addresses to listen for
1657 # connections. Addresses configured for websockets are not
1658 # touched.
1659 #
1660 # Since: 7.1
1661 ##
1662 { 'struct': 'DisplayUpdateOptionsVNC',
1663 'data': { '*addresses': ['SocketAddress'] } }
1664
1665 ##
1666 # @DisplayUpdateOptions:
1667 #
1668 # Options of the display configuration reload.
1669 #
1670 # @type: Specify the display type.
1671 #
1672 # Since: 7.1
1673 ##
1674 { 'union': 'DisplayUpdateOptions',
1675 'base': {'type': 'DisplayUpdateType'},
1676 'discriminator': 'type',
1677 'data': { 'vnc': 'DisplayUpdateOptionsVNC' } }
1678
1679 ##
1680 # @display-update:
1681 #
1682 # Update display configuration.
1683 #
1684 # Since: 7.1
1685 #
1686 # .. qmp-example::
1687 #
1688 # -> { "execute": "display-update",
1689 # "arguments": { "type": "vnc", "addresses":
1690 # [ { "type": "inet", "host": "0.0.0.0",
1691 # "port": "5901" } ] } }
1692 # <- { "return": {} }
1693 ##
1694 { 'command': 'display-update',
1695 'data': 'DisplayUpdateOptions',
1696 'boxed' : true }
1697
1698 ##
1699 # @client_migrate_info:
1700 #
1701 # Set migration information for remote display. This makes the server
1702 # ask the client to automatically reconnect using the new parameters
1703 # once migration finished successfully. Only implemented for SPICE.
1704 #
1705 # @protocol: must be "spice"
1706 #
1707 # @hostname: migration target hostname
1708 #
1709 # @port: spice tcp port for plaintext channels
1710 #
1711 # @tls-port: spice tcp port for tls-secured channels
1712 #
1713 # @cert-subject: server certificate subject
1714 #
1715 # Since: 0.14
1716 #
1717 # .. qmp-example::
1718 #
1719 # -> { "execute": "client_migrate_info",
1720 # "arguments": { "protocol": "spice",
1721 # "hostname": "virt42.lab.kraxel.org",
1722 # "port": 1234 } }
1723 # <- { "return": {} }
1724 ##
1725 { 'command': 'client_migrate_info',
1726 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1727 '*tls-port': 'int', '*cert-subject': 'str' } }