backends/remote-desktop-session: Add API to release mapping ids

The remote desktop session currently provides a mechanism to acquire
mapping ids.
However, when they are not used anymore, they currently cannot be
removed and thus just linger around.

So, add an API to release these acquired ids.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3273>
This commit is contained in:
Pascal Nowack 2023-09-12 13:09:45 +02:00
parent e056ce0ea3
commit 3461e1e18c
2 changed files with 10 additions and 0 deletions

View File

@ -567,6 +567,13 @@ meta_remote_desktop_session_acquire_mapping_id (MetaRemoteDesktopSession *sessio
} }
} }
void
meta_remote_desktop_session_release_mapping_id (MetaRemoteDesktopSession *session,
const char *mapping_id)
{
g_hash_table_remove (session->mapping_ids, mapping_id);
}
static gboolean static gboolean
check_permission (MetaRemoteDesktopSession *session, check_permission (MetaRemoteDesktopSession *session,
GDBusMethodInvocation *invocation) GDBusMethodInvocation *invocation)

View File

@ -44,6 +44,9 @@ gboolean meta_remote_desktop_session_register_screen_cast (MetaRemoteDesktopSess
const char * meta_remote_desktop_session_acquire_mapping_id (MetaRemoteDesktopSession *session); const char * meta_remote_desktop_session_acquire_mapping_id (MetaRemoteDesktopSession *session);
void meta_remote_desktop_session_release_mapping_id (MetaRemoteDesktopSession *session,
const char *mapping_id);
void meta_remote_desktop_session_request_transfer (MetaRemoteDesktopSession *session, void meta_remote_desktop_session_request_transfer (MetaRemoteDesktopSession *session,
const char *mime_type, const char *mime_type,
GTask *task); GTask *task);