xref: /openbmc/qemu/include/qom/qom-qobject.h (revision 05caa062)
1 /*
2  * QEMU Object Model - QObject wrappers
3  *
4  * Copyright (C) 2012 Red Hat, Inc.
5  *
6  * Author: Paolo Bonzini <pbonzini@redhat.com>
7  *
8  * This work is licensed under the terms of the GNU GPL, version 2 or later.
9  * See the COPYING file in the top-level directory.
10  *
11  */
12 
13 #ifndef QEMU_QOM_QOBJECT_H
14 #define QEMU_QOM_QOBJECT_H
15 
16 /*
17  * object_property_get_qobject:
18  * @obj: the object
19  * @name: the name of the property
20  * @errp: returns an error if this function fails
21  *
22  * Returns: the value of the property, converted to QObject, or NULL if
23  * an error occurs.
24  */
25 struct QObject *object_property_get_qobject(Object *obj, const char *name,
26                                             struct Error **errp);
27 
28 /**
29  * object_property_set_qobject:
30  * @obj: the object
31  * @name: the name of the property
32  * @value: The value that will be written to the property.
33  * @errp: returns an error if this function fails
34  *
35  * Writes a property to a object.
36  *
37  * Returns: %true on success, %false on failure.
38  */
39 bool object_property_set_qobject(Object *obj,
40                                  const char *name, struct QObject *value,
41                                  struct Error **errp);
42 
43 #endif
44