summaryrefslogtreecommitdiffstats
path: root/include/qom
diff options
context:
space:
mode:
authorMarc-André Lureau2020-01-10 16:30:29 +0100
committerPaolo Bonzini2020-01-24 20:59:14 +0100
commit840ecdfbf9b401e018c43c45a909c7bbf37224e9 (patch)
treead3a9780d79c697bdb97797fbc466d12590ba138 /include/qom
parentobject: express const link with link property (diff)
downloadqemu-840ecdfbf9b401e018c43c45a909c7bbf37224e9.tar.gz
qemu-840ecdfbf9b401e018c43c45a909c7bbf37224e9.tar.xz
qemu-840ecdfbf9b401e018c43c45a909c7bbf37224e9.zip
object: add object_class_property_add_link()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-17-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/object.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index 24d6ebe675..5e2f60d4b0 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -1514,6 +1514,7 @@ typedef enum {
/* private */
OBJ_PROP_LINK_DIRECT = 0x2,
+ OBJ_PROP_LINK_CLASS = 0x4,
} ObjectPropertyLinkFlags;
/**
@@ -1562,6 +1563,14 @@ void object_property_add_link(Object *obj, const char *name,
ObjectPropertyLinkFlags flags,
Error **errp);
+ObjectProperty *object_class_property_add_link(ObjectClass *oc,
+ const char *name,
+ const char *type, ptrdiff_t offset,
+ void (*check)(const Object *obj, const char *name,
+ Object *val, Error **errp),
+ ObjectPropertyLinkFlags flags,
+ Error **errp);
+
/**
* object_property_add_str:
* @obj: the object to add a property to