diff options
author | Ray Strode <rstrode@redhat.com> | 2015-02-17 21:42:54 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-02-18 17:34:16 -0500 |
commit | c2769f06b55545a7a7c6217eb41ee403ef016b97 (patch) | |
tree | 7f08327d1106aa7d33bf911ad37c75a574a137e0 /daemon/gdm-session.c | |
parent | 3b6695247eb6de7330f8d1ea7ce41b94f0185cab (diff) | |
download | gdm-c2769f06b55545a7a7c6217eb41ee403ef016b97.tar.gz |
session: add way to get session id for specific conversation
Right now, the only way to find out the session id of an opened
(but not started) session is a parameter in the session-opened
handler.
This commit adds a new function
gdm_session_get_conversation_session_id that returns the session-id
for a specified opened conversation.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
Diffstat (limited to 'daemon/gdm-session.c')
-rw-r--r-- | daemon/gdm-session.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c index ef5731f6..fed26ba6 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -2814,6 +2814,23 @@ gdm_session_get_session_id (GdmSession *self) return conversation->session_id; } +const char * +gdm_session_get_conversation_session_id (GdmSession *self, + const char *service_name) +{ + GdmSessionConversation *conversation; + + g_return_val_if_fail (GDM_IS_SESSION (self), NULL); + + conversation = find_conversation_by_name (self, service_name); + + if (conversation == NULL) { + return NULL; + } + + return conversation->session_id; +} + static char * get_session_filename (GdmSession *self) { |