mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
7f8f9ef1da
commit
1f21772db0
2 changed files with 63 additions and 0 deletions
|
@ -916,6 +916,34 @@ void object_property_set_int(Object *obj, int64_t value,
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue