root / monitor.h @ 124964b5
History | View | Annotate | Download (1.5 kB)
1 | 376253ec | aliguori | #ifndef MONITOR_H
|
---|---|---|---|
2 | 376253ec | aliguori | #define MONITOR_H
|
3 | 376253ec | aliguori | |
4 | 376253ec | aliguori | #include "qemu-common.h" |
5 | 376253ec | aliguori | #include "qemu-char.h" |
6 | d6f46833 | Markus Armbruster | #include "qerror.h" |
7 | cdb0def3 | Luiz Capitulino | #include "qdict.h" |
8 | 376253ec | aliguori | #include "block.h" |
9 | 376253ec | aliguori | |
10 | 376253ec | aliguori | extern Monitor *cur_mon;
|
11 | 8631b608 | Markus Armbruster | extern Monitor *default_mon;
|
12 | 376253ec | aliguori | |
13 | 731b0364 | aliguori | /* flags for monitor_init */
|
14 | 731b0364 | aliguori | #define MONITOR_IS_DEFAULT 0x01 |
15 | cde76ee1 | aliguori | #define MONITOR_USE_READLINE 0x02 |
16 | 418173c7 | Luiz Capitulino | #define MONITOR_USE_CONTROL 0x04 |
17 | 731b0364 | aliguori | |
18 | 0d1ea871 | Luiz Capitulino | /* QMP events */
|
19 | 0d1ea871 | Luiz Capitulino | typedef enum MonitorEvent { |
20 | 242cd003 | Blue Swirl | QEVENT_SHUTDOWN, |
21 | 242cd003 | Blue Swirl | QEVENT_RESET, |
22 | 242cd003 | Blue Swirl | QEVENT_POWERDOWN, |
23 | 242cd003 | Blue Swirl | QEVENT_STOP, |
24 | 6ed2c484 | Luiz Capitulino | QEVENT_RESUME, |
25 | 586153d9 | Luiz Capitulino | QEVENT_VNC_CONNECTED, |
26 | 0d2ed46a | Luiz Capitulino | QEVENT_VNC_INITIALIZED, |
27 | 0d72f3d3 | Luiz Capitulino | QEVENT_VNC_DISCONNECTED, |
28 | aa1db6ed | Luiz Capitulino | QEVENT_BLOCK_IO_ERROR, |
29 | 80cd3478 | Luiz Capitulino | QEVENT_RTC_CHANGE, |
30 | 9eedeb3b | Luiz Capitulino | QEVENT_WATCHDOG, |
31 | 242cd003 | Blue Swirl | QEVENT_MAX, |
32 | 0d1ea871 | Luiz Capitulino | } MonitorEvent; |
33 | 0d1ea871 | Luiz Capitulino | |
34 | 6620d3ce | Markus Armbruster | int monitor_cur_is_qmp(void); |
35 | 6620d3ce | Markus Armbruster | |
36 | 0d1ea871 | Luiz Capitulino | void monitor_protocol_event(MonitorEvent event, QObject *data);
|
37 | 731b0364 | aliguori | void monitor_init(CharDriverState *chr, int flags); |
38 | 376253ec | aliguori | |
39 | cde76ee1 | aliguori | int monitor_suspend(Monitor *mon);
|
40 | 376253ec | aliguori | void monitor_resume(Monitor *mon);
|
41 | 376253ec | aliguori | |
42 | 0bbc47bb | Luiz Capitulino | int monitor_read_bdrv_key_start(Monitor *mon, BlockDriverState *bs,
|
43 | 0bbc47bb | Luiz Capitulino | BlockDriverCompletionFunc *completion_cb, |
44 | 0bbc47bb | Luiz Capitulino | void *opaque);
|
45 | 376253ec | aliguori | |
46 | 7768e04c | Mark McLoughlin | int monitor_get_fd(Monitor *mon, const char *fdname); |
47 | 7768e04c | Mark McLoughlin | |
48 | 376253ec | aliguori | void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap); |
49 | 376253ec | aliguori | void monitor_printf(Monitor *mon, const char *fmt, ...) |
50 | 376253ec | aliguori | __attribute__ ((__format__ (__printf__, 2, 3))); |
51 | 376253ec | aliguori | void monitor_print_filename(Monitor *mon, const char *filename); |
52 | 376253ec | aliguori | void monitor_flush(Monitor *mon);
|
53 | 376253ec | aliguori | |
54 | 940cc30d | Adam Litke | typedef void (MonitorCompletion)(void *opaque, QObject *ret_data); |
55 | 940cc30d | Adam Litke | |
56 | d6f46833 | Markus Armbruster | void monitor_set_error(Monitor *mon, QError *qerror);
|
57 | d6f46833 | Markus Armbruster | |
58 | 376253ec | aliguori | #endif /* !MONITOR_H */ |