]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - include/qemu/qemu-plugin.h
tcg plugins: expose an API version concept
[thirdparty/qemu.git] / include / qemu / qemu-plugin.h
index a00a7deb4614da8c6e14aaef1f32534417f029d2..5502e112c8106be507584b565d1877dc10371866 100644 (file)
 
 typedef uint64_t qemu_plugin_id_t;
 
+/*
+ * Versioning plugins:
+ *
+ * The plugin API will pass a minimum and current API version that
+ * QEMU currently supports. The minimum API will be incremented if an
+ * API needs to be deprecated.
+ *
+ * The plugins export the API they were built against by exposing the
+ * symbol qemu_plugin_version which can be checked.
+ */
+
+extern QEMU_PLUGIN_EXPORT int qemu_plugin_version;
+
+#define QEMU_PLUGIN_VERSION 0
+
 typedef struct {
     /* string describing architecture */
     const char *target_name;
+    struct {
+        int min;
+        int cur;
+    } version;
     /* is this a full system emulation? */
     bool system_emulation;
     union {