qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: [PATCH 01/14] spice: add module helpers
Date: Mon, 19 Oct 2020 09:52:11 +0200	[thread overview]
Message-ID: <20201019075224.14803-2-kraxel@redhat.com> (raw)
In-Reply-To: <20201019075224.14803-1-kraxel@redhat.com>

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>
---
 include/ui/qemu-spice-module.h | 23 +++++++++++++++++++++++
 include/ui/qemu-spice.h        |  4 +---
 ui/spice-core.c                |  1 -
 ui/spice-module.c              | 23 +++++++++++++++++++++++
 ui/meson.build                 |  1 +
 5 files changed, 48 insertions(+), 4 deletions(-)
 create mode 100644 include/ui/qemu-spice-module.h
 create mode 100644 ui/spice-module.c

diff --git a/include/ui/qemu-spice-module.h b/include/ui/qemu-spice-module.h
new file mode 100644
index 000000000000..1af0e659a109
--- /dev/null
+++ b/include/ui/qemu-spice-module.h
@@ -0,0 +1,23 @@
+/*
+ * 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/>.
+ */
+
+#ifndef QEMU_SPICE_MODULE_H
+#define QEMU_SPICE_MODULE_H
+
+extern int using_spice;
+
+#endif
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index 0e8ec3f0d776..ab523788b9a9 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -19,14 +19,13 @@
 #define QEMU_SPICE_H
 
 #include "qapi/error.h"
+#include "ui/qemu-spice-module.h"
 
 #ifdef CONFIG_SPICE
 
 #include <spice.h>
 #include "qemu/config-file.h"
 
-extern int using_spice;
-
 void qemu_spice_init(void);
 void qemu_spice_input_init(void);
 void qemu_spice_display_init(void);
@@ -50,7 +49,6 @@ int qemu_spice_migrate_info(const char *hostname, int port, int tls_port,
 
 #include "qemu/error-report.h"
 
-#define using_spice 0
 #define spice_displays 0
 static inline int qemu_spice_set_passwd(const char *passwd,
                                         bool fail_if_connected,
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 47700b220059..a7fa5743585f 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 000000000000..f86b0ac517dc
--- /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;
diff --git a/ui/meson.build b/ui/meson.build
index 6ce814867852..fc1b31daec47 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'))
-- 
2.27.0



  reply	other threads:[~2020-10-19  7:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19  7:52 [PATCH 00/14] ui: build spice and opengl as module Gerd Hoffmann
2020-10-19  7:52 ` Gerd Hoffmann [this message]
2020-10-19  7:52 ` [PATCH 02/14] spice: add QemuSpiceOps, move migrate_info Gerd Hoffmann
2020-10-19 10:17   ` Dr. David Alan Gilbert
2020-10-19  7:52 ` [PATCH 03/14] spice: move qemu_spice_init() to QemuSpiceOps Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 04/14] spice: move display_init() " Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 05/14] spice: move add_interface() " Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 06/14] spice: move auth functions " Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 07/14] spice: move display_add_client() " Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 08/14] spice: wire up monitor in QemuSpiceOps Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 09/14] spice: load module when enabled on the cmdline Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 10/14] modules: dependencies infrastructure Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 11/14] modules: add spice dependencies Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 12/14] spice: flip modules switch Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 13/14] opengl: build egl-headless display modular Gerd Hoffmann
2020-10-19  7:52 ` [PATCH 14/14] opengl: build opengl helper code modular Gerd Hoffmann
2020-10-20  9:59 ` [PATCH 00/14] ui: build spice and opengl as module Marc-André Lureau
2020-10-26 16:27 ` Bruce Rogers
2020-10-27  5:58   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201019075224.14803-2-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).