aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-06-25 10:32:46 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-11-16 08:36:12 -0600
commit0e5588438d921b8686bbf455f400f727b2ff7b62 (patch)
tree118533dfecdb1f3a36dba52249892659bab10ca4 /include
parent68d98d3e42b2b291274537d1ae4092e11d321437 (diff)
object: add object_property_add_bool (v2)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - Fix whitespace (Andreas Faerber)
Diffstat (limited to 'include')
-rw-r--r--include/qemu/object.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/qemu/object.h b/include/qemu/object.h
index cc75feed66..be707f1a36 100644
--- a/include/qemu/object.h
+++ b/include/qemu/object.h
@@ -947,6 +947,22 @@ void object_property_add_str(Object *obj, const char *name,
struct Error **errp);
/**
+ * object_property_add_bool:
+ * @obj: the object to add a property to
+ * @name: the name of the property
+ * @get: the getter or NULL if the property is write-only.
+ * @set: the setter or NULL if the property is read-only
+ * @errp: if an error occurs, a pointer to an area to store the error
+ *
+ * Add a bool property using getters/setters. This function will add a
+ * property of type 'bool'.
+ */
+void object_property_add_bool(Object *obj, const char *name,
+ bool (*get)(Object *, struct Error **),
+ void (*set)(Object *, bool, struct Error **),
+ struct Error **errp);
+
+/**
* object_child_foreach:
* @obj: the object whose children will be navigated
* @fn: the iterator function to be called