qemu/include/qom/qom-qobject.h
Markus Armbruster 6fd5bef10b qom: Make functions taking Error ** return bool, not void
See recent commit "error: Document Error API usage rules" for
rationale.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200707160613.848843-28-armbru@redhat.com>
2020-07-10 15:18:08 +02:00

43 lines
1.2 KiB
C

/*
* QEMU Object Model - QObject wrappers
*
* Copyright (C) 2012 Red Hat, Inc.
*
* Author: Paolo Bonzini <pbonzini@redhat.com>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*
*/
#ifndef QEMU_QOM_QOBJECT_H
#define QEMU_QOM_QOBJECT_H
/*
* object_property_get_qobject:
* @obj: the object
* @name: the name of the property
* @errp: returns an error if this function fails
*
* Returns: the value of the property, converted to QObject, or NULL if
* an error occurs.
*/
struct QObject *object_property_get_qobject(Object *obj, const char *name,
struct Error **errp);
/**
* object_property_set_qobject:
* @obj: the object
* @name: the name of the property
* @value: The value that will be written to the property.
* @errp: returns an error if this function fails
*
* Writes a property to a object.
*
* Returns: %true on success, %false on failure.
*/
bool object_property_set_qobject(Object *obj,
const char *name, struct QObject *value,
struct Error **errp);
#endif