diff options
author | Paolo Bonzini | 2020-11-02 17:08:07 +0100 |
---|---|---|
committer | Paolo Bonzini | 2021-07-06 08:33:51 +0200 |
commit | 3bb6944585aa6f28b21265c88d86264e8e9f7e53 (patch) | |
tree | 881ef833be7ea3003884e2f076a79f5c99ff32ae /include/qom | |
parent | configure: convert compiler tests to meson, part 6 (diff) | |
download | qemu-3bb6944585aa6f28b21265c88d86264e8e9f7e53.tar.gz qemu-3bb6944585aa6f28b21265c88d86264e8e9f7e53.tar.xz qemu-3bb6944585aa6f28b21265c88d86264e8e9f7e53.zip |
qom: export more functions for use with non-UserCreatable objects
Machines and accelerators are not user-creatable but they are going
to share similar command-line parsing machinery. Export functions
that will be used with -machine and -accel in softmmu/vl.c.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r-- | include/qom/object.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/qom/object.h b/include/qom/object.h index 6721cd312e..faae0d841f 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -862,6 +862,29 @@ static void do_qemu_init_ ## type_array(void) \ type_init(do_qemu_init_ ## type_array) /** + * type_print_class_properties: + * @type: a QOM class name + * + * Print the object's class properties to stdout or the monitor. + * Return whether an object was found. + */ +bool type_print_class_properties(const char *type); + +/** + * object_set_properties_from_keyval: + * @obj: a QOM object + * @qdict: a dictionary with the properties to be set + * @from_json: true if leaf values of @qdict are typed, false if they + * are strings + * @errp: pointer to error object + * + * For each key in the dictionary, parse the value string if needed, + * then set the corresponding property in @obj. + */ +void object_set_properties_from_keyval(Object *obj, const QDict *qdict, + bool from_json, Error **errp); + +/** * object_class_dynamic_cast_assert: * @klass: The #ObjectClass to attempt to cast. * @typename: The QOM typename of the class to cast to. |