aboutsummaryrefslogtreecommitdiff
path: root/monitor/monitor-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'monitor/monitor-internal.h')
-rw-r--r--monitor/monitor-internal.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h
index ebaf020..d859bd3 100644
--- a/monitor/monitor-internal.h
+++ b/monitor/monitor-internal.h
@@ -31,6 +31,7 @@
#include "qapi/qmp/dispatch.h"
#include "qapi/qmp/json-parser.h"
#include "qemu/readline.h"
+#include "sysemu/iothread.h"
/*
* Supported types:
@@ -142,4 +143,33 @@ typedef struct {
GQueue *qmp_requests;
} MonitorQMP;
+/**
+ * Is @mon a QMP monitor?
+ */
+static inline bool monitor_is_qmp(const Monitor *mon)
+{
+ return mon->flags & MONITOR_USE_CONTROL;
+}
+
+typedef QTAILQ_HEAD(MonitorList, Monitor) MonitorList;
+extern IOThread *mon_iothread;
+extern QEMUBH *qmp_dispatcher_bh;
+extern QmpCommandList qmp_commands, qmp_cap_negotiation_commands;
+extern QemuMutex monitor_lock;
+extern MonitorList mon_list;
+extern int mon_refcount;
+
+void monitor_init_qmp(Chardev *chr, int flags);
+
+int monitor_puts(Monitor *mon, const char *str);
+void monitor_data_init(Monitor *mon, int flags, bool skip_flush,
+ bool use_io_thread);
+int monitor_can_read(void *opaque);
+void monitor_list_append(Monitor *mon);
+void monitor_fdsets_cleanup(void);
+
+void qmp_send_response(MonitorQMP *mon, const QDict *rsp);
+void monitor_data_destroy_qmp(MonitorQMP *mon);
+void monitor_qmp_bh_dispatcher(void *data);
+
#endif