Anthony Liguori | f7e6b19 | 2009-11-11 10:37:39 -0600 | [diff] [blame] | 1 | /* |
| 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 Bonzini | 7b1b5d1 | 2012-12-17 18:19:43 +0100 | [diff] [blame] | 17 | #include "qapi/qmp/qobject.h" |
Anthony Liguori | f7e6b19 | 2009-11-11 10:37:39 -0600 | [diff] [blame] | 18 | |
Markus Armbruster | 9f5c734 | 2018-02-01 12:18:34 +0100 | [diff] [blame] | 19 | struct QBool { |
Marc-André Lureau | 3d3eaca | 2018-04-19 17:01:42 +0200 | [diff] [blame] | 20 | struct QObjectBase_ base; |
Eric Blake | fc48ffc | 2015-05-15 16:24:59 -0600 | [diff] [blame] | 21 | bool value; |
Markus Armbruster | 9f5c734 | 2018-02-01 12:18:34 +0100 | [diff] [blame] | 22 | }; |
Anthony Liguori | f7e6b19 | 2009-11-11 10:37:39 -0600 | [diff] [blame] | 23 | |
Marc-André Lureau | d709bbf | 2022-03-23 19:57:20 +0400 | [diff] [blame] | 24 | void qbool_unref(QBool *q); |
| 25 | |
| 26 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(QBool, qbool_unref) |
| 27 | |
Eric Blake | fc48ffc | 2015-05-15 16:24:59 -0600 | [diff] [blame] | 28 | QBool *qbool_from_bool(bool value); |
| 29 | bool qbool_get_bool(const QBool *qb); |
Anthony Liguori | f7e6b19 | 2009-11-11 10:37:39 -0600 | [diff] [blame] | 30 | |
| 31 | #endif /* QBOOL_H */ |