Michael Roth | c40cc0a | 2011-07-19 14:50:33 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Input Visitor |
| 3 | * |
| 4 | * Copyright IBM, Corp. 2011 |
| 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 | |
Daniel P. Berrange | b3db211 | 2016-09-30 15:45:27 +0100 | [diff] [blame] | 14 | #ifndef QOBJECT_INPUT_VISITOR_H |
| 15 | #define QOBJECT_INPUT_VISITOR_H |
Michael Roth | c40cc0a | 2011-07-19 14:50:33 -0500 | [diff] [blame] | 16 | |
Paolo Bonzini | 7b1b5d1 | 2012-12-17 18:19:43 +0100 | [diff] [blame] | 17 | #include "qapi/visitor.h" |
| 18 | #include "qapi/qmp/qobject.h" |
Michael Roth | c40cc0a | 2011-07-19 14:50:33 -0500 | [diff] [blame] | 19 | |
Daniel P. Berrange | 09e6836 | 2016-09-30 15:45:27 +0100 | [diff] [blame] | 20 | typedef struct QObjectInputVisitor QObjectInputVisitor; |
Michael Roth | c40cc0a | 2011-07-19 14:50:33 -0500 | [diff] [blame] | 21 | |
Eric Blake | fc471c1 | 2016-04-28 15:45:13 -0600 | [diff] [blame] | 22 | /* |
Daniel P. Berrange | b3db211 | 2016-09-30 15:45:27 +0100 | [diff] [blame] | 23 | * Return a new input visitor that converts a QObject to a QAPI object. |
Eric Blake | fc471c1 | 2016-04-28 15:45:13 -0600 | [diff] [blame] | 24 | * |
| 25 | * Set @strict to reject a parse that doesn't consume all keys of a |
| 26 | * dictionary; otherwise excess input is ignored. |
| 27 | */ |
Daniel P. Berrange | 09e6836 | 2016-09-30 15:45:27 +0100 | [diff] [blame] | 28 | Visitor *qobject_input_visitor_new(QObject *obj, bool strict); |
Michael Roth | c40cc0a | 2011-07-19 14:50:33 -0500 | [diff] [blame] | 29 | |
| 30 | #endif |