On 2/12/22 11:05, Markus Armbruster wrote:
Signed-off-by: Markus Armbruster <arm...@redhat.com> --- include/monitor/qmp-helpers.h | 26 ++++++++++++ monitor/qmp-cmds.c | 74 ++++++++++++++++------------------- ui/ui-qmp-cmds.c | 41 +++++++++++++++++++ 3 files changed, 100 insertions(+), 41 deletions(-) create mode 100644 include/monitor/qmp-helpers.h
@@ -174,54 +172,48 @@ void qmp_add_client(const char *protocol, const char *fdname, bool has_skipauth, bool skipauth, bool has_tls, bool tls, Error **errp) { + static struct {
const.
+ const char *name; + bool (*add_client)(int fd, bool has_skipauth, bool skipauth, + bool has_tls, bool tls, Error **errp); + } protocol_table[] = { + { "spice", qmp_add_client_spice }, +#ifdef CONFIG_VNC + { "vnc", qmp_add_client_vnc }, +#endif +#ifdef CONFIG_DBUS_DISPLAY + { "@dbus-display", qmp_add_client_dbus_display }, +#endif + };
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>