@samitouri / QOSamiQemu / commits / 8805844280

monitor: Reduce inclusion of 'qapi/qapi-emit-events.h' header

"monitor/monitor.h" don't use anything declared in the generated "qapi/qapi-emit-events.h" header. However the "monitor/monitor-internal.h" do: 107 struct MonitorClass { ... 116 /* 117 * If non-NULL, the monitor is able to send event 118 * notifications back to the client 119 */ 120 void (*emit_event)(Monitor *mon, QAPIEvent event, QDict *qdict); ^^^^^^^^^ Move the header inclusion to "monitor/monitor-internal.h" to avoid including / re-exposing unnecessary declarations in the global "monitor/monitor.h" header. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260812211708.92824-11-philmd@oss.qualcomm.com>

Philippe Mathieu-Daudé committed Aug 12, 2026 at 11:27 UTC 880584428002db3b5db3c24d3e5e2d59da9f32cb
2 files changed +1 -1
include/monitor/monitor.h
-1
@@ -3,7 +3,6 @@
3
4 #include "block/block.h"
5 #include "qapi/qapi-types-misc.h"
6 -#include "qapi/qapi-emit-events.h"
6 #include "qemu/coroutine-core.h"
7 #include "qemu/readline.h"
8 #include "exec/hwaddr.h"
monitor/monitor-internal.h
+1
@@ -27,6 +27,7 @@
27
28 #include "chardev/char-fe.h"
29 #include "monitor/monitor.h"
30 +#include "qapi/qapi-emit-events.h"
31 #include "qapi/qapi-types-control.h"
32 #include "qapi/qapi-types-qom.h"
33 #include "qapi/qmp-registry.h"