spice: wire up monitor in QemuSpiceOps.

Rename qmp_query_spice() to qmp_query_spice_real(), add to QemuSpiceOps.

Add new qmp_query_spice() function which calls the real function via
QemuSpiceOps if available, otherwise return SpiceInfo.enabled = false.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20201019075224.14803-9-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann 2020-10-19 09:52:18 +02:00
parent 864a024c69
commit db5732c9cf
3 changed files with 22 additions and 1 deletions

View file

@ -22,6 +22,8 @@
#include <spice.h>
#endif
typedef struct SpiceInfo SpiceInfo;
struct QemuSpiceOps {
void (*init)(void);
void (*display_init)(void);
@ -32,6 +34,7 @@ struct QemuSpiceOps {
int (*display_add_client)(int csock, int skipauth, int tls);
#ifdef CONFIG_SPICE
int (*add_interface)(SpiceBaseInstance *sin);
SpiceInfo* (*qmp_query)(Error **errp);
#endif
};