diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-06-06 15:56:40 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-06-27 17:08:56 +0200 |
commit | 29c5c7e5f65977a77eddf6580fdc31ea4a263a6a (patch) | |
tree | 33ad97af5f6909a6996ca762ddf952d53c0f2d25 /audio | |
parent | 1d48c9fd8e4ab55662d8daec4af1d63cd2b54699 (diff) |
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 'audio')
-rw-r--r-- | audio/dbusaudio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/audio/dbusaudio.c b/audio/dbusaudio.c index fece74f78c..de59467d9e 100644 --- a/audio/dbusaudio.c +++ b/audio/dbusaudio.c @@ -29,7 +29,10 @@ #include "qemu/timer.h" #include "qemu/dbus.h" +#ifdef G_OS_UNIX #include <gio/gunixfdlist.h> +#endif + #include "ui/dbus-display1.h" #define AUDIO_CAP "dbus" @@ -419,6 +422,7 @@ dbus_audio_fini(void *opaque) g_free(da); } +#ifdef G_OS_UNIX static void listener_out_vanished_cb(GDBusConnection *connection, gboolean remote_peer_vanished, @@ -591,6 +595,7 @@ dbus_audio_register_in_listener(AudioState *s, return dbus_audio_register_listener(s, invocation, fd_list, arg_listener, false); } +#endif static void dbus_audio_set_server(AudioState *s, GDBusObjectManagerServer *server, bool p2p) @@ -605,12 +610,14 @@ dbus_audio_set_server(AudioState *s, GDBusObjectManagerServer *server, bool p2p) da->audio = g_dbus_object_skeleton_new(DBUS_DISPLAY1_AUDIO_PATH); da->iface = qemu_dbus_display1_audio_skeleton_new(); +#ifdef G_OS_UNIX g_object_connect(da->iface, "swapped-signal::handle-register-in-listener", dbus_audio_register_in_listener, s, "swapped-signal::handle-register-out-listener", dbus_audio_register_out_listener, s, NULL); +#endif g_dbus_object_skeleton_add_interface(G_DBUS_OBJECT_SKELETON(da->audio), G_DBUS_INTERFACE_SKELETON(da->iface)); |