From 0f71a1e0c8d64b84edd5ac5abdce70a4fb9357a9 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 9 Feb 2012 09:11:52 +0100 Subject: qapi: allow sharing enum implementation across visitors Most visitors will use the same code for enum parsing. Move it to the core. Signed-off-by: Paolo Bonzini --- qapi/qapi-visit-impl.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 qapi/qapi-visit-impl.h (limited to 'qapi/qapi-visit-impl.h') diff --git a/qapi/qapi-visit-impl.h b/qapi/qapi-visit-impl.h new file mode 100644 index 0000000000..0f3a1898fe --- /dev/null +++ b/qapi/qapi-visit-impl.h @@ -0,0 +1,23 @@ +/* + * Core Definitions for QAPI Visitor implementations + * + * Copyright (C) 2012 Red Hat, Inc. + * + * Author: Paolo Bonizni + * + * 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/qapi-types-core.h" +#include "qapi/qapi-visit-core.h" + +void input_type_enum(Visitor *v, int *obj, const char *strings[], + const char *kind, const char *name, Error **errp); +void output_type_enum(Visitor *v, int *obj, const char *strings[], + const char *kind, const char *name, Error **errp); + +#endif -- cgit v1.2.3-55-g7522