LIBXL_OBJS = flexarray.o libxl.o libxl_create.o libxl_dm.o libxl_pci.o \
libxl_dom.o libxl_exec.o libxl_xshelp.o libxl_device.o \
libxl_internal.o libxl_utils.o libxl_uuid.o $(LIBXL_OBJS-y)
-LIBXL_OBJS += _libxl_types.o libxl_flask.o
+LIBXL_OBJS += _libxl_types.o libxl_flask.o _libxl_types_internal.o
$(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl)
libxl_paths.c: _libxl_paths.h
libxl.h: _libxl_types.h
+libxl_internal.h: _libxl_types_internal.h
$(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS): libxl.h
+$(LIBXL_OBJS): libxl_internal.h
_libxl_type%.h _libxl_type%.c: libxl_type%.idl gentypes.py libxltypes.py
$(PYTHON) gentypes.py libxl_type$*.idl __libxl_type$*.h __libxl_type$*.c
f = open(header, "w")
- f.write("""#ifndef __LIBXL_TYPES_H
-#define __LIBXL_TYPES_H
+ header_define = header.upper().replace('.','_')
+ f.write("""#ifndef %s
+#define %s
/*
* DO NOT EDIT.
* "%s"
*/
-""" % " ".join(sys.argv))
+""" % (header_define, header_define, " ".join(sys.argv)))
for ty in types:
f.write(libxl_C_type_define(ty) + ";\n")
f.write("extern libxl_enum_string_table %s_string_table[];\n" % (ty.typename))
f.write("\n")
- f.write("""#endif /* __LIBXL_TYPES_H */\n""")
+ f.write("""#endif /* %s */\n""" % (header_define))
f.close()
print "outputting libxl type implementations to %s" % impl
#include "flexarray.h"
#include "libxl_utils.h"
+#include "_libxl_types_internal.h"
#define LIBXL_DESTROY_TIMEOUT 10
#define LIBXL_DEVICE_MODEL_START_TIMEOUT 10
--- /dev/null
+namespace("libxl__")
+
+libxl__qmp_message_type = Enumeration("qmp_message_type", [
+ (1, "QMP"),
+ (2, "return"),
+ (3, "error"),
+ (4, "event"),
+ (5, "invalid"),
+ ])