@@ -335,3 +335,18 @@ Example:
"len": 10737418240, "offset": 134217728,
"speed": 0 },
"timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
+
+SCREEN_DUMP_COMPLETE
+--------------------
+
+Emitted when screen-dump-async completes.
+
+Data:
+
+- "filename": Name of file containing screen dump (json-string)
+
+Example:
+
+{ "event": "SCREEN_DUMP_COMPLETE",
+ "data": { "filename": "/tmp/a.ppm" },
+ "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
@@ -24,6 +24,8 @@
#include "qemu-common.h"
#include "console.h"
#include "qemu-timer.h"
+#include "qjson.h"
+#include "monitor.h"
//#define DEBUG_CONSOLE
#define DEFAULT_BACKSCROLL 512
@@ -1707,3 +1709,12 @@ PixelFormat qemu_default_pixelformat(int bpp)
}
return pf;
}
+
+void monitor_protocol_screen_dump_complete_event(const char *filename)
+{
+ QObject *event_data;
+
+ event_data = qobject_from_jsonf("{ 'filename': %s }", filename);
+ monitor_protocol_event(QEVENT_SCREEN_DUMP_COMPLETE, event_data);
+ qobject_decref(event_data);
+}
@@ -353,6 +353,7 @@ void vga_hw_update(void);
void vga_hw_invalidate(void);
void vga_hw_screen_dump(const char *filename);
void vga_hw_text_update(console_ch_t *chardata);
+void monitor_protocol_screen_dump_complete_event(const char *filename);
int is_graphic_console(void);
int is_fixedsize_console(void);
@@ -493,6 +493,8 @@ void monitor_protocol_event(MonitorEvent event, QObject *data)
break;
case QEVENT_WAKEUP:
event_name = "WAKEUP";
+ case QEVENT_SCREEN_DUMP_COMPLETE:
+ event_name = "SCREEN_DUMP_COMPLETE";
break;
default:
abort();
@@ -41,6 +41,7 @@ typedef enum MonitorEvent {
QEVENT_DEVICE_TRAY_MOVED,
QEVENT_SUSPEND,
QEVENT_WAKEUP,
+ QEVENT_SCREEN_DUMP_COMPLETE,
QEVENT_MAX,
} MonitorEvent;
Signed-off-by: Alon Levy <alevy@redhat.com> --- QMP/qmp-events.txt | 15 +++++++++++++++ console.c | 11 +++++++++++ console.h | 1 + monitor.c | 2 ++ monitor.h | 1 + 5 files changed, 30 insertions(+), 0 deletions(-)