aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-10-19 09:52:11 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-10-21 15:46:14 +0200
commit2e31e210a8590461d428855426a04dfa49717b51 (patch)
treea7016d36f947028efcf3f8a1341d66c837bffdae /ui
parent4c41341af76cfc85b5a6c0f87de4838672ab9f89 (diff)
spice: add module helpers
Add new spice-module.c + qemu-spice-module.h files. The code needed to support modular spice will be there. For starters this will be only the using_spice variable, more will follow ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20201019075224.14803-2-kraxel@redhat.com
Diffstat (limited to 'ui')
-rw-r--r--ui/meson.build1
-rw-r--r--ui/spice-core.c1
-rw-r--r--ui/spice-module.c23
3 files changed, 24 insertions, 1 deletions
diff --git a/ui/meson.build b/ui/meson.build
index ab4de98b38..e89e298643 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -12,6 +12,7 @@ softmmu_ss.add(files(
'keymaps.c',
'qemu-pixman.c',
))
+softmmu_ss.add([spice_headers, files('spice-module.c')])
softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c'))
softmmu_ss.add(when: [spice, 'CONFIG_SPICE'], if_true: files('spice-core.c', 'spice-input.c', 'spice-display.c'))
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 47700b2200..a7fa574358 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -48,7 +48,6 @@ static time_t auth_expires = TIME_MAX;
static int spice_migration_completed;
static int spice_display_is_running;
static int spice_have_target_host;
-int using_spice = 0;
static QemuThread me;
diff --git a/ui/spice-module.c b/ui/spice-module.c
new file mode 100644
index 0000000000..f86b0ac517
--- /dev/null
+++ b/ui/spice-module.c
@@ -0,0 +1,23 @@
+/*
+ * spice module support, also spice stubs.
+ *
+ * Copyright (C) 2010 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 or
+ * (at your option) version 3 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "qemu/osdep.h"
+#include "ui/qemu-spice-module.h"
+
+int using_spice;