mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
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>
This commit is contained in:
parent
ac4510337d
commit
418ba9e5d6
2 changed files with 28 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue