From: Marc-André Lureau Date: Tue, 6 Jun 2023 11:56:45 +0000 (+0400) Subject: ui/dbus: introduce "Interfaces" properties X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=439e0164cd83bf50095e6f66bb036b43a65a68b6;p=qemu.git ui/dbus: introduce "Interfaces" properties This property is similar to ``org.freedesktop.DBus.Interfaces`` property on the bus interface: it's an array of strings listing the extra interfaces and capabilities available, in a convenient way. Most interfaces are implicit, as they are required. For ``org/qemu/Display1_$id``, we can list the Keyboard And Mouse interfaces. Those could be optional. Signed-off-by: Marc-André Lureau Message-Id: <20230606115658.677673-9-marcandre.lureau@redhat.com> --- diff --git a/ui/dbus-console.c b/ui/dbus-console.c index 4a1c1fb55e..aaa9d3b0b3 100644 --- a/ui/dbus-console.c +++ b/ui/dbus-console.c @@ -537,6 +537,12 @@ dbus_display_console_new(DBusDisplay *display, QemuConsole *con) char device_addr[256] = ""; DBusDisplayConsole *ddc; int idx, i; + const char *interfaces[] = { + "org.qemu.Display1.Keyboard", + "org.qemu.Display1.Mouse", + "org.qemu.Display1.MultiTouch", + NULL + }; assert(display); assert(con); @@ -561,6 +567,7 @@ dbus_display_console_new(DBusDisplay *display, QemuConsole *con) "width", qemu_console_get_width(con, 0), "height", qemu_console_get_height(con, 0), "device-address", device_addr, + "interfaces", interfaces, NULL); g_object_connect(ddc->iface, "swapped-signal::handle-register-listener", diff --git a/ui/dbus-display1.xml b/ui/dbus-display1.xml index cd596f774e..06e8779c04 100644 --- a/ui/dbus-display1.xml +++ b/ui/dbus-display1.xml @@ -26,6 +26,20 @@ The list of consoles available on ``/org/qemu/Display1/Console_$id``. --> + + + + + + @@ -171,7 +200,8 @@ + + + + + + + +