summaryrefslogtreecommitdiffstats
path: root/qemu/include/qapi
diff options
context:
space:
mode:
authorRajithaY <rajithax.yerrumsetty@intel.com>2017-04-25 03:31:15 -0700
committerRajitha Yerrumchetty <rajithax.yerrumsetty@intel.com>2017-05-22 06:48:08 +0000
commitbb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch)
treeca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/include/qapi
parenta14b48d18a9ed03ec191cf16b162206998a895ce (diff)
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to kvmfornfv repo and make use of the updated latest qemu for the execution of all testcase Change-Id: I1280af507a857675c7f81d30c95255635667bdd7 Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/include/qapi')
-rw-r--r--qemu/include/qapi/dealloc-visitor.h26
-rw-r--r--qemu/include/qapi/error.h302
-rw-r--r--qemu/include/qapi/opts-visitor.h37
-rw-r--r--qemu/include/qapi/qmp-event.h26
-rw-r--r--qemu/include/qapi/qmp-input-visitor.h29
-rw-r--r--qemu/include/qapi/qmp-output-visitor.h28
-rw-r--r--qemu/include/qapi/qmp/dispatch.h57
-rw-r--r--qemu/include/qapi/qmp/json-lexer.h56
-rw-r--r--qemu/include/qapi/qmp/json-parser.h23
-rw-r--r--qemu/include/qapi/qmp/json-streamer.h46
-rw-r--r--qemu/include/qapi/qmp/qbool.h29
-rw-r--r--qemu/include/qapi/qmp/qdict.h79
-rw-r--r--qemu/include/qapi/qmp/qerror.h109
-rw-r--r--qemu/include/qapi/qmp/qfloat.h29
-rw-r--r--qemu/include/qapi/qmp/qint.h28
-rw-r--r--qemu/include/qapi/qmp/qjson.h27
-rw-r--r--qemu/include/qapi/qmp/qlist.h64
-rw-r--r--qemu/include/qapi/qmp/qobject.h104
-rw-r--r--qemu/include/qapi/qmp/qstring.h36
-rw-r--r--qemu/include/qapi/qmp/types.h25
-rw-r--r--qemu/include/qapi/string-input-visitor.h25
-rw-r--r--qemu/include/qapi/string-output-visitor.h26
-rw-r--r--qemu/include/qapi/util.h17
-rw-r--r--qemu/include/qapi/visitor-impl.h68
-rw-r--r--qemu/include/qapi/visitor.h107
25 files changed, 0 insertions, 1403 deletions
diff --git a/qemu/include/qapi/dealloc-visitor.h b/qemu/include/qapi/dealloc-visitor.h
deleted file mode 100644
index cf4c36d2d..000000000
--- a/qemu/include/qapi/dealloc-visitor.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Dealloc Visitor
- *
- * Copyright IBM, Corp. 2011
- *
- * Authors:
- * Michael Roth <mdroth@linux.vnet.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QAPI_DEALLOC_VISITOR_H
-#define QAPI_DEALLOC_VISITOR_H
-
-#include "qapi/visitor.h"
-
-typedef struct QapiDeallocVisitor QapiDeallocVisitor;
-
-QapiDeallocVisitor *qapi_dealloc_visitor_new(void);
-void qapi_dealloc_visitor_cleanup(QapiDeallocVisitor *d);
-
-Visitor *qapi_dealloc_get_visitor(QapiDeallocVisitor *v);
-
-#endif
diff --git a/qemu/include/qapi/error.h b/qemu/include/qapi/error.h
deleted file mode 100644
index 11be2327c..000000000
--- a/qemu/include/qapi/error.h
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * QEMU Error Objects
- *
- * Copyright IBM, Corp. 2011
- * Copyright (C) 2011-2015 Red Hat, Inc.
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- * Markus Armbruster <armbru@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2. See
- * the COPYING.LIB file in the top-level directory.
- */
-
-/*
- * Error reporting system loosely patterned after Glib's GError.
- *
- * Create an error:
- * error_setg(&err, "situation normal, all fouled up");
- *
- * Create an error and add additional explanation:
- * error_setg(&err, "invalid quark");
- * error_append_hint(&err, "Valid quarks are up, down, strange, "
- * "charm, top, bottom.\n");
- *
- * Do *not* contract this to
- * error_setg(&err, "invalid quark\n"
- * "Valid quarks are up, down, strange, charm, top, bottom.");
- *
- * Report an error to the current monitor if we have one, else stderr:
- * error_report_err(err);
- * This frees the error object.
- *
- * Likewise, but with additional text prepended:
- * error_reportf_err(err, "Could not frobnicate '%s': ", name);
- *
- * Report an error somewhere else:
- * const char *msg = error_get_pretty(err);
- * do with msg what needs to be done...
- * error_free(err);
- * Note that this loses hints added with error_append_hint().
- *
- * Handle an error without reporting it (just for completeness):
- * error_free(err);
- *
- * Assert that an expected error occurred, but clean it up without
- * reporting it (primarily useful in testsuites):
- * error_free_or_abort(&err);
- *
- * Pass an existing error to the caller:
- * error_propagate(errp, err);
- * where Error **errp is a parameter, by convention the last one.
- *
- * Pass an existing error to the caller with the message modified:
- * error_propagate(errp, err);
- * error_prepend(errp, "Could not frobnicate '%s': ", name);
- *
- * Create a new error and pass it to the caller:
- * error_setg(errp, "situation normal, all fouled up");
- *
- * Call a function and receive an error from it:
- * Error *err = NULL;
- * foo(arg, &err);
- * if (err) {
- * handle the error...
- * }
- *
- * Call a function ignoring errors:
- * foo(arg, NULL);
- *
- * Call a function aborting on errors:
- * foo(arg, &error_abort);
- *
- * Call a function treating errors as fatal:
- * foo(arg, &error_fatal);
- *
- * Receive an error and pass it on to the caller:
- * Error *err = NULL;
- * foo(arg, &err);
- * if (err) {
- * handle the error...
- * error_propagate(errp, err);
- * }
- * where Error **errp is a parameter, by convention the last one.
- *
- * Do *not* "optimize" this to
- * foo(arg, errp);
- * if (*errp) { // WRONG!
- * handle the error...
- * }
- * because errp may be NULL!
- *
- * But when all you do with the error is pass it on, please use
- * foo(arg, errp);
- * for readability.
- *
- * Receive and accumulate multiple errors (first one wins):
- * Error *err = NULL, *local_err = NULL;
- * foo(arg, &err);
- * bar(arg, &local_err);
- * error_propagate(&err, local_err);
- * if (err) {
- * handle the error...
- * }
- *
- * Do *not* "optimize" this to
- * foo(arg, &err);
- * bar(arg, &err); // WRONG!
- * if (err) {
- * handle the error...
- * }
- * because this may pass a non-null err to bar().
- */
-
-#ifndef ERROR_H
-#define ERROR_H
-
-#include "qapi-types.h"
-
-/*
- * Overall category of an error.
- * Based on the qapi type QapiErrorClass, but reproduced here for nicer
- * enum names.
- */
-typedef enum ErrorClass {
- ERROR_CLASS_GENERIC_ERROR = QAPI_ERROR_CLASS_GENERICERROR,
- ERROR_CLASS_COMMAND_NOT_FOUND = QAPI_ERROR_CLASS_COMMANDNOTFOUND,
- ERROR_CLASS_DEVICE_ENCRYPTED = QAPI_ERROR_CLASS_DEVICEENCRYPTED,
- ERROR_CLASS_DEVICE_NOT_ACTIVE = QAPI_ERROR_CLASS_DEVICENOTACTIVE,
- ERROR_CLASS_DEVICE_NOT_FOUND = QAPI_ERROR_CLASS_DEVICENOTFOUND,
- ERROR_CLASS_KVM_MISSING_CAP = QAPI_ERROR_CLASS_KVMMISSINGCAP,
-} ErrorClass;
-
-/*
- * Get @err's human-readable error message.
- */
-const char *error_get_pretty(Error *err);
-
-/*
- * Get @err's error class.
- * Note: use of error classes other than ERROR_CLASS_GENERIC_ERROR is
- * strongly discouraged.
- */
-ErrorClass error_get_class(const Error *err);
-
-/*
- * Create a new error object and assign it to *@errp.
- * If @errp is NULL, the error is ignored. Don't bother creating one
- * then.
- * If @errp is &error_abort, print a suitable message and abort().
- * If @errp is &error_fatal, print a suitable message and exit(1).
- * If @errp is anything else, *@errp must be NULL.
- * The new error's class is ERROR_CLASS_GENERIC_ERROR, and its
- * human-readable error message is made from printf-style @fmt, ...
- * The resulting message should be a single phrase, with no newline or
- * trailing punctuation.
- * Please don't error_setg(&error_fatal, ...), use error_report() and
- * exit(), because that's more obvious.
- * Likewise, don't error_setg(&error_abort, ...), use assert().
- */
-#define error_setg(errp, fmt, ...) \
- error_setg_internal((errp), __FILE__, __LINE__, __func__, \
- (fmt), ## __VA_ARGS__)
-void error_setg_internal(Error **errp,
- const char *src, int line, const char *func,
- const char *fmt, ...)
- GCC_FMT_ATTR(5, 6);
-
-/*
- * Just like error_setg(), with @os_error info added to the message.
- * If @os_error is non-zero, ": " + strerror(os_error) is appended to
- * the human-readable error message.
- */
-#define error_setg_errno(errp, os_error, fmt, ...) \
- error_setg_errno_internal((errp), __FILE__, __LINE__, __func__, \
- (os_error), (fmt), ## __VA_ARGS__)
-void error_setg_errno_internal(Error **errp,
- const char *fname, int line, const char *func,
- int os_error, const char *fmt, ...)
- GCC_FMT_ATTR(6, 7);
-
-#ifdef _WIN32
-/*
- * Just like error_setg(), with @win32_error info added to the message.
- * If @win32_error is non-zero, ": " + g_win32_error_message(win32_err)
- * is appended to the human-readable error message.
- */
-#define error_setg_win32(errp, win32_err, fmt, ...) \
- error_setg_win32_internal((errp), __FILE__, __LINE__, __func__, \
- (win32_err), (fmt), ## __VA_ARGS__)
-void error_setg_win32_internal(Error **errp,
- const char *src, int line, const char *func,
- int win32_err, const char *fmt, ...)
- GCC_FMT_ATTR(6, 7);
-#endif
-
-/*
- * Propagate error object (if any) from @local_err to @dst_errp.
- * If @local_err is NULL, do nothing (because there's nothing to
- * propagate).
- * Else, if @dst_errp is NULL, errors are being ignored. Free the
- * error object.
- * Else, if @dst_errp is &error_abort, print a suitable message and
- * abort().
- * Else, if @dst_errp is &error_fatal, print a suitable message and
- * exit(1).
- * Else, if @dst_errp already contains an error, ignore this one: free
- * the error object.
- * Else, move the error object from @local_err to *@dst_errp.
- * On return, @local_err is invalid.
- * Please don't error_propagate(&error_fatal, ...), use
- * error_report_err() and exit(), because that's more obvious.
- */
-void error_propagate(Error **dst_errp, Error *local_err);
-
-/*
- * Prepend some text to @errp's human-readable error message.
- * The text is made by formatting @fmt, @ap like vprintf().
- */
-void error_vprepend(Error **errp, const char *fmt, va_list ap);
-
-/*
- * Prepend some text to @errp's human-readable error message.
- * The text is made by formatting @fmt, ... like printf().
- */
-void error_prepend(Error **errp, const char *fmt, ...)
- GCC_FMT_ATTR(2, 3);
-
-/*
- * Append a printf-style human-readable explanation to an existing error.
- * @errp may be NULL, but not &error_fatal or &error_abort.
- * Trivially the case if you call it only after error_setg() or
- * error_propagate().
- * May be called multiple times. The resulting hint should end with a
- * newline.
- */
-void error_append_hint(Error **errp, const char *fmt, ...)
- GCC_FMT_ATTR(2, 3);
-
-/*
- * Convenience function to report open() failure.
- */
-#define error_setg_file_open(errp, os_errno, filename) \
- error_setg_file_open_internal((errp), __FILE__, __LINE__, __func__, \
- (os_errno), (filename))
-void error_setg_file_open_internal(Error **errp,
- const char *src, int line, const char *func,
- int os_errno, const char *filename);
-
-/*
- * Return an exact copy of @err.
- */
-Error *error_copy(const Error *err);
-
-/*
- * Free @err.
- * @err may be NULL.
- */
-void error_free(Error *err);
-
-/*
- * Convenience function to assert that *@errp is set, then silently free it.
- */
-void error_free_or_abort(Error **errp);
-
-/*
- * Convenience function to error_report() and free @err.
- */
-void error_report_err(Error *err);
-
-/*
- * Convenience function to error_prepend(), error_report() and free @err.
- */
-void error_reportf_err(Error *err, const char *fmt, ...)
- GCC_FMT_ATTR(2, 3);
-
-/*
- * Just like error_setg(), except you get to specify the error class.
- * Note: use of error classes other than ERROR_CLASS_GENERIC_ERROR is
- * strongly discouraged.
- */
-#define error_set(errp, err_class, fmt, ...) \
- error_set_internal((errp), __FILE__, __LINE__, __func__, \
- (err_class), (fmt), ## __VA_ARGS__)
-void error_set_internal(Error **errp,
- const char *src, int line, const char *func,
- ErrorClass err_class, const char *fmt, ...)
- GCC_FMT_ATTR(6, 7);
-
-/*
- * Special error destination to abort on error.
- * See error_setg() and error_propagate() for details.
- */
-extern Error *error_abort;
-
-/*
- * Special error destination to exit(1) on error.
- * See error_setg() and error_propagate() for details.
- */
-extern Error *error_fatal;
-
-#endif
diff --git a/qemu/include/qapi/opts-visitor.h b/qemu/include/qapi/opts-visitor.h
deleted file mode 100644
index fd48c14ec..000000000
--- a/qemu/include/qapi/opts-visitor.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Options Visitor
- *
- * Copyright Red Hat, Inc. 2012
- *
- * Author: Laszlo Ersek <lersek@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef OPTS_VISITOR_H
-#define OPTS_VISITOR_H
-
-#include "qapi/visitor.h"
-#include "qemu/option.h"
-
-/* Inclusive upper bound on the size of any flattened range. This is a safety
- * (= anti-annoyance) measure; wrong ranges should not cause long startup
- * delays nor exhaust virtual memory.
- */
-#define OPTS_VISITOR_RANGE_MAX 65536
-
-typedef struct OptsVisitor OptsVisitor;
-
-/* Contrarily to qemu-option.c::parse_option_number(), OptsVisitor's "int"
- * parser relies on strtoll() instead of strtoull(). Consequences:
- * - string representations of negative numbers yield negative values,
- * - values below INT64_MIN or LLONG_MIN are rejected,
- * - values above INT64_MAX or LLONG_MAX are rejected.
- */
-OptsVisitor *opts_visitor_new(const QemuOpts *opts);
-void opts_visitor_cleanup(OptsVisitor *nv);
-Visitor *opts_get_visitor(OptsVisitor *nv);
-
-#endif
diff --git a/qemu/include/qapi/qmp-event.h b/qemu/include/qapi/qmp-event.h
deleted file mode 100644
index 40fe3cbc1..000000000
--- a/qemu/include/qapi/qmp-event.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * QMP Event related
- *
- * Copyright (c) 2014 Wenchao Xia
- *
- * Authors:
- * Wenchao Xia <wenchaoqemu@gmail.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QMP_EVENT_H
-#define QMP_EVENT_H
-
-#include "qapi/qmp/qdict.h"
-
-typedef void (*QMPEventFuncEmit)(unsigned event, QDict *dict, Error **errp);
-
-void qmp_event_set_func_emit(QMPEventFuncEmit emit);
-
-QMPEventFuncEmit qmp_event_get_func_emit(void);
-
-QDict *qmp_event_build_dict(const char *event_name);
-#endif
diff --git a/qemu/include/qapi/qmp-input-visitor.h b/qemu/include/qapi/qmp-input-visitor.h
deleted file mode 100644
index 3ed499cc4..000000000
--- a/qemu/include/qapi/qmp-input-visitor.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Input Visitor
- *
- * Copyright IBM, Corp. 2011
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QMP_INPUT_VISITOR_H
-#define QMP_INPUT_VISITOR_H
-
-#include "qapi/visitor.h"
-#include "qapi/qmp/qobject.h"
-
-typedef struct QmpInputVisitor QmpInputVisitor;
-
-QmpInputVisitor *qmp_input_visitor_new(QObject *obj);
-QmpInputVisitor *qmp_input_visitor_new_strict(QObject *obj);
-
-void qmp_input_visitor_cleanup(QmpInputVisitor *v);
-
-Visitor *qmp_input_get_visitor(QmpInputVisitor *v);
-
-#endif
diff --git a/qemu/include/qapi/qmp-output-visitor.h b/qemu/include/qapi/qmp-output-visitor.h
deleted file mode 100644
index 22667706a..000000000
--- a/qemu/include/qapi/qmp-output-visitor.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Output Visitor
- *
- * Copyright IBM, Corp. 2011
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QMP_OUTPUT_VISITOR_H
-#define QMP_OUTPUT_VISITOR_H
-
-#include "qapi/visitor.h"
-#include "qapi/qmp/qobject.h"
-
-typedef struct QmpOutputVisitor QmpOutputVisitor;
-
-QmpOutputVisitor *qmp_output_visitor_new(void);
-void qmp_output_visitor_cleanup(QmpOutputVisitor *v);
-
-QObject *qmp_output_get_qobject(QmpOutputVisitor *v);
-Visitor *qmp_output_get_visitor(QmpOutputVisitor *v);
-
-#endif
diff --git a/qemu/include/qapi/qmp/dispatch.h b/qemu/include/qapi/qmp/dispatch.h
deleted file mode 100644
index 495520994..000000000
--- a/qemu/include/qapi/qmp/dispatch.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Core Definitions for QAPI/QMP Dispatch
- *
- * Copyright IBM, Corp. 2011
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QMP_CORE_H
-#define QMP_CORE_H
-
-#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qdict.h"
-
-typedef void (QmpCommandFunc)(QDict *, QObject **, Error **);
-
-typedef enum QmpCommandType
-{
- QCT_NORMAL,
-} QmpCommandType;
-
-typedef enum QmpCommandOptions
-{
- QCO_NO_OPTIONS = 0x0,
- QCO_NO_SUCCESS_RESP = 0x1,
-} QmpCommandOptions;
-
-typedef struct QmpCommand
-{
- const char *name;
- QmpCommandType type;
- QmpCommandFunc *fn;
- QmpCommandOptions options;
- QTAILQ_ENTRY(QmpCommand) node;
- bool enabled;
-} QmpCommand;
-
-void qmp_register_command(const char *name, QmpCommandFunc *fn,
- QmpCommandOptions options);
-QmpCommand *qmp_find_command(const char *name);
-QObject *qmp_dispatch(QObject *request);
-void qmp_disable_command(const char *name);
-void qmp_enable_command(const char *name);
-bool qmp_command_is_enabled(const QmpCommand *cmd);
-const char *qmp_command_name(const QmpCommand *cmd);
-bool qmp_has_success_response(const QmpCommand *cmd);
-QObject *qmp_build_error_object(Error *err);
-typedef void (*qmp_cmd_callback_fn)(QmpCommand *cmd, void *opaque);
-void qmp_for_each_command(qmp_cmd_callback_fn fn, void *opaque);
-
-#endif
-
diff --git a/qemu/include/qapi/qmp/json-lexer.h b/qemu/include/qapi/qmp/json-lexer.h
deleted file mode 100644
index afee7828c..000000000
--- a/qemu/include/qapi/qmp/json-lexer.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * JSON lexer
- *
- * Copyright IBM, Corp. 2009
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QEMU_JSON_LEXER_H
-#define QEMU_JSON_LEXER_H
-
-
-typedef enum json_token_type {
- JSON_MIN = 100,
- JSON_LCURLY = JSON_MIN,
- JSON_RCURLY,
- JSON_LSQUARE,
- JSON_RSQUARE,
- JSON_COLON,
- JSON_COMMA,
- JSON_INTEGER,
- JSON_FLOAT,
- JSON_KEYWORD,
- JSON_STRING,
- JSON_ESCAPE,
- JSON_SKIP,
- JSON_ERROR,
-} JSONTokenType;
-
-typedef struct JSONLexer JSONLexer;
-
-typedef void (JSONLexerEmitter)(JSONLexer *, GString *,
- JSONTokenType, int x, int y);
-
-struct JSONLexer
-{
- JSONLexerEmitter *emit;
- int state;
- GString *token;
- int x, y;
-};
-
-void json_lexer_init(JSONLexer *lexer, JSONLexerEmitter func);
-
-int json_lexer_feed(JSONLexer *lexer, const char *buffer, size_t size);
-
-int json_lexer_flush(JSONLexer *lexer);
-
-void json_lexer_destroy(JSONLexer *lexer);
-
-#endif
diff --git a/qemu/include/qapi/qmp/json-parser.h b/qemu/include/qapi/qmp/json-parser.h
deleted file mode 100644
index 9987f8ca8..000000000
--- a/qemu/include/qapi/qmp/json-parser.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * JSON Parser
- *
- * Copyright IBM, Corp. 2009
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QEMU_JSON_PARSER_H
-#define QEMU_JSON_PARSER_H
-
-#include "qemu-common.h"
-#include "qapi/qmp/qlist.h"
-
-QObject *json_parser_parse(GQueue *tokens, va_list *ap);
-QObject *json_parser_parse_err(GQueue *tokens, va_list *ap, Error **errp);
-
-#endif
diff --git a/qemu/include/qapi/qmp/json-streamer.h b/qemu/include/qapi/qmp/json-streamer.h
deleted file mode 100644
index 00d8a23af..000000000
--- a/qemu/include/qapi/qmp/json-streamer.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * JSON streaming support
- *
- * Copyright IBM, Corp. 2009
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QEMU_JSON_STREAMER_H
-#define QEMU_JSON_STREAMER_H
-
-#include "qapi/qmp/json-lexer.h"
-
-typedef struct JSONToken {
- int type;
- int x;
- int y;
- char str[];
-} JSONToken;
-
-typedef struct JSONMessageParser
-{
- void (*emit)(struct JSONMessageParser *parser, GQueue *tokens);
- JSONLexer lexer;
- int brace_count;
- int bracket_count;
- GQueue *tokens;
- uint64_t token_size;
-} JSONMessageParser;
-
-void json_message_parser_init(JSONMessageParser *parser,
- void (*func)(JSONMessageParser *, GQueue *));
-
-int json_message_parser_feed(JSONMessageParser *parser,
- const char *buffer, size_t size);
-
-int json_message_parser_flush(JSONMessageParser *parser);
-
-void json_message_parser_destroy(JSONMessageParser *parser);
-
-#endif
diff --git a/qemu/include/qapi/qmp/qbool.h b/qemu/include/qapi/qmp/qbool.h
deleted file mode 100644
index a41111c30..000000000
--- a/qemu/include/qapi/qmp/qbool.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * QBool Module
- *
- * Copyright IBM, Corp. 2009
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QBOOL_H
-#define QBOOL_H
-
-#include "qapi/qmp/qobject.h"
-
-typedef struct QBool {
- QObject base;
- bool value;
-} QBool;
-
-QBool *qbool_from_bool(bool value);
-bool qbool_get_bool(const QBool *qb);
-QBool *qobject_to_qbool(const QObject *obj);
-void qbool_destroy_obj(QObject *obj);
-
-#endif /* QBOOL_H */
diff --git a/qemu/include/qapi/qmp/qdict.h b/qemu/include/qapi/qmp/qdict.h
deleted file mode 100644
index 71b8eb041..000000000
--- a/qemu/include/qapi/qmp/qdict.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * QDict Module
- *
- * Copyright (C) 2009 Red Hat Inc.
- *
- * Authors:
- * Luiz Capitulino <lcapitulino@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- */
-
-#ifndef QDICT_H
-#define QDICT_H
-
-#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qlist.h"
-#include "qemu/queue.h"
-
-#define QDICT_BUCKET_MAX 512
-
-typedef struct QDictEntry {
- char *key;
- QObject *value;
- QLIST_ENTRY(QDictEntry) next;
-} QDictEntry;
-
-typedef struct QDict {
- QObject base;
- size_t size;
- QLIST_HEAD(,QDictEntry) table[QDICT_BUCKET_MAX];
-} QDict;
-
-/* Object API */
-QDict *qdict_new(void);
-const char *qdict_entry_key(const QDictEntry *entry);
-QObject *qdict_entry_value(const QDictEntry *entry);
-size_t qdict_size(const QDict *qdict);
-void qdict_put_obj(QDict *qdict, const char *key, QObject *value);
-void qdict_del(QDict *qdict, const char *key);
-int qdict_haskey(const QDict *qdict, const char *key);
-QObject *qdict_get(const QDict *qdict, const char *key);
-QDict *qobject_to_qdict(const QObject *obj);
-void qdict_iter(const QDict *qdict,
- void (*iter)(const char *key, QObject *obj, void *opaque),
- void *opaque);
-const QDictEntry *qdict_first(const QDict *qdict);
-const QDictEntry *qdict_next(const QDict *qdict, const QDictEntry *entry);
-void qdict_destroy_obj(QObject *obj);
-
-/* Helper to qdict_put_obj(), accepts any object */
-#define qdict_put(qdict, key, obj) \
- qdict_put_obj(qdict, key, QOBJECT(obj))
-
-/* High level helpers */
-double qdict_get_double(const QDict *qdict, const char *key);
-int64_t qdict_get_int(const QDict *qdict, const char *key);
-bool qdict_get_bool(const QDict *qdict, const char *key);
-QList *qdict_get_qlist(const QDict *qdict, const char *key);
-QDict *qdict_get_qdict(const QDict *qdict, const char *key);
-const char *qdict_get_str(const QDict *qdict, const char *key);
-int64_t qdict_get_try_int(const QDict *qdict, const char *key,
- int64_t def_value);
-bool qdict_get_try_bool(const QDict *qdict, const char *key, bool def_value);
-const char *qdict_get_try_str(const QDict *qdict, const char *key);
-
-void qdict_copy_default(QDict *dst, QDict *src, const char *key);
-void qdict_set_default_str(QDict *dst, const char *key, const char *val);
-
-QDict *qdict_clone_shallow(const QDict *src);
-void qdict_flatten(QDict *qdict);
-
-void qdict_extract_subqdict(QDict *src, QDict **dst, const char *start);
-void qdict_array_split(QDict *src, QList **dst);
-int qdict_array_entries(QDict *src, const char *subqdict);
-
-void qdict_join(QDict *dest, QDict *src, bool overwrite);
-
-#endif /* QDICT_H */
diff --git a/qemu/include/qapi/qmp/qerror.h b/qemu/include/qapi/qmp/qerror.h
deleted file mode 100644
index d08652aaa..000000000
--- a/qemu/include/qapi/qmp/qerror.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * QError Module
- *
- * Copyright (C) 2009 Red Hat Inc.
- *
- * Authors:
- * Luiz Capitulino <lcapitulino@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- */
-#ifndef QERROR_H
-#define QERROR_H
-
-/*
- * These macros will go away, please don't use in new code, and do not
- * add new ones!
- */
-#define QERR_BASE_NOT_FOUND \
- "Base '%s' not found"
-
-#define QERR_BLOCK_JOB_NOT_READY \
- "The active block job for device '%s' cannot be completed"
-
-#define QERR_BUS_NO_HOTPLUG \
- "Bus '%s' does not support hotplugging"
-
-#define QERR_DEVICE_HAS_NO_MEDIUM \
- "Device '%s' has no medium"
-
-#define QERR_DEVICE_INIT_FAILED \
- "Device '%s' could not be initialized"
-
-#define QERR_DEVICE_IN_USE \
- "Device '%s' is in use"
-
-#define QERR_DEVICE_NO_HOTPLUG \
- "Device '%s' does not support hotplugging"
-
-#define QERR_FD_NOT_FOUND \
- "File descriptor named '%s' not found"
-
-#define QERR_FD_NOT_SUPPLIED \
- "No file descriptor supplied via SCM_RIGHTS"
-
-#define QERR_FEATURE_DISABLED \
- "The feature '%s' is not enabled"
-
-#define QERR_INVALID_BLOCK_FORMAT \
- "Invalid block format '%s'"
-
-#define QERR_INVALID_PARAMETER \
- "Invalid parameter '%s'"
-
-#define QERR_INVALID_PARAMETER_TYPE \
- "Invalid parameter type for '%s', expected: %s"
-
-#define QERR_INVALID_PARAMETER_VALUE \
- "Parameter '%s' expects %s"
-
-#define QERR_INVALID_PASSWORD \
- "Password incorrect"
-
-#define QERR_IO_ERROR \
- "An IO error has occurred"
-
-#define QERR_JSON_PARSING \
- "Invalid JSON syntax"
-
-#define QERR_MIGRATION_ACTIVE \
- "There's a migration process in progress"
-
-#define QERR_MISSING_PARAMETER \
- "Parameter '%s' is missing"
-
-#define QERR_PERMISSION_DENIED \
- "Insufficient permission to perform this operation"
-
-#define QERR_PROPERTY_VALUE_BAD \
- "Property '%s.%s' doesn't take value '%s'"
-
-#define QERR_PROPERTY_VALUE_OUT_OF_RANGE \
- "Property %s.%s doesn't take value %" PRId64 " (minimum: %" PRId64 ", maximum: %" PRId64 ")"
-
-#define QERR_QGA_COMMAND_FAILED \
- "Guest agent command failed, error was '%s'"
-
-#define QERR_QMP_BAD_INPUT_OBJECT \
- "Expected '%s' in QMP input"
-
-#define QERR_QMP_BAD_INPUT_OBJECT_MEMBER \
- "QMP input object member '%s' expects '%s'"
-
-#define QERR_QMP_EXTRA_MEMBER \
- "QMP input object member '%s' is unexpected"
-
-#define QERR_SET_PASSWD_FAILED \
- "Could not set password"
-
-#define QERR_UNDEFINED_ERROR \
- "An undefined error has occurred"
-
-#define QERR_UNSUPPORTED \
- "this feature or command is not currently supported"
-
-#define QERR_REPLAY_NOT_SUPPORTED \
- "Record/replay feature is not supported for '%s'"
-
-#endif /* QERROR_H */
diff --git a/qemu/include/qapi/qmp/qfloat.h b/qemu/include/qapi/qmp/qfloat.h
deleted file mode 100644
index b5d15836b..000000000
--- a/qemu/include/qapi/qmp/qfloat.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * QFloat Module
- *
- * Copyright IBM, Corp. 2009
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QFLOAT_H
-#define QFLOAT_H
-
-#include "qapi/qmp/qobject.h"
-
-typedef struct QFloat {
- QObject base;
- double value;
-} QFloat;
-
-QFloat *qfloat_from_double(double value);
-double qfloat_get_double(const QFloat *qi);
-QFloat *qobject_to_qfloat(const QObject *obj);
-void qfloat_destroy_obj(QObject *obj);
-
-#endif /* QFLOAT_H */
diff --git a/qemu/include/qapi/qmp/qint.h b/qemu/include/qapi/qmp/qint.h
deleted file mode 100644
index 3aaff768d..000000000
--- a/qemu/include/qapi/qmp/qint.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * QInt Module
- *
- * Copyright (C) 2009 Red Hat Inc.
- *
- * Authors:
- * Luiz Capitulino <lcapitulino@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- */
-
-#ifndef QINT_H
-#define QINT_H
-
-#include "qapi/qmp/qobject.h"
-
-typedef struct QInt {
- QObject base;
- int64_t value;
-} QInt;
-
-QInt *qint_from_int(int64_t value);
-int64_t qint_get_int(const QInt *qi);
-QInt *qobject_to_qint(const QObject *obj);
-void qint_destroy_obj(QObject *obj);
-
-#endif /* QINT_H */
diff --git a/qemu/include/qapi/qmp/qjson.h b/qemu/include/qapi/qmp/qjson.h
deleted file mode 100644
index 02b1f2ce3..000000000
--- a/qemu/include/qapi/qmp/qjson.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * QObject JSON integration
- *
- * Copyright IBM, Corp. 2009
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QJSON_H
-#define QJSON_H
-
-#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qstring.h"
-
-QObject *qobject_from_json(const char *string);
-QObject *qobject_from_jsonf(const char *string, ...) GCC_FMT_ATTR(1, 2);
-QObject *qobject_from_jsonv(const char *string, va_list *ap) GCC_FMT_ATTR(1, 0);
-
-QString *qobject_to_json(const QObject *obj);
-QString *qobject_to_json_pretty(const QObject *obj);
-
-#endif /* QJSON_H */
diff --git a/qemu/include/qapi/qmp/qlist.h b/qemu/include/qapi/qmp/qlist.h
deleted file mode 100644
index a84117ecb..000000000
--- a/qemu/include/qapi/qmp/qlist.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * QList Module
- *
- * Copyright (C) 2009 Red Hat Inc.
- *
- * Authors:
- * Luiz Capitulino <lcapitulino@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- */
-
-#ifndef QLIST_H
-#define QLIST_H
-
-#include "qapi/qmp/qobject.h"
-#include "qemu/queue.h"
-
-typedef struct QListEntry {
- QObject *value;
- QTAILQ_ENTRY(QListEntry) next;
-} QListEntry;
-
-typedef struct QList {
- QObject base;
- QTAILQ_HEAD(,QListEntry) head;
-} QList;
-
-#define qlist_append(qlist, obj) \
- qlist_append_obj(qlist, QOBJECT(obj))
-
-#define QLIST_FOREACH_ENTRY(qlist, var) \
- for ((var) = ((qlist)->head.tqh_first); \
- (var); \
- (var) = ((var)->next.tqe_next))
-
-static inline QObject *qlist_entry_obj(const QListEntry *entry)
-{
- return entry->value;
-}
-
-QList *qlist_new(void);
-QList *qlist_copy(QList *src);
-void qlist_append_obj(QList *qlist, QObject *obj);
-void qlist_iter(const QList *qlist,
- void (*iter)(QObject *obj, void *opaque), void *opaque);
-QObject *qlist_pop(QList *qlist);
-QObject *qlist_peek(QList *qlist);
-int qlist_empty(const QList *qlist);
-size_t qlist_size(const QList *qlist);
-QList *qobject_to_qlist(const QObject *obj);
-void qlist_destroy_obj(QObject *obj);
-
-static inline const QListEntry *qlist_first(const QList *qlist)
-{
- return QTAILQ_FIRST(&qlist->head);
-}
-
-static inline const QListEntry *qlist_next(const QListEntry *entry)
-{
- return QTAILQ_NEXT(entry, next);
-}
-
-#endif /* QLIST_H */
diff --git a/qemu/include/qapi/qmp/qobject.h b/qemu/include/qapi/qmp/qobject.h
deleted file mode 100644
index b8ddbca40..000000000
--- a/qemu/include/qapi/qmp/qobject.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * QEMU Object Model.
- *
- * Based on ideas by Avi Kivity <avi@redhat.com>
- *
- * Copyright (C) 2009, 2015 Red Hat Inc.
- *
- * Authors:
- * Luiz Capitulino <lcapitulino@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- * QObject Reference Counts Terminology
- * ------------------------------------
- *
- * - Returning references: A function that returns an object may
- * return it as either a weak or a strong reference. If the reference
- * is strong, you are responsible for calling QDECREF() on the reference
- * when you are done.
- *
- * If the reference is weak, the owner of the reference may free it at
- * any time in the future. Before storing the reference anywhere, you
- * should call QINCREF() to make the reference strong.
- *
- * - Transferring ownership: when you transfer ownership of a reference
- * by calling a function, you are no longer responsible for calling
- * QDECREF() when the reference is no longer needed. In other words,
- * when the function returns you must behave as if the reference to the
- * passed object was weak.
- */
-#ifndef QOBJECT_H
-#define QOBJECT_H
-
-#include "qapi-types.h"
-
-struct QObject {
- QType type;
- size_t refcnt;
-};
-
-/* Get the 'base' part of an object */
-#define QOBJECT(obj) (&(obj)->base)
-
-/* High-level interface for qobject_incref() */
-#define QINCREF(obj) \
- qobject_incref(QOBJECT(obj))
-
-/* High-level interface for qobject_decref() */
-#define QDECREF(obj) \
- qobject_decref(obj ? QOBJECT(obj) : NULL)
-
-/* Initialize an object to default values */
-static inline void qobject_init(QObject *obj, QType type)
-{
- assert(QTYPE_NONE < type && type < QTYPE__MAX);
- obj->refcnt = 1;
- obj->type = type;
-}
-
-/**
- * qobject_incref(): Increment QObject's reference count
- */
-static inline void qobject_incref(QObject *obj)
-{
- if (obj)
- obj->refcnt++;
-}
-
-/**
- * qobject_destroy(): Free resources used by the object
- */
-void qobject_destroy(QObject *obj);
-
-/**
- * qobject_decref(): Decrement QObject's reference count, deallocate
- * when it reaches zero
- */
-static inline void qobject_decref(QObject *obj)
-{
- assert(!obj || obj->refcnt);
- if (obj && --obj->refcnt == 0) {
- qobject_destroy(obj);
- }
-}
-
-/**
- * qobject_type(): Return the QObject's type
- */
-static inline QType qobject_type(const QObject *obj)
-{
- assert(QTYPE_NONE < obj->type && obj->type < QTYPE__MAX);
- return obj->type;
-}
-
-extern QObject qnull_;
-
-static inline QObject *qnull(void)
-{
- qobject_incref(&qnull_);
- return &qnull_;
-}
-
-#endif /* QOBJECT_H */
diff --git a/qemu/include/qapi/qmp/qstring.h b/qemu/include/qapi/qmp/qstring.h
deleted file mode 100644
index 10076b7c8..000000000
--- a/qemu/include/qapi/qmp/qstring.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * QString Module
- *
- * Copyright (C) 2009 Red Hat Inc.
- *
- * Authors:
- * Luiz Capitulino <lcapitulino@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- */
-
-#ifndef QSTRING_H
-#define QSTRING_H
-
-#include "qapi/qmp/qobject.h"
-
-typedef struct QString {
- QObject base;
- char *string;
- size_t length;
- size_t capacity;
-} QString;
-
-QString *qstring_new(void);
-QString *qstring_from_str(const char *str);
-QString *qstring_from_substr(const char *str, int start, int end);
-size_t qstring_get_length(const QString *qstring);
-const char *qstring_get_str(const QString *qstring);
-void qstring_append_int(QString *qstring, int64_t value);
-void qstring_append(QString *qstring, const char *str);
-void qstring_append_chr(QString *qstring, int c);
-QString *qobject_to_qstring(const QObject *obj);
-void qstring_destroy_obj(QObject *obj);
-
-#endif /* QSTRING_H */
diff --git a/qemu/include/qapi/qmp/types.h b/qemu/include/qapi/qmp/types.h
deleted file mode 100644
index 7782ec5a6..000000000
--- a/qemu/include/qapi/qmp/types.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Include all QEMU objects.
- *
- * Copyright (C) 2009 Red Hat Inc.
- *
- * Authors:
- * Luiz Capitulino <lcapitulino@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- */
-
-#ifndef QEMU_OBJECTS_H
-#define QEMU_OBJECTS_H
-
-#include "qapi/qmp/qobject.h"
-#include "qapi/qmp/qint.h"
-#include "qapi/qmp/qfloat.h"
-#include "qapi/qmp/qbool.h"
-#include "qapi/qmp/qstring.h"
-#include "qapi/qmp/qdict.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qjson.h"
-
-#endif /* QEMU_OBJECTS_H */
diff --git a/qemu/include/qapi/string-input-visitor.h b/qemu/include/qapi/string-input-visitor.h
deleted file mode 100644
index 089243c09..000000000
--- a/qemu/include/qapi/string-input-visitor.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * String parsing Visitor
- *
- * Copyright Red Hat, Inc. 2012
- *
- * Author: Paolo Bonzini <pbonzini@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef STRING_INPUT_VISITOR_H
-#define STRING_INPUT_VISITOR_H
-
-#include "qapi/visitor.h"
-
-typedef struct StringInputVisitor StringInputVisitor;
-
-StringInputVisitor *string_input_visitor_new(const char *str);
-void string_input_visitor_cleanup(StringInputVisitor *v);
-
-Visitor *string_input_get_visitor(StringInputVisitor *v);
-
-#endif
diff --git a/qemu/include/qapi/string-output-visitor.h b/qemu/include/qapi/string-output-visitor.h
deleted file mode 100644
index d99717f65..000000000
--- a/qemu/include/qapi/string-output-visitor.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * String printing Visitor
- *
- * Copyright Red Hat, Inc. 2012
- *
- * Author: Paolo Bonzini <pbonzini@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef STRING_OUTPUT_VISITOR_H
-#define STRING_OUTPUT_VISITOR_H
-
-#include "qapi/visitor.h"
-
-typedef struct StringOutputVisitor StringOutputVisitor;
-
-StringOutputVisitor *string_output_visitor_new(bool human);
-void string_output_visitor_cleanup(StringOutputVisitor *v);
-
-char *string_output_get_string(StringOutputVisitor *v);
-Visitor *string_output_get_visitor(StringOutputVisitor *v);
-
-#endif
diff --git a/qemu/include/qapi/util.h b/qemu/include/qapi/util.h
deleted file mode 100644
index 7ad26c0ac..000000000
--- a/qemu/include/qapi/util.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * QAPI util functions
- *
- * Copyright Fujitsu, Inc. 2014
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QAPI_UTIL_H
-#define QAPI_UTIL_H
-
-int qapi_enum_parse(const char * const lookup[], const char *buf,
- int max, int def, Error **errp);
-
-#endif
diff --git a/qemu/include/qapi/visitor-impl.h b/qemu/include/qapi/visitor-impl.h
deleted file mode 100644
index 2bd8f292b..000000000
--- a/qemu/include/qapi/visitor-impl.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Core Definitions for QAPI Visitor implementations
- *
- * Copyright (C) 2012-2016 Red Hat, Inc.
- *
- * Author: Paolo Bonizni <pbonzini@redhat.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-#ifndef QAPI_VISITOR_IMPL_H
-#define QAPI_VISITOR_IMPL_H
-
-#include "qapi/visitor.h"
-
-struct Visitor
-{
- /* Must be set */
- void (*start_struct)(Visitor *v, const char *name, void **obj,
- size_t size, Error **errp);
- void (*end_struct)(Visitor *v, Error **errp);
-
- void (*start_list)(Visitor *v, const char *name, Error **errp);
- /* Must be set */
- GenericList *(*next_list)(Visitor *v, GenericList **list, size_t size);
- /* Must be set */
- void (*end_list)(Visitor *v);
-
- /* Optional, needed for input and dealloc visitors. */
- void (*start_alternate)(Visitor *v, const char *name,
- GenericAlternate **obj, size_t size,
- bool promote_int, Error **errp);
-
- /* Optional, needed for dealloc visitor. */
- void (*end_alternate)(Visitor *v);
-
- /* Must be set. */
- void (*type_enum)(Visitor *v, const char *name, int *obj,
- const char *const strings[], Error **errp);
-
- /* Must be set. */
- void (*type_int64)(Visitor *v, const char *name, int64_t *obj,
- Error **errp);
- /* Must be set. */
- void (*type_uint64)(Visitor *v, const char *name, uint64_t *obj,
- Error **errp);
- /* Optional; fallback is type_uint64(). */
- void (*type_size)(Visitor *v, const char *name, uint64_t *obj,
- Error **errp);
- /* Must be set. */
- void (*type_bool)(Visitor *v, const char *name, bool *obj, Error **errp);
- void (*type_str)(Visitor *v, const char *name, char **obj, Error **errp);
- void (*type_number)(Visitor *v, const char *name, double *obj,
- Error **errp);
- void (*type_any)(Visitor *v, const char *name, QObject **obj,
- Error **errp);
-
- /* May be NULL; most useful for input visitors. */
- void (*optional)(Visitor *v, const char *name, bool *present);
-};
-
-void input_type_enum(Visitor *v, const char *name, int *obj,
- const char *const strings[], Error **errp);
-void output_type_enum(Visitor *v, const char *name, int *obj,
- const char *const strings[], Error **errp);
-
-#endif
diff --git a/qemu/include/qapi/visitor.h b/qemu/include/qapi/visitor.h
deleted file mode 100644
index 9a8d0105f..000000000
--- a/qemu/include/qapi/visitor.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Core Definitions for QAPI Visitor Classes
- *
- * Copyright (C) 2012-2016 Red Hat, Inc.
- * Copyright IBM, Corp. 2011
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-#ifndef QAPI_VISITOR_CORE_H
-#define QAPI_VISITOR_CORE_H
-
-#include "qapi/qmp/qobject.h"
-
-/* This struct is layout-compatible with all other *List structs
- * created by the qapi generator. It is used as a typical
- * singly-linked list. */
-typedef struct GenericList {
- struct GenericList *next;
- char padding[];
-} GenericList;
-
-/* This struct is layout-compatible with all Alternate types
- * created by the qapi generator. */
-typedef struct GenericAlternate {
- QType type;
- char padding[];
-} GenericAlternate;
-
-void visit_start_struct(Visitor *v, const char *name, void **obj,
- size_t size, Error **errp);
-void visit_end_struct(Visitor *v, Error **errp);
-
-void visit_start_list(Visitor *v, const char *name, Error **errp);
-GenericList *visit_next_list(Visitor *v, GenericList **list, size_t size);
-void visit_end_list(Visitor *v);
-
-/*
- * Start the visit of an alternate @obj with the given @size.
- *
- * @name specifies the relationship to the containing struct (ignored
- * for a top level visit, the name of the key if this alternate is
- * part of an object, or NULL if this alternate is part of a list).
- *
- * @obj must not be NULL. Input visitors will allocate @obj and
- * determine the qtype of the next thing to be visited, stored in
- * (*@obj)->type. Other visitors will leave @obj unchanged.
- *
- * If @promote_int, treat integers as QTYPE_FLOAT.
- *
- * If successful, this must be paired with visit_end_alternate(), even
- * if visiting the contents of the alternate fails.
- */
-void visit_start_alternate(Visitor *v, const char *name,
- GenericAlternate **obj, size_t size,
- bool promote_int, Error **errp);
-
-/*
- * Finish visiting an alternate type.
- *
- * Must be called after a successful visit_start_alternate(), even if
- * an error occurred in the meantime.
- *
- * TODO: Should all the visit_end_* interfaces take obj parameter, so
- * that dealloc visitor need not track what was passed in visit_start?
- */
-void visit_end_alternate(Visitor *v);
-
-/**
- * Check if an optional member @name of an object needs visiting.
- * For input visitors, set *@present according to whether the
- * corresponding visit_type_*() needs calling; for other visitors,
- * leave *@present unchanged. Return *@present for convenience.
- */
-bool visit_optional(Visitor *v, const char *name, bool *present);
-
-void visit_type_enum(Visitor *v, const char *name, int *obj,
- const char *const strings[], Error **errp);
-void visit_type_int(Visitor *v, const char *name, int64_t *obj, Error **errp);
-void visit_type_uint8(Visitor *v, const char *name, uint8_t *obj,
- Error **errp);
-void visit_type_uint16(Visitor *v, const char *name, uint16_t *obj,
- Error **errp);
-void visit_type_uint32(Visitor *v, const char *name, uint32_t *obj,
- Error **errp);
-void visit_type_uint64(Visitor *v, const char *name, uint64_t *obj,
- Error **errp);
-void visit_type_int8(Visitor *v, const char *name, int8_t *obj, Error **errp);
-void visit_type_int16(Visitor *v, const char *name, int16_t *obj,
- Error **errp);
-void visit_type_int32(Visitor *v, const char *name, int32_t *obj,
- Error **errp);
-void visit_type_int64(Visitor *v, const char *name, int64_t *obj,
- Error **errp);
-void visit_type_size(Visitor *v, const char *name, uint64_t *obj,
- Error **errp);
-void visit_type_bool(Visitor *v, const char *name, bool *obj, Error **errp);
-void visit_type_str(Visitor *v, const char *name, char **obj, Error **errp);
-void visit_type_number(Visitor *v, const char *name, double *obj,
- Error **errp);
-void visit_type_any(Visitor *v, const char *name, QObject **obj, Error **errp);
-
-#endif