Age | Commit message (Collapse) | Author | |
---|---|---|---|
2013-07-26 | qapi: Anonymous unions | Kevin Wolf | |
The discriminator for anonymous unions is the data type. This allows to have a union type that allows both of these: { 'file': 'my_existing_block_device_id' } { 'file': { 'filename': '/tmp/mydisk.qcow2', 'read-only': true } } Unions like this are specified in the schema with an empty dict as discriminator. For this example you could take: { 'union': 'BlockRef', 'discriminator': {}, 'data': { 'definition': 'BlockOptions', 'reference': 'str' } } { 'type': 'ExampleObject', 'data: { 'file': 'BlockRef' } } Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> | |||
2013-07-26 | qapi: Add visitor for implicit structs | Kevin Wolf | |
These can be used when an embedded struct is parsed and members not belonging to the struct may be present in the input (e.g. parsing a flat namespace QMP union, where fields from both the base and one of the alternative types are mixed in the JSON object) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> | |||
2012-12-19 | qapi: move include files to include/qobject/ | Paolo Bonzini | |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |