aboutsummaryrefslogtreecommitdiff
path: root/docs/devel
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-10-27 09:42:40 -0700
committerRichard Henderson <richard.henderson@linaro.org>2021-10-27 09:42:40 -0700
commit5c49c6c241e524b6ba7768de07cab6f2056feb90 (patch)
tree7b55c4687b9ba2f2c426b106772c14e82761db5a /docs/devel
parent931ce30859176f0f7daac6bac255dae5eb21284e (diff)
parentaa2370444b62f8f9a809c024d0c41cb40658a5c3 (diff)
downloadqemu-5c49c6c241e524b6ba7768de07cab6f2056feb90.zip
qemu-5c49c6c241e524b6ba7768de07cab6f2056feb90.tar.gz
qemu-5c49c6c241e524b6ba7768de07cab6f2056feb90.tar.bz2
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-10-27' into staging
QAPI patches patches for 2021-10-27 # gpg: Signature made Wed 27 Oct 2021 08:21:54 AM PDT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] * remotes/armbru/tags/pull-qapi-2021-10-27: qapi: Implement deprecated-input={reject,crash} for enum values qapi: Move compat policy from QObject to generic visitor qapi: Add feature flags to enum members qapi: Enable enum member introspection to show more than name qapi: Improve input_type_enum()'s error message Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'docs/devel')
-rw-r--r--docs/devel/qapi-code-gen.rst29
1 files changed, 21 insertions, 8 deletions
diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
index b2569de..4071c90 100644
--- a/docs/devel/qapi-code-gen.rst
+++ b/docs/devel/qapi-code-gen.rst
@@ -200,7 +200,9 @@ Syntax::
'*if': COND,
'*features': FEATURES }
ENUM-VALUE = STRING
- | { 'name': STRING, '*if': COND }
+ | { 'name': STRING,
+ '*if': COND,
+ '*features': FEATURES }
Member 'enum' names the enum type.
@@ -706,8 +708,10 @@ QEMU shows a certain behaviour.
Special features
~~~~~~~~~~~~~~~~
-Feature "deprecated" marks a command, event, or struct member as
-deprecated. It is not supported elsewhere so far.
+Feature "deprecated" marks a command, event, enum value, or struct
+member as deprecated. It is not supported elsewhere so far.
+Interfaces so marked may be withdrawn in future releases in accordance
+with QEMU's deprecation policy.
Naming rules and reserved names
@@ -1157,7 +1161,8 @@ and "variants".
"members" is a JSON array describing the object's common members, if
any. Each element is a JSON object with members "name" (the member's
-name), "type" (the name of its type), and optionally "default". The
+name), "type" (the name of its type), "features" (a JSON array of
+feature strings), and "default". The latter two are optional. The
member is optional if "default" is present. Currently, "default" can
only have value null. Other values are reserved for future
extensions. The "members" array is in no particular order; clients
@@ -1231,14 +1236,22 @@ Example: the SchemaInfo for ['str'] ::
"element-type": "str" }
The SchemaInfo for an enumeration type has meta-type "enum" and
-variant member "values". The values are listed in no particular
-order; clients must search the entire enum when learning whether a
-particular value is supported.
+variant member "members".
+
+"members" is a JSON array describing the enumeration values. Each
+element is a JSON object with member "name" (the member's name), and
+optionally "features" (a JSON array of feature strings). The
+"members" array is in no particular order; clients must search the
+entire array when learning whether a particular value is supported.
Example: the SchemaInfo for MyEnum from section `Enumeration types`_ ::
{ "name": "MyEnum", "meta-type": "enum",
- "values": [ "value1", "value2", "value3" ] }
+ "members": [
+ { "name": "value1" },
+ { "name": "value2" },
+ { "name": "value3" }
+ ] }
The SchemaInfo for a built-in type has the same name as the type in
the QAPI schema (see section `Built-in Types`_), with one exception