summaryrefslogtreecommitdiff
path: root/src/systemd/sd-login.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-05-19 09:33:20 +0900
committerLennart Poettering <lennart@poettering.net>2014-05-19 09:33:20 +0900
commita077b666cb883213fd85be21b518c2de54cb70b1 (patch)
treeced168d59b0cc21e8932b08a40a928db5708e012 /src/systemd/sd-login.h
parent952d32609f9bceee444fa2690afb4d28539b4b92 (diff)
downloadsystemd-a077b666cb883213fd85be21b518c2de54cb70b1.tar.gz
sd-login: add C API to query primary session of a user
Diffstat (limited to 'src/systemd/sd-login.h')
-rw-r--r--src/systemd/sd-login.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/systemd/sd-login.h b/src/systemd/sd-login.h
index 776733ad1d..dad459a7e8 100644
--- a/src/systemd/sd-login.h
+++ b/src/systemd/sd-login.h
@@ -103,7 +103,10 @@ int sd_peer_get_machine_name(int fd, char **machine);
int sd_peer_get_slice(int fd, char **slice);
/* Get state from UID. Possible states: offline, lingering, online, active, closing */
-int sd_uid_get_state(uid_t uid, char**state);
+int sd_uid_get_state(uid_t uid, char **state);
+
+/* Return primary session of user, if there is any */
+int sd_uid_get_display(uid_t uid, char **session);
/* Return 1 if UID has session on seat. If require_active is true, this will
* look for active sessions only. */