aboutsummaryrefslogtreecommitdiff
path: root/include/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-10-19 09:52:12 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-10-21 15:46:14 +0200
commit7477477ca7bbf42588575039edcac852fbdb1d75 (patch)
tree699c375b48d31bea6640965a733e1b42c6300e68 /include/ui
parent2e31e210a8590461d428855426a04dfa49717b51 (diff)
downloadqemu-7477477ca7bbf42588575039edcac852fbdb1d75.zip
qemu-7477477ca7bbf42588575039edcac852fbdb1d75.tar.gz
qemu-7477477ca7bbf42588575039edcac852fbdb1d75.tar.bz2
spice: add QemuSpiceOps, move migrate_info
Add QemuSpiceOps struct. This struct holds function pointers to the spice functions. It will be initialized with pointers to the stub functions. When spice gets initialized the function pointers will be re-written to the real functions. The spice stubs will move from qemu-spice.h to spice-module.c for that, because they will be needed for both "CONFIG_SPICE=n" and "CONFIG_SPICE=y but spice module not loaded" cases. This patch adds the infrastructure and starts with moving qemu_spice_migrate_info() to QemuSpiceOps. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20201019075224.14803-3-kraxel@redhat.com
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/qemu-spice-module.h5
-rw-r--r--include/ui/qemu-spice.h5
2 files changed, 5 insertions, 5 deletions
diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h
index 1af0e65..7a9963d 100644
--- a/include/ui/qemu-spice-module.h
+++ b/include/ui/qemu-spice-module.h
@@ -18,6 +18,11 @@
#ifndef QEMU_SPICE_MODULE_H
#define QEMU_SPICE_MODULE_H
+struct QemuSpiceOps {
+ int (*migrate_info)(const char *h, int p, int t, const char *s);
+};
+
extern int using_spice;
+extern struct QemuSpiceOps qemu_spice;
#endif
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index ab52378..3157016 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -60,11 +60,6 @@ static inline int qemu_spice_set_pw_expire(time_t expires)
{
return -1;
}
-static inline int qemu_spice_migrate_info(const char *h, int p, int t,
- const char *s)
-{
- return -1;
-}
static inline int qemu_spice_display_add_client(int csock, int skipauth,
int tls)