[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/33] ui/dbus: introduce "Interfaces" properties
From: |
marcandre . lureau |
Subject: |
[PULL 20/33] ui/dbus: introduce "Interfaces" properties |
Date: |
Tue, 27 Jun 2023 15:02:17 +0200 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
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 <marcandre.lureau@redhat.com>
Message-Id: <20230606115658.677673-9-marcandre.lureau@redhat.com>
---
ui/dbus-console.c | 7 +++
ui/dbus-display1.xml | 118 ++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 123 insertions(+), 2 deletions(-)
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``.
-->
<property name="ConsoleIDs" type="au" access="read"/>
+
+ <!--
+ Interfaces:
+
+ This property lists extra interfaces provided by the
+ /org/qemu/Display1/VM object, and can be used to detect
+ the capabilities with which they are communicating.
+
+ Unlike the standard D-Bus Introspectable interface, querying this
+ property does not require parsing XML.
+
+ (earlier version of the display interface do not provide this property)
+ -->
+ <property name="Interfaces" type="as" access="read"/>
</interface>
<!--
@@ -127,12 +141,27 @@
The device address (ex: "pci/0000/02.0").
-->
<property name="DeviceAddress" type="s" access="read"/>
+
+ <!--
+ Interfaces:
+
+ This property lists extra interfaces provided by the
+ ``/org/qemu/Display1/Console_$id`` object, and can be used to detect
the
+ capabilities with which they are communicating.
+
+ Unlike the standard D-Bus Introspectable interface, querying this
+ property does not require parsing XML.
+
+ (earlier version of the display interface do not provide this property)
+ -->
+ <property name="Interfaces" type="as" access="read"/>
</interface>
<!--
org.qemu.Display1.Keyboard:
- This interface in implemented on ``/org/qemu/Display1/Console_$id`` (see
+ This interface is optionally implemented on
+ ``/org/qemu/Display1/Console_$id`` (see
:dbus:iface:`~org.qemu.Display1.Console`).
-->
<interface name="org.qemu.Display1.Keyboard">
@@ -171,7 +200,8 @@
<!--
org.qemu.Display1.Mouse:
- This interface in implemented on ``/org/qemu/Display1/Console_$id`` (see
+ This interface is optionally implemented on
+ ``/org/qemu/Display1/Console_$id`` (see
:dbus:iface:`~org.qemu.Display1.Console` documentation).
.. _dbus-button-values:
@@ -425,6 +455,20 @@
<annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
</arg>
</method>
+
+ <!--
+ Interfaces:
+
+ This property lists extra interfaces provided by the
+ /org/qemu/Display1/Listener object, and can be used to detect
+ the capabilities with which they are communicating.
+
+ Unlike the standard D-Bus Introspectable interface, querying this
+ property does not require parsing XML.
+
+ (earlier version of the display interface do not provide this property)
+ -->
+ <property name="Interfaces" type="as" access="read"/>
</interface>
<!--
@@ -522,6 +566,20 @@
<annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
</arg>
</method>
+
+ <!--
+ Interfaces:
+
+ This property lists extra interfaces provided by the
+ /org/qemu/Display1/Clipboard object, and can be used to detect
+ the capabilities with which they are communicating.
+
+ Unlike the standard D-Bus Introspectable interface, querying this
+ property does not require parsing XML.
+
+ (earlier version of the display interface do not provide this property)
+ -->
+ <property name="Interfaces" type="as" access="read"/>
</interface>
<!--
@@ -571,6 +629,20 @@
<arg type="h" name="listener" direction="in"/>
<?endif?>
</method>
+
+ <!--
+ Interfaces:
+
+ This property lists extra interfaces provided by the
+ /org/qemu/Display1/Audio object, and can be used to detect
+ the capabilities with which they are communicating.
+
+ Unlike the standard D-Bus Introspectable interface, querying this
+ property does not require parsing XML.
+
+ (earlier version of the display interface do not provide this property)
+ -->
+ <property name="Interfaces" type="as" access="read"/>
</interface>
<!--
@@ -657,6 +729,20 @@
<annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
</arg>
</method>
+
+ <!--
+ Interfaces:
+
+ This property lists extra interfaces provided by the
+ /org/qemu/Display1/AudioOutListener object, and can be used to detect
+ the capabilities with which they are communicating.
+
+ Unlike the standard D-Bus Introspectable interface, querying this
+ property does not require parsing XML.
+
+ (earlier version of the display interface do not provide this property)
+ -->
+ <property name="Interfaces" type="as" access="read"/>
</interface>
<!--
@@ -745,6 +831,20 @@
<annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
</arg>
</method>
+
+ <!--
+ Interfaces:
+
+ This property lists extra interfaces provided by the
+ /org/qemu/Display1/AudioInListener object, and can be used to detect
+ the capabilities with which they are communicating.
+
+ Unlike the standard D-Bus Introspectable interface, querying this
+ property does not require parsing XML.
+
+ (earlier version of the display interface do not provide this property)
+ -->
+ <property name="Interfaces" type="as" access="read"/>
</interface>
<!--
@@ -826,5 +926,19 @@
The D-Bus unique name of the registered handler.
-->
<property name="Owner" type="s" access="read"/>
+
+ <!--
+ Interfaces:
+
+ This property lists extra interfaces provided by the
+ ``/org/qemu/Display1/Chardev_$i`` object, and can be used to detect
+ the capabilities with which they are communicating.
+
+ Unlike the standard D-Bus Introspectable interface, querying this
+ property does not require parsing XML.
+
+ (earlier version of the display interface do not provide this property)
+ -->
+ <property name="Interfaces" type="as" access="read"/>
</interface>
</node>
--
2.41.0
- [PULL 23/33] ui/dbus: use shared memory when possible on win32, (continued)
- [PULL 23/33] ui/dbus: use shared memory when possible on win32, marcandre . lureau, 2023/06/27
- [PULL 24/33] ui: add egl-headless support on win32, marcandre . lureau, 2023/06/27
- [PULL 22/33] virtio-gpu/win32: allocate shareable 2d resources/images, marcandre . lureau, 2023/06/27
- [PULL 11/33] virtio-gpu: OUT_OF_MEMORY if failing to create udmabuf, marcandre . lureau, 2023/06/27
- [PULL 10/33] ui/gtk: set the area of the scanout texture correctly, marcandre . lureau, 2023/06/27
- [PULL 17/33] ui/dbus: win32 support, marcandre . lureau, 2023/06/27
- [PULL 20/33] ui/dbus: introduce "Interfaces" properties,
marcandre . lureau <=
- [PULL 26/33] ui: add egl_fb_read_rect(), marcandre . lureau, 2023/06/27
- [PULL 28/33] ui/dbus: add some GL traces, marcandre . lureau, 2023/06/27
- [PULL 21/33] console/win32: allocate shareable display surface, marcandre . lureau, 2023/06/27
- [PULL 25/33] ui/egl: default to GLES on windows, marcandre . lureau, 2023/06/27
- [PULL 29/33] virtio-gpu-virgl: teach it to get the QEMU EGL display, marcandre . lureau, 2023/06/27
- [PULL 27/33] ui/dbus: add GL support on win32, marcandre . lureau, 2023/06/27
- [PULL 30/33] ui/egl: query ANGLE d3d device, marcandre . lureau, 2023/06/27
- [PULL 32/33] virtio-gpu-virgl: use D3D11_SHARE_TEXTURE when available, marcandre . lureau, 2023/06/27
- [PULL 33/33] ui/dbus: use shared D3D11 Texture2D when possible, marcandre . lureau, 2023/06/27