diff options
Diffstat (limited to 'include/qapi/compat-policy.h')
-rw-r--r-- | include/qapi/compat-policy.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/qapi/compat-policy.h b/include/qapi/compat-policy.h new file mode 100644 index 000000000..8b7b25c0b --- /dev/null +++ b/include/qapi/compat-policy.h @@ -0,0 +1,45 @@ +/* + * Policy for handling "funny" management interfaces + * + * Copyright (C) 2020 Red Hat, Inc. + * + * Authors: + * Markus Armbruster <armbru@redhat.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or + * later. See the COPYING file in the top-level directory. + */ + +#ifndef QAPI_COMPAT_POLICY_H +#define QAPI_COMPAT_POLICY_H + +#include "qapi/error.h" +#include "qapi/qapi-types-compat.h" + +extern CompatPolicy compat_policy; + +bool compat_policy_input_ok(unsigned special_features, + const CompatPolicy *policy, + ErrorClass error_class, + const char *kind, const char *name, + Error **errp); + +/* + * Create a QObject input visitor for @obj for use with QMP + * + * This is like qobject_input_visitor_new(), except it obeys the + * policy for handling deprecated management interfaces set with + * -compat. + */ +Visitor *qobject_input_visitor_new_qmp(QObject *obj); + +/* + * Create a QObject output visitor for @obj for use with QMP + * + * This is like qobject_output_visitor_new(), except it obeys the + * policy for handling deprecated management interfaces set with + * -compat. + */ +Visitor *qobject_output_visitor_new_qmp(QObject **result); + +#endif |