chiark / gitweb /
login: introduce sd_session_get_display()
[elogind.git] / src / systemd / sd-login.h
index 7d76f9a44ed3553b635da72960e9bd13a3a7074c..2f3c90c129ec9b21c9855be874a4a3c8a1ed9525 100644 (file)
 
 #include <sys/types.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * A few points:
  *
@@ -86,6 +90,15 @@ int sd_session_get_seat(const char *session, char **seat);
 /* Determine the (PAM) service name this session was registered by. */
 int sd_session_get_service(const char *session, char **service);
 
+/* Determine the type of this session, i.e. one of "tty", "x11" or "unspecified". */
+int sd_session_get_type(const char *session, char **type);
+
+/* Determine the class of this session, i.e. one of "user", "greeter" or "lock-screen". */
+int sd_session_get_class(const char *session, char **class);
+
+/* Determine the X11 display of this session. */
+int sd_session_get_display(const char *session, char **display);
+
 /* Return active session and user of seat */
 int sd_seat_get_active(const char *seat, char **session, uid_t *uid);
 
@@ -125,4 +138,8 @@ int sd_login_monitor_flush(sd_login_monitor *m);
 /* Get FD from monitor */
 int sd_login_monitor_get_fd(sd_login_monitor *m);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif