summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-02-25 23:07:34 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2012-03-14 15:30:39 -0500
commit418ba9e5d6849ef2e8512d8853628ce4bf37937a (patch)
tree02ee87f1782cd7d38e96d6a8520eee7884d5df6f /include
parentac4510337d1e461d4d56889db9691c49d3597cdb (diff)
qom: Introduce object_class_get_list()
This function allows to obtain a singly-linked list of classes, which can be sorted by the caller. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/object.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/qemu/object.h b/include/qemu/object.h
index ec2d2943c2..e8fc1268b3 100644
--- a/include/qemu/object.h
+++ b/include/qemu/object.h
@@ -560,6 +560,17 @@ ObjectClass *object_class_by_name(const char *typename);
void object_class_foreach(void (*fn)(ObjectClass *klass, void *opaque),
const char *implements_type, bool include_abstract,
void *opaque);
+
+/**
+ * object_class_get_list:
+ * @implements_type: The type to filter for, including its derivatives.
+ * @include_abstract: Whether to include abstract classes.
+ *
+ * Returns: A singly-linked list of the classes in reverse hashtable order.
+ */
+GSList *object_class_get_list(const char *implements_type,
+ bool include_abstract);
+
/**
* object_ref:
* @obj: the object