blob: 6eb01821ef59ee0531945214be4ae2b71d13f697 [file] [log] [blame]
Benoît Canetd34bda72014-06-05 13:45:29 +02001# -*- Mode: Python -*-
Marc-André Lureaud3a48372017-01-13 15:41:23 +01002
3##
Markus Armbrusterf5cf31c2017-08-24 21:14:08 +02004# = Common data types
Marc-André Lureaud3a48372017-01-13 15:41:23 +01005##
Benoît Canetd34bda72014-06-05 13:45:29 +02006
7##
Marc-André Lureau5072f7b2016-11-17 19:54:55 +04008# @QapiErrorClass:
Benoît Canetd34bda72014-06-05 13:45:29 +02009#
10# QEMU error classes
11#
12# @GenericError: this is used for errors that don't require a specific error
13# class. This should be the default case for most errors
14#
15# @CommandNotFound: the requested command has not been found
16#
Benoît Canetd34bda72014-06-05 13:45:29 +020017# @DeviceNotActive: a device has failed to be become active
18#
19# @DeviceNotFound: the requested device has not been found
20#
21# @KVMMissingCap: the requested operation can't be fulfilled because a
22# required KVM capability is missing
23#
24# Since: 1.2
25##
Eric Blakef22a28b2015-11-18 01:53:00 -070026{ 'enum': 'QapiErrorClass',
27 # Keep this in sync with ErrorClass in error.h
Daniel P. Berrangec01c2142017-06-23 17:24:16 +010028 'data': [ 'GenericError', 'CommandNotFound',
Benoît Canetd34bda72014-06-05 13:45:29 +020029 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
30
31##
Markus Armbruster2031c132017-08-24 21:14:06 +020032# @IoOperationType:
33#
34# An enumeration of the I/O operation types
35#
36# @read: read operation
37#
38# @write: write operation
39#
40# Since: 2.1
41##
42{ 'enum': 'IoOperationType',
43 'data': [ 'read', 'write' ] }
44
45##
Marc-André Lureau5072f7b2016-11-17 19:54:55 +040046# @OnOffAuto:
Don Slutzd1048be2014-11-21 11:18:52 -050047#
48# An enumeration of three options: on, off, and auto
49#
50# @auto: QEMU selects the value between on and off
51#
52# @on: Enabled
53#
54# @off: Disabled
55#
56# Since: 2.2
57##
58{ 'enum': 'OnOffAuto',
59 'data': [ 'auto', 'on', 'off' ] }
Matt Gingell32c18a22015-11-16 10:03:06 -080060
61##
Marc-André Lureau5072f7b2016-11-17 19:54:55 +040062# @OnOffSplit:
Matt Gingell32c18a22015-11-16 10:03:06 -080063#
64# An enumeration of three values: on, off, and split
65#
66# @on: Enabled
67#
68# @off: Disabled
69#
70# @split: Mixed
71#
72# Since: 2.6
73##
74{ 'enum': 'OnOffSplit',
75 'data': [ 'on', 'off', 'split' ] }
Markus Armbrustera2ff5a42017-08-24 21:13:56 +020076
77##
78# @String:
79#
80# A fat type wrapping 'str', to be embedded in lists.
81#
82# Since: 1.2
83##
84{ 'struct': 'String',
85 'data': {
86 'str': 'str' } }
Markus Armbruster48685a82017-08-24 21:14:01 +020087
88##
89# @StrOrNull:
90#
91# This is a string value or the explicit lack of a string (null
92# pointer in C). Intended for cases when 'optional absent' already
93# has a different meaning.
94#
95# @s: the string value
96# @n: no string value
97#
98# Since: 2.10
99##
100{ 'alternate': 'StrOrNull',
101 'data': { 's': 'str',
102 'n': 'null' } }