aboutsummaryrefslogtreecommitdiff
path: root/qapi/qapi-visit-impl.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-02-09 09:11:52 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-02-21 10:21:05 +0100
commit0f71a1e0c8d64b84edd5ac5abdce70a4fb9357a9 (patch)
treeed0d41c8d49750ac961afb7c9d120f6e2912148d /qapi/qapi-visit-impl.h
parent99c7f87826337fa81f2f0f9baa9ca0a44faf90e9 (diff)
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 <pbonzini@redhat.com>
Diffstat (limited to 'qapi/qapi-visit-impl.h')
-rw-r--r--qapi/qapi-visit-impl.h23
1 files changed, 23 insertions, 0 deletions
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 <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/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