dbus-session: Rename client_vanished() to close()
This means the MetaDbusSession interface takes a more active role instead of being something that more or less sends signals to the interface implementor. This will allow better control when using MetaDbusSession to manage these sessions, instead of their non-abstract variants. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2713>
This commit is contained in:
@ -130,9 +130,10 @@ meta_screen_cast_session_is_active (MetaScreenCastSession *session)
|
||||
return session->is_active;
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_cast_session_close (MetaScreenCastSession *session)
|
||||
static void
|
||||
meta_screen_cast_session_close (MetaDbusSession *dbus_session)
|
||||
{
|
||||
MetaScreenCastSession *session = META_SCREEN_CAST_SESSION (dbus_session);
|
||||
MetaDBusScreenCastSession *skeleton = META_DBUS_SCREEN_CAST_SESSION (session);
|
||||
|
||||
session->is_active = FALSE;
|
||||
@ -287,7 +288,7 @@ handle_stop (MetaDBusScreenCastSession *skeleton,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
meta_screen_cast_session_close (session);
|
||||
meta_dbus_session_close (META_DBUS_SESSION (session));
|
||||
|
||||
meta_dbus_screen_cast_session_complete_stop (skeleton, invocation);
|
||||
|
||||
@ -298,7 +299,7 @@ static void
|
||||
on_stream_closed (MetaScreenCastStream *stream,
|
||||
MetaScreenCastSession *session)
|
||||
{
|
||||
meta_screen_cast_session_close (session);
|
||||
meta_dbus_session_close (META_DBUS_SESSION (session));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -710,16 +711,10 @@ meta_screen_cast_session_init_iface (MetaDBusScreenCastSessionIface *iface)
|
||||
iface->handle_record_virtual = handle_record_virtual;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_screen_cast_session_client_vanished (MetaDbusSession *dbus_session)
|
||||
{
|
||||
meta_screen_cast_session_close (META_SCREEN_CAST_SESSION (dbus_session));
|
||||
}
|
||||
|
||||
static void
|
||||
meta_dbus_session_init_iface (MetaDbusSessionInterface *iface)
|
||||
{
|
||||
iface->client_vanished = meta_screen_cast_session_client_vanished;
|
||||
iface->close = meta_screen_cast_session_close;
|
||||
}
|
||||
|
||||
MetaScreenCastSession *
|
||||
@ -822,7 +817,7 @@ meta_screen_cast_session_handle_stop (MetaRemoteAccessHandle *handle)
|
||||
if (!session)
|
||||
return;
|
||||
|
||||
meta_screen_cast_session_close (session);
|
||||
meta_dbus_session_close (META_DBUS_SESSION (session));
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user