aboutsummaryrefslogtreecommitdiff
path: root/include/qom
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-07 20:36:04 +0400
committerMarkus Armbruster <armbru@redhat.com>2017-06-20 14:31:32 +0200
commit3152779cd63ba41331ef41659406f65b03e7911a (patch)
tree9b8ff61b1c827150d82ed7b5f6960d0c1c48c9a0 /include/qom
parent5923f85fb82df7c8c60a89458a5ae856045e5ab1 (diff)
downloadqemu-3152779cd63ba41331ef41659406f65b03e7911a.zip
qemu-3152779cd63ba41331ef41659406f65b03e7911a.tar.gz
qemu-3152779cd63ba41331ef41659406f65b03e7911a.tar.bz2
object: add uint property setter/getter
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20170607163635.17635-13-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/object.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index cd0f412..abaeb8c 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -1094,6 +1094,29 @@ int64_t object_property_get_int(Object *obj, const char *name,
Error **errp);
/**
+ * object_property_set_uint:
+ * @value: the value to be written to the property
+ * @name: the name of the property
+ * @errp: returns an error if this function fails
+ *
+ * Writes an unsigned integer value to a property.
+ */
+void object_property_set_uint(Object *obj, uint64_t value,
+ const char *name, Error **errp);
+
+/**
+ * object_property_get_uint:
+ * @obj: the object
+ * @name: the name of the property
+ * @errp: returns an error if this function fails
+ *
+ * Returns: the value of the property, converted to an unsigned integer, or 0
+ * an error occurs (including when the property value is not an integer).
+ */
+uint64_t object_property_get_uint(Object *obj, const char *name,
+ Error **errp);
+
+/**
* object_property_get_enum:
* @obj: the object
* @name: the name of the property