blob: 0d09726939b9904ea5f4fe06f196d09f2c1b132a [file] [log] [blame]
Anthony Liguorif7e6b192009-11-11 10:37:39 -06001/*
2 * QBool Module
3 *
4 * Copyright IBM, Corp. 2009
5 *
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
8 *
9 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
10 * See the COPYING.LIB file in the top-level directory.
11 *
12 */
13
14#ifndef QBOOL_H
15#define QBOOL_H
16
Paolo Bonzini7b1b5d12012-12-17 18:19:43 +010017#include "qapi/qmp/qobject.h"
Anthony Liguorif7e6b192009-11-11 10:37:39 -060018
Markus Armbruster9f5c7342018-02-01 12:18:34 +010019struct QBool {
Marc-André Lureau3d3eaca2018-04-19 17:01:42 +020020 struct QObjectBase_ base;
Eric Blakefc48ffc2015-05-15 16:24:59 -060021 bool value;
Markus Armbruster9f5c7342018-02-01 12:18:34 +010022};
Anthony Liguorif7e6b192009-11-11 10:37:39 -060023
Marc-André Lureaud709bbf2022-03-23 19:57:20 +040024void qbool_unref(QBool *q);
25
26G_DEFINE_AUTOPTR_CLEANUP_FUNC(QBool, qbool_unref)
27
Eric Blakefc48ffc2015-05-15 16:24:59 -060028QBool *qbool_from_bool(bool value);
29bool qbool_get_bool(const QBool *qb);
Anthony Liguorif7e6b192009-11-11 10:37:39 -060030
31#endif /* QBOOL_H */