17b1b5d19SPaolo Bonzini /* 27b1b5d19SPaolo Bonzini * QBool Module 37b1b5d19SPaolo Bonzini * 47b1b5d19SPaolo Bonzini * Copyright IBM, Corp. 2009 57b1b5d19SPaolo Bonzini * 67b1b5d19SPaolo Bonzini * Authors: 77b1b5d19SPaolo Bonzini * Anthony Liguori <aliguori@us.ibm.com> 87b1b5d19SPaolo Bonzini * 97b1b5d19SPaolo Bonzini * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. 107b1b5d19SPaolo Bonzini * See the COPYING.LIB file in the top-level directory. 117b1b5d19SPaolo Bonzini * 127b1b5d19SPaolo Bonzini */ 137b1b5d19SPaolo Bonzini 147b1b5d19SPaolo Bonzini #ifndef QBOOL_H 157b1b5d19SPaolo Bonzini #define QBOOL_H 167b1b5d19SPaolo Bonzini 177b1b5d19SPaolo Bonzini #include "qapi/qmp/qobject.h" 187b1b5d19SPaolo Bonzini 199f5c734dSMarkus Armbruster struct QBool { 203d3eacaeSMarc-André Lureau struct QObjectBase_ base; 21fc48ffc3SEric Blake bool value; 229f5c734dSMarkus Armbruster }; 237b1b5d19SPaolo Bonzini 24*d709bbf3SMarc-André Lureau void qbool_unref(QBool *q); 25*d709bbf3SMarc-André Lureau 26*d709bbf3SMarc-André Lureau G_DEFINE_AUTOPTR_CLEANUP_FUNC(QBool, qbool_unref) 27*d709bbf3SMarc-André Lureau 28fc48ffc3SEric Blake QBool *qbool_from_bool(bool value); 29fc48ffc3SEric Blake bool qbool_get_bool(const QBool *qb); 307b1b5d19SPaolo Bonzini 317b1b5d19SPaolo Bonzini #endif /* QBOOL_H */ 32