Add a const pointer to QAPITypeInfo in ObjectProperty. NULL for now, but future patches will add means to make it non-null. The QAPITypeInfo will then be used by QOM introspection to tie the property to a QAPI type.
Signed-off-by: Markus Armbruster <[email protected]> Signed-off-by: Marc-André Lureau <[email protected]> --- include/qom/object.h | 2 ++ qom/object.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index 90c1a34e49aa..e9b380462ded 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -15,6 +15,7 @@ #define QEMU_OBJECT_H #include "qapi/qapi-builtin-types.h" +#include "qapi/qapi-type-info.h" #include "qemu/module.h" struct TypeImpl; @@ -91,6 +92,7 @@ struct ObjectProperty char *name; char *type; char *description; + const QAPITypeInfo *qapi_type; ObjectPropertyAccessor *get; ObjectPropertyAccessor *set; ObjectPropertyResolve *resolve; diff --git a/qom/object.c b/qom/object.c index 96498f3d001c..c34b47312f29 100644 --- a/qom/object.c +++ b/qom/object.c @@ -3171,6 +3171,7 @@ object_property_add_alias(Object *obj, const char *name, property_release_alias, prop); op->resolve = property_resolve_alias; + op->qapi_type = target_prop->qapi_type; if (target_prop->defval) { op->defval = qobject_ref(target_prop->defval); } -- 2.56.0.116.g6de20f6092dc
