]>
Commit | Line | Data |
---|---|---|
376253ec AL |
1 | #ifndef MONITOR_H |
2 | #define MONITOR_H | |
3 | ||
4 | #include "qemu-common.h" | |
5 | #include "qemu-char.h" | |
cdb0def3 | 6 | #include "qdict.h" |
376253ec AL |
7 | #include "block.h" |
8 | ||
9 | extern Monitor *cur_mon; | |
10 | ||
731b0364 AL |
11 | /* flags for monitor_init */ |
12 | #define MONITOR_IS_DEFAULT 0x01 | |
cde76ee1 | 13 | #define MONITOR_USE_READLINE 0x02 |
418173c7 | 14 | #define MONITOR_USE_CONTROL 0x04 |
731b0364 | 15 | |
0d1ea871 LC |
16 | /* QMP events */ |
17 | typedef enum MonitorEvent { | |
242cd003 BS |
18 | QEVENT_DEBUG, |
19 | QEVENT_SHUTDOWN, | |
20 | QEVENT_RESET, | |
21 | QEVENT_POWERDOWN, | |
22 | QEVENT_STOP, | |
586153d9 | 23 | QEVENT_VNC_CONNECTED, |
0d2ed46a | 24 | QEVENT_VNC_INITIALIZED, |
0d72f3d3 | 25 | QEVENT_VNC_DISCONNECTED, |
aa1db6ed | 26 | QEVENT_BLOCK_IO_ERROR, |
242cd003 | 27 | QEVENT_MAX, |
0d1ea871 LC |
28 | } MonitorEvent; |
29 | ||
30 | void monitor_protocol_event(MonitorEvent event, QObject *data); | |
731b0364 | 31 | void monitor_init(CharDriverState *chr, int flags); |
376253ec | 32 | |
cde76ee1 | 33 | int monitor_suspend(Monitor *mon); |
376253ec AL |
34 | void monitor_resume(Monitor *mon); |
35 | ||
36 | void monitor_read_bdrv_key_start(Monitor *mon, BlockDriverState *bs, | |
37 | BlockDriverCompletionFunc *completion_cb, | |
38 | void *opaque); | |
39 | ||
7768e04c MM |
40 | int monitor_get_fd(Monitor *mon, const char *fdname); |
41 | ||
376253ec AL |
42 | void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap); |
43 | void monitor_printf(Monitor *mon, const char *fmt, ...) | |
44 | __attribute__ ((__format__ (__printf__, 2, 3))); | |
45 | void monitor_print_filename(Monitor *mon, const char *filename); | |
46 | void monitor_flush(Monitor *mon); | |
47 | ||
940cc30d AL |
48 | typedef void (MonitorCompletion)(void *opaque, QObject *ret_data); |
49 | ||
376253ec | 50 | #endif /* !MONITOR_H */ |