]> git.proxmox.com Git - mirror_qemu.git/blame - include/qapi/compat-policy.h
hw/char/xilinx_uartlite: Open-code xilinx_uartlite_create()
[mirror_qemu.git] / include / qapi / compat-policy.h
CommitLineData
6dd75472
MA
1/*
2 * Policy for handling "funny" management interfaces
3 *
4 * Copyright (C) 2020 Red Hat, Inc.
5 *
6 * Authors:
7 * Markus Armbruster <armbru@redhat.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2 or
10 * later. See the COPYING file in the top-level directory.
11 */
12
13#ifndef QAPI_COMPAT_POLICY_H
14#define QAPI_COMPAT_POLICY_H
15
7ce5fc63 16#include "qapi/error.h"
6dd75472
MA
17#include "qapi/qapi-types-compat.h"
18
19extern CompatPolicy compat_policy;
20
7ce5fc63
MA
21bool compat_policy_input_ok(unsigned special_features,
22 const CompatPolicy *policy,
23 ErrorClass error_class,
24 const char *kind, const char *name,
25 Error **errp);
26
db291641
MA
27/*
28 * Create a QObject input visitor for @obj for use with QMP
29 *
30 * This is like qobject_input_visitor_new(), except it obeys the
31 * policy for handling deprecated management interfaces set with
32 * -compat.
33 */
34Visitor *qobject_input_visitor_new_qmp(QObject *obj);
35
91fa93e5
MA
36/*
37 * Create a QObject output visitor for @obj for use with QMP
38 *
39 * This is like qobject_output_visitor_new(), except it obeys the
40 * policy for handling deprecated management interfaces set with
41 * -compat.
42 */
43Visitor *qobject_output_visitor_new_qmp(QObject **result);
44
6dd75472 45#endif