diff options
author | Marc-André Lureau | 2020-01-10 16:30:21 +0100 |
---|---|---|
committer | Paolo Bonzini | 2020-01-24 20:59:13 +0100 |
commit | a3a162113e95ab19ad52c503c157287ca2570c07 (patch) | |
tree | de340fab37aaadc501d013b6589c54276410ee18 /include/qom | |
parent | object: add class property initializer (diff) | |
download | qemu-a3a162113e95ab19ad52c503c157287ca2570c07.tar.gz qemu-a3a162113e95ab19ad52c503c157287ca2570c07.tar.xz qemu-a3a162113e95ab19ad52c503c157287ca2570c07.zip |
object: make object_class_property_add* return property
This will help calling other ObjectProperty associated functions
easily after.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200110153039.1379601-9-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r-- | include/qom/object.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/qom/object.h b/include/qom/object.h index 29f47d3b35..afe658c969 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -1539,7 +1539,8 @@ void object_property_add_str(Object *obj, const char *name, void (*set)(Object *, const char *, Error **), Error **errp); -void object_class_property_add_str(ObjectClass *klass, const char *name, +ObjectProperty *object_class_property_add_str(ObjectClass *klass, + const char *name, char *(*get)(Object *, Error **), void (*set)(Object *, const char *, Error **), @@ -1561,7 +1562,8 @@ void object_property_add_bool(Object *obj, const char *name, void (*set)(Object *, bool, Error **), Error **errp); -void object_class_property_add_bool(ObjectClass *klass, const char *name, +ObjectProperty *object_class_property_add_bool(ObjectClass *klass, + const char *name, bool (*get)(Object *, Error **), void (*set)(Object *, bool, Error **), Error **errp); @@ -1585,7 +1587,8 @@ void object_property_add_enum(Object *obj, const char *name, void (*set)(Object *, int, Error **), Error **errp); -void object_class_property_add_enum(ObjectClass *klass, const char *name, +ObjectProperty *object_class_property_add_enum(ObjectClass *klass, + const char *name, const char *typename, const QEnumLookup *lookup, int (*get)(Object *, Error **), @@ -1606,7 +1609,8 @@ void object_property_add_tm(Object *obj, const char *name, void (*get)(Object *, struct tm *, Error **), Error **errp); -void object_class_property_add_tm(ObjectClass *klass, const char *name, +ObjectProperty *object_class_property_add_tm(ObjectClass *klass, + const char *name, void (*get)(Object *, struct tm *, Error **), Error **errp); @@ -1622,7 +1626,8 @@ void object_class_property_add_tm(ObjectClass *klass, const char *name, */ void object_property_add_uint8_ptr(Object *obj, const char *name, const uint8_t *v, Error **errp); -void object_class_property_add_uint8_ptr(ObjectClass *klass, const char *name, +ObjectProperty *object_class_property_add_uint8_ptr(ObjectClass *klass, + const char *name, const uint8_t *v, Error **errp); /** @@ -1637,7 +1642,8 @@ void object_class_property_add_uint8_ptr(ObjectClass *klass, const char *name, */ void object_property_add_uint16_ptr(Object *obj, const char *name, const uint16_t *v, Error **errp); -void object_class_property_add_uint16_ptr(ObjectClass *klass, const char *name, +ObjectProperty *object_class_property_add_uint16_ptr(ObjectClass *klass, + const char *name, const uint16_t *v, Error **errp); /** @@ -1652,7 +1658,8 @@ void object_class_property_add_uint16_ptr(ObjectClass *klass, const char *name, */ void object_property_add_uint32_ptr(Object *obj, const char *name, const uint32_t *v, Error **errp); -void object_class_property_add_uint32_ptr(ObjectClass *klass, const char *name, +ObjectProperty *object_class_property_add_uint32_ptr(ObjectClass *klass, + const char *name, const uint32_t *v, Error **errp); /** @@ -1667,7 +1674,8 @@ void object_class_property_add_uint32_ptr(ObjectClass *klass, const char *name, */ void object_property_add_uint64_ptr(Object *obj, const char *name, const uint64_t *v, Error **errp); -void object_class_property_add_uint64_ptr(ObjectClass *klass, const char *name, +ObjectProperty *object_class_property_add_uint64_ptr(ObjectClass *klass, + const char *name, const uint64_t *v, Error **errp); /** |