qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/6] qapi: move event defines to qapi-schema.json


From: Wenchao Xia
Subject: [Qemu-devel] [PATCH 4/6] qapi: move event defines to qapi-schema.json
Date: Mon, 21 Oct 2013 10:16:03 +0800

They are defined with capitals for compatibility, see monitor_event_names
in monitor.c, which was used to set the event strings.

Signed-off-by: Wenchao Xia <address@hidden>
---
 include/monitor/monitor.h |   37 -------------------------------------
 qapi-schema.json          |   37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index b273c5b..cdbb5b2 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -19,43 +19,6 @@ extern Monitor *default_mon;
 /* flags for monitor commands */
 #define MONITOR_CMD_ASYNC       0x0001
 
-/* QMP events */
-typedef enum QEvent {
-    Q_EVENT_SHUTDOWN,
-    Q_EVENT_RESET,
-    Q_EVENT_POWERDOWN,
-    Q_EVENT_STOP,
-    Q_EVENT_RESUME,
-    Q_EVENT_VNC_CONNECTED,
-    Q_EVENT_VNC_INITIALIZED,
-    Q_EVENT_VNC_DISCONNECTED,
-    Q_EVENT_BLOCK_IO_ERROR,
-    Q_EVENT_RTC_CHANGE,
-    Q_EVENT_WATCHDOG,
-    Q_EVENT_SPICE_CONNECTED,
-    Q_EVENT_SPICE_INITIALIZED,
-    Q_EVENT_SPICE_DISCONNECTED,
-    Q_EVENT_BLOCK_JOB_COMPLETED,
-    Q_EVENT_BLOCK_JOB_CANCELLED,
-    Q_EVENT_BLOCK_JOB_ERROR,
-    Q_EVENT_BLOCK_JOB_READY,
-    Q_EVENT_DEVICE_DELETED,
-    Q_EVENT_DEVICE_TRAY_MOVED,
-    Q_EVENT_NIC_RX_FILTER_CHANGED,
-    Q_EVENT_SUSPEND,
-    Q_EVENT_SUSPEND_DISK,
-    Q_EVENT_WAKEUP,
-    Q_EVENT_BALLOON_CHANGE,
-    Q_EVENT_SPICE_MIGRATE_COMPLETED,
-    Q_EVENT_GUEST_PANICKED,
-    Q_EVENT_BLOCK_IMAGE_CORRUPTED,
-
-    /* Add to 'monitor_event_names' array in monitor.c when
-     * defining new events here */
-
-    Q_EVENT_MAX,
-} QEvent;
-
 int monitor_cur_is_qmp(void);
 
 void monitor_protocol_event(QEvent event, QObject *data);
diff --git a/qapi-schema.json b/qapi-schema.json
index 60f3fd1..fbc1fab 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -29,6 +29,43 @@
             'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
 
 ##
+# @QEvent
+#
+# QEMU event types
+#
+# Since: 1.8
+##
+{ 'enum': 'QEvent',
+  'data': [ 'SHUTDOWN',
+            'RESET',
+            'POWERDOWN',
+            'STOP',
+            'RESUME',
+            'VNC_CONNECTED',
+            'VNC_INITIALIZED',
+            'VNC_DISCONNECTED',
+            'BLOCK_IO_ERROR',
+            'RTC_CHANGE',
+            'WATCHDOG',
+            'SPICE_CONNECTED',
+            'SPICE_INITIALIZED',
+            'SPICE_DISCONNECTED',
+            'BLOCK_JOB_COMPLETED',
+            'BLOCK_JOB_CANCELLED',
+            'BLOCK_JOB_ERROR',
+            'BLOCK_JOB_READY',
+            'DEVICE_DELETED',
+            'DEVICE_TRAY_MOVED',
+            'NIC_RX_FILTER_CHANGED',
+            'SUSPEND',
+            'SUSPEND_DISK',
+            'WAKEUP',
+            'BALLOON_CHANGE',
+            'SPICE_MIGRATE_COMPLETED',
+            'GUEST_PANICKED',
+            'BLOCK_IMAGE_CORRUPTED' ] }
+
+##
 # @add_client
 #
 # Allow client connections for VNC, Spice and socket based
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]