remote-desktop, screen-cast: Add version number to D-Bus APIs
In order to let applications gracefully handle version mismatches, add a version property to the APIs. Also add a warning on the APIs that these are not meant for public consumption.
This commit is contained in:
parent
8dd377da38
commit
e502adfa04
@ -42,6 +42,7 @@
|
||||
|
||||
#define META_REMOTE_DESKTOP_DBUS_SERVICE "org.gnome.Mutter.RemoteDesktop"
|
||||
#define META_REMOTE_DESKTOP_DBUS_PATH "/org/gnome/Mutter/RemoteDesktop"
|
||||
#define META_REMOTE_DESKTOP_API_VERSION 1
|
||||
|
||||
typedef enum _MetaRemoteDesktopDeviceTypes
|
||||
{
|
||||
@ -262,6 +263,9 @@ meta_remote_desktop_init (MetaRemoteDesktop *remote_desktop)
|
||||
meta_dbus_remote_desktop_set_supported_device_types (
|
||||
META_DBUS_REMOTE_DESKTOP (remote_desktop),
|
||||
calculate_supported_device_types ());
|
||||
meta_dbus_remote_desktop_set_version (
|
||||
META_DBUS_REMOTE_DESKTOP (remote_desktop),
|
||||
META_REMOTE_DESKTOP_API_VERSION);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#define META_SCREEN_CAST_DBUS_SERVICE "org.gnome.Mutter.ScreenCast"
|
||||
#define META_SCREEN_CAST_DBUS_PATH "/org/gnome/Mutter/ScreenCast"
|
||||
#define META_SCREEN_CAST_API_VERSION 1
|
||||
|
||||
struct _MetaScreenCast
|
||||
{
|
||||
@ -264,6 +265,9 @@ meta_screen_cast_init (MetaScreenCast *screen_cast)
|
||||
pw_init (NULL, NULL);
|
||||
is_pipewire_initialized = TRUE;
|
||||
}
|
||||
|
||||
meta_dbus_screen_cast_set_version (META_DBUS_SCREEN_CAST (screen_cast),
|
||||
META_SCREEN_CAST_API_VERSION);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -6,6 +6,10 @@
|
||||
<!--
|
||||
org.gnome.Mutter.RemoteDesktop:
|
||||
@short_description: Remote desktop interface
|
||||
|
||||
This API is private and not intended to be used outside of the integrated
|
||||
system that uses libmutter. No compatibility between versions are
|
||||
promised.
|
||||
-->
|
||||
<interface name="org.gnome.Mutter.RemoteDesktop">
|
||||
|
||||
@ -28,6 +32,12 @@
|
||||
-->
|
||||
<property name="SupportedDeviceTypes" type="u" access="read" />
|
||||
|
||||
<!--
|
||||
Version:
|
||||
@short_description: API version
|
||||
-->
|
||||
<property name="Version" type="i" access="read" />
|
||||
|
||||
</interface>
|
||||
|
||||
<!--
|
||||
|
@ -6,6 +6,10 @@
|
||||
<!--
|
||||
org.gnome.Mutter.ScreenCast:
|
||||
@short_description: Screen cast interface
|
||||
|
||||
This API is private and not intended to be used outside of the integrated
|
||||
system that uses libmutter. No compatibility between versions are
|
||||
promised.
|
||||
-->
|
||||
<interface name="org.gnome.Mutter.ScreenCast">
|
||||
|
||||
@ -24,6 +28,12 @@
|
||||
<arg name="session_path" type="o" direction="out" />
|
||||
</method>
|
||||
|
||||
<!--
|
||||
Version:
|
||||
@short_description: API version
|
||||
-->
|
||||
<property name="Version" type="i" access="read" />
|
||||
|
||||
</interface>
|
||||
|
||||
<!--
|
||||
|
Loading…
Reference in New Issue
Block a user