diff options
author | Ray Strode <rstrode@redhat.com> | 2013-09-16 23:42:51 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2013-09-18 21:46:52 -0400 |
commit | cd1b31a84656ad41e237543e73cfac58270e6531 (patch) | |
tree | 4eb7cfb8daa00bc49dc011f559d4790902d7e5e0 | |
parent | 7e4e7d8278c85b9b6f4730b7cd3c57c475a9f5fb (diff) | |
download | gdm-cd1b31a84656ad41e237543e73cfac58270e6531.tar.gz |
daemon: add new gdm_session_is_running method
GdmSession emits when a session is started or stopped, but doesn't
let a caller query if a session is on-going.
This commit adds API for that.
-rw-r--r-- | daemon/gdm-session.c | 6 | ||||
-rw-r--r-- | daemon/gdm-session.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c index d74bed60..f8f09670 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -2591,6 +2591,12 @@ gdm_session_request_timed_login (GdmSession *self, } gboolean +gdm_session_is_running (GdmSession *self) +{ + return self->priv->session_pid > 0; +} + +gboolean gdm_session_client_is_connected (GdmSession *self) { g_return_val_if_fail (GDM_IS_SESSION (self), FALSE); diff --git a/daemon/gdm-session.h b/daemon/gdm-session.h index 2511eca0..4faf5fc4 100644 --- a/daemon/gdm-session.h +++ b/daemon/gdm-session.h @@ -161,6 +161,7 @@ void gdm_session_request_timed_login (GdmSession *session, const char *username, int delay); gboolean gdm_session_client_is_connected (GdmSession *session); +gboolean gdm_session_is_running (GdmSession *session); G_END_DECLS |