aboutsummaryrefslogtreecommitdiff
path: root/include/qom
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2020-01-10 19:30:37 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-01-24 20:59:16 +0100
commit4df8161673dbaa1938652313c075c898a476ffe5 (patch)
tree807051011ffbb656e5fccd8f4abf454c88a6de47 /include/qom
parentc1f472ea6584954d98baec3342d13fd24dbc3b88 (diff)
downloadqemu-4df8161673dbaa1938652313c075c898a476ffe5.zip
qemu-4df8161673dbaa1938652313c075c898a476ffe5.tar.gz
qemu-4df8161673dbaa1938652313c075c898a476ffe5.tar.bz2
qom: introduce object_property_help()
Let's factor out the code to format a help string for a property. We are going to reuse it in qdev next, which will bring some consistency. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200110153039.1379601-25-marcandre.lureau@redhat.com> [Adjust for removal of object_property_get_default, move default after description. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/object.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index 18660fd..2954649 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -1837,6 +1837,19 @@ Object *container_get(Object *root, const char *path);
*/
size_t object_type_get_instance_size(const char *typename);
+/**
+ * object_property_help:
+ * @name: the name of the property
+ * @type: the type of the property
+ * @defval: the default value
+ * @description: description of the property
+ *
+ * Returns: a user-friendly formatted string describing the property
+ * for help purposes.
+ */
+char *object_property_help(const char *name, const char *type,
+ QObject *defval, const char *description);
+
G_DEFINE_AUTOPTR_CLEANUP_FUNC(Object, object_unref)
#endif