aboutsummaryrefslogtreecommitdiff
path: root/include/qapi/visitor-impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qapi/visitor-impl.h')
-rw-r--r--include/qapi/visitor-impl.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/include/qapi/visitor-impl.h b/include/qapi/visitor-impl.h
index ea252f8e3a..2bd8f292b2 100644
--- a/include/qapi/visitor-impl.h
+++ b/include/qapi/visitor-impl.h
@@ -12,7 +12,6 @@
#ifndef QAPI_VISITOR_IMPL_H
#define QAPI_VISITOR_IMPL_H
-#include "qapi/error.h"
#include "qapi/visitor.h"
struct Visitor
@@ -22,22 +21,23 @@ struct Visitor
size_t size, Error **errp);
void (*end_struct)(Visitor *v, Error **errp);
- void (*start_implicit_struct)(Visitor *v, void **obj, size_t size,
- Error **errp);
- /* May be NULL */
- void (*end_implicit_struct)(Visitor *v);
-
void (*start_list)(Visitor *v, const char *name, Error **errp);
/* Must be set */
- GenericList *(*next_list)(Visitor *v, GenericList **list);
+ 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);
- /* May be NULL; only needed for input visitors. */
- void (*get_next_type)(Visitor *v, const char *name, QType *type,
- bool promote_int, Error **errp);
/* Must be set. */
void (*type_int64)(Visitor *v, const char *name, int64_t *obj,
@@ -58,8 +58,6 @@ struct Visitor
/* May be NULL; most useful for input visitors. */
void (*optional)(Visitor *v, const char *name, bool *present);
-
- bool (*start_union)(Visitor *v, bool data_present, Error **errp);
};
void input_type_enum(Visitor *v, const char *name, int *obj,