aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-06-06 15:56:40 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-06-27 17:08:56 +0200
commit29c5c7e5f65977a77eddf6580fdc31ea4a263a6a (patch)
tree33ad97af5f6909a6996ca762ddf952d53c0f2d25 /ui
parent1d48c9fd8e4ab55662d8daec4af1d63cd2b54699 (diff)
downloadqemu-29c5c7e5f65977a77eddf6580fdc31ea4a263a6a.zip
qemu-29c5c7e5f65977a77eddf6580fdc31ea4a263a6a.tar.gz
qemu-29c5c7e5f65977a77eddf6580fdc31ea4a263a6a.tar.bz2
ui/dbus: compile without gio/gunixfdlist.h
D-Bus on windows doesn't support fd-passing. Let's isolate the fdlist-related code as a first step, before adding Windows support, using another mechanism. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230606115658.677673-4-marcandre.lureau@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/dbus-chardev.c6
-rw-r--r--ui/dbus-console.c8
-rw-r--r--ui/dbus-listener.c2
3 files changed, 16 insertions, 0 deletions
diff --git a/ui/dbus-chardev.c b/ui/dbus-chardev.c
index 940ef93..7154d81 100644
--- a/ui/dbus-chardev.c
+++ b/ui/dbus-chardev.c
@@ -27,7 +27,9 @@
#include "qemu/config-file.h"
#include "qemu/option.h"
+#ifdef G_OS_UNIX
#include <gio/gunixfdlist.h>
+#endif
#include "dbus.h"
@@ -108,6 +110,7 @@ dbus_chardev_init(DBusDisplay *dpy)
dbus_display_chardev_foreach, dpy);
}
+#ifdef G_OS_UNIX
static gboolean
dbus_chr_register(
DBusChardev *dc,
@@ -145,6 +148,7 @@ dbus_chr_register(
qemu_dbus_display1_chardev_complete_register(object, invocation, NULL);
return DBUS_METHOD_INVOCATION_HANDLED;
}
+#endif
static gboolean
dbus_chr_send_break(
@@ -175,8 +179,10 @@ dbus_chr_open(Chardev *chr, ChardevBackend *backend,
dc->iface = qemu_dbus_display1_chardev_skeleton_new();
g_object_set(dc->iface, "name", backend->u.dbus.data->name, NULL);
g_object_connect(dc->iface,
+#ifdef G_OS_UNIX
"swapped-signal::handle-register",
dbus_chr_register, dc,
+#endif
"swapped-signal::handle-send-break",
dbus_chr_send_break, dc,
NULL);
diff --git a/ui/dbus-console.c b/ui/dbus-console.c
index bc97614..d5f6c93 100644
--- a/ui/dbus-console.c
+++ b/ui/dbus-console.c
@@ -28,7 +28,9 @@
#include "ui/kbd-state.h"
#include "trace.h"
+#ifdef G_OS_UNIX
#include <gio/gunixfdlist.h>
+#endif
#include "dbus.h"
@@ -163,6 +165,7 @@ dbus_display_console_class_init(DBusDisplayConsoleClass *klass)
gobject_class->dispose = dbus_display_console_dispose;
}
+#ifdef G_OS_UNIX
static void
listener_vanished_cb(DBusDisplayListener *listener)
{
@@ -174,6 +177,7 @@ listener_vanished_cb(DBusDisplayListener *listener)
g_hash_table_remove(ddc->listeners, name);
qkbd_state_lift_all_keys(ddc->kbd);
}
+#endif
static gboolean
dbus_console_set_ui_info(DBusDisplayConsole *ddc,
@@ -207,6 +211,7 @@ dbus_console_set_ui_info(DBusDisplayConsole *ddc,
return DBUS_METHOD_INVOCATION_HANDLED;
}
+#ifdef G_OS_UNIX
static gboolean
dbus_console_register_listener(DBusDisplayConsole *ddc,
GDBusMethodInvocation *invocation,
@@ -282,6 +287,7 @@ dbus_console_register_listener(DBusDisplayConsole *ddc,
trace_dbus_registered_listener(sender);
return DBUS_METHOD_INVOCATION_HANDLED;
}
+#endif
static gboolean
dbus_kbd_press(DBusDisplayConsole *ddc,
@@ -510,8 +516,10 @@ dbus_display_console_new(DBusDisplay *display, QemuConsole *con)
"device-address", device_addr,
NULL);
g_object_connect(ddc->iface,
+#ifdef G_OS_UNIX
"swapped-signal::handle-register-listener",
dbus_console_register_listener, ddc,
+#endif
"swapped-signal::handle-set-uiinfo",
dbus_console_set_ui_info, ddc,
NULL);
diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c
index 23034ee..41597a0 100644
--- a/ui/dbus-listener.c
+++ b/ui/dbus-listener.c
@@ -25,7 +25,9 @@
#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
#include "dbus.h"
+#ifdef G_OS_UNIX
#include <gio/gunixfdlist.h>
+#endif
#ifdef CONFIG_OPENGL
#include "ui/shader.h"