mirror of
https://github.com/brl/mutter.git
synced 2025-08-07 09:04:41 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user