[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/6] object: add object_property_add_bool
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] object: add object_property_add_bool |
Date: |
Tue, 23 Oct 2012 13:30:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Anthony Liguori <address@hidden> writes:
> Signed-off-by: Anthony Liguori <address@hidden>
> ---
> include/qemu/object.h | 17 ++++++++++++++
> qom/object.c | 58
> +++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 75 insertions(+), 0 deletions(-)
>
> diff --git a/include/qemu/object.h b/include/qemu/object.h
> index cc75fee..f4dc2ea 100644
> --- a/include/qemu/object.h
> +++ b/include/qemu/object.h
> @@ -947,6 +947,23 @@ void object_property_add_str(Object *obj, const char
> *name,
> struct Error **errp);
>
> /**
> + * object_property_add_bool:
> + * @obj: the object to add a property to
> + * @name: the name of the property
> + * @get: the getter or NULL if the property is write-only. This function
> must
> + * return a string to be freed by g_free().
Pasto. It returns a bool.
> + * @set: the setter or NULL if the property is read-only
> + * @errp: if an error occurs, a pointer to an area to store the error
> + *
> + * Add a bool property using getters/setters. This function will add a
> + * property of type 'bool'.
> + */
> +void object_property_add_bool(Object *obj, const char *name,
> + bool (*get)(Object *, struct Error **),
> + void (*set)(Object *, bool, struct Error **),
> + struct Error **errp);
> +
> +/**
> * object_child_foreach:
> * @obj: the object whose children will be navigated
> * @fn: the iterator function to be called
[...]
- [Qemu-devel] [RFC PATCH 0/6] chardev: convert to QOM, Anthony Liguori, 2012/10/15
- [Qemu-devel] [PATCH 1/6] object: add object_property_add_bool, Anthony Liguori, 2012/10/15
- [Qemu-devel] [PATCH 5/6] chardev: switch the easy backends to realize, Anthony Liguori, 2012/10/15
- [Qemu-devel] [PATCH 3/6] chardev: create new QOM types for each sub chardev type, Anthony Liguori, 2012/10/15
- [Qemu-devel] [PATCH 6/6] chardev: convert file backend to realize, Anthony Liguori, 2012/10/15
- [Qemu-devel] [PATCH 2/6] chardev: convert to QOM (shallow pass), Anthony Liguori, 2012/10/15
- [Qemu-devel] [PATCH 4/6] chardev: implement realize, Anthony Liguori, 2012/10/15
- Re: [Qemu-devel] [RFC PATCH 0/6] chardev: convert to QOM, Gerd Hoffmann, 2012/10/17