dbus-session: Add get_id() vfunc

It's currently not set by anything, and will only be used by
non-abstract implementations of a future D-Bus interface session
manager. When interface implementations gets ported to this new type,
their MetaDbusSession implementations will set this vfunc.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2713>
This commit is contained in:
Jonas Ådahl 2022-03-11 00:37:11 +01:00 committed by Marge Bot
parent 7874bea068
commit 10043c7c11
2 changed files with 9 additions and 0 deletions

View File

@ -231,3 +231,9 @@ meta_dbus_session_close (MetaDbusSession *session)
{ {
META_DBUS_SESSION_GET_IFACE (session)->close (session); META_DBUS_SESSION_GET_IFACE (session)->close (session);
} }
const char *
meta_dbus_session_get_id (MetaDbusSession *session)
{
return META_DBUS_SESSION_GET_IFACE (session)->get_id (session);
}

View File

@ -35,6 +35,7 @@ struct _MetaDbusSessionInterface
GTypeInterface parent_iface; GTypeInterface parent_iface;
void (* close) (MetaDbusSession *session); void (* close) (MetaDbusSession *session);
const char * (* get_id) (MetaDbusSession *session);
}; };
#define META_TYPE_DBUS_SESSION_WATCHER (meta_dbus_session_watcher_get_type ()) #define META_TYPE_DBUS_SESSION_WATCHER (meta_dbus_session_watcher_get_type ())
@ -51,4 +52,6 @@ void meta_dbus_session_notify_closed (MetaDbusSession *session);
void meta_dbus_session_close (MetaDbusSession *session); void meta_dbus_session_close (MetaDbusSession *session);
const char * meta_dbus_session_get_id (MetaDbusSession *session);
#endif /* META_DBUS_SESSION_WATCHER_H */ #endif /* META_DBUS_SESSION_WATCHER_H */