aboutsummaryrefslogtreecommitdiff
path: root/include/qom/object.h
diff options
context:
space:
mode:
authorHu Tao <hutao@cn.fujitsu.com>2014-05-14 17:43:33 +0800
committerMichael S. Tsirkin <mst@redhat.com>2014-06-19 18:44:19 +0300
commit1f21772db0b14049b1b4bfef1f039b40827c676f (patch)
treecb541c9259741222117f2830ef300922e720b511 /include/qom/object.h
parent7f8f9ef1dac25e76706ee0454bb6cfa097489170 (diff)
qom: introduce object_property_get_enum and object_property_get_uint16List
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/qom/object.h')
-rw-r--r--include/qom/object.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/qom/object.h b/include/qom/object.h
index a641dcde10..b882ccc85f 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -917,6 +917,34 @@ int64_t object_property_get_int(Object *obj, const char *name,
Error **errp);
/**
+ * object_property_get_enum:
+ * @obj: the object
+ * @name: the name of the property
+ * @strings: strings corresponding to enums
+ * @errp: returns an error if this function fails
+ *
+ * Returns: the value of the property, converted to an integer, or
+ * undefined if an error occurs (including when the property value is not
+ * an enum).
+ */
+int object_property_get_enum(Object *obj, const char *name,
+ const char *strings[], Error **errp);
+
+/**
+ * object_property_get_uint16List:
+ * @obj: the object
+ * @name: the name of the property
+ * @list: the returned int list
+ * @errp: returns an error if this function fails
+ *
+ * Returns: the value of the property, converted to integers, or
+ * undefined if an error occurs (including when the property value is not
+ * an list of integers).
+ */
+void object_property_get_uint16List(Object *obj, const char *name,
+ uint16List **list, Error **errp);
+
+/**
* object_property_set:
* @obj: the object
* @v: the visitor that will be used to write the property value. This should