feat: add users and sessions discovery

- also add clangd multi-file intellisense
This commit is contained in:
2024-07-10 23:24:51 +02:00
parent 4d8faa5b5f
commit 07d2842be0
11 changed files with 272 additions and 3 deletions

13
include/sessions.h Normal file
View File

@@ -0,0 +1,13 @@
#include <sys/types.h>
struct session {
char *name;
char *path;
};
struct sessions_list {
u_int16_t length;
struct session *sessions;
};
struct sessions_list *get_avaliable_sessions();

13
include/users.h Normal file
View File

@@ -0,0 +1,13 @@
#include <sys/types.h>
struct user {
char *username;
char *display_name;
};
struct users_list {
u_int16_t length;
struct user *users;
};
struct users_list *get_human_users();

1
include/util.h Normal file
View File

@@ -0,0 +1 @@
void strcln(char **dest, const char *source);