[gdm/wip/wayland-rebase: 4/12] daemon: add new gdm_session_is_running method



commit 115ad6a455001ec5a0d9e29291174204c704f9d5
Author: Ray Strode <rstrode redhat com>
Date:   Mon Sep 16 23:42:51 2013 -0400

    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.

 daemon/gdm-session.c |    6 ++++++
 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 4668f72..7beb8a3 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2568,6 +2568,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 9b17dc1..33ff43a 100644
--- a/daemon/gdm-session.h
+++ b/daemon/gdm-session.h
@@ -160,6 +160,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
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]