X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flogin%2Flogind-session.h;h=d054c33ceca6b5a671b4352943914d99056ca04a;hp=2ab31828cedb9a62a54777d5e4b3627faf7a1a89;hb=1b99ea27bc3ffa1fc6f7cfe89563d891a9aed4c5;hpb=baccf3e40bab6c0b69992ae29c396930de4660c9 diff --git a/src/login/logind-session.h b/src/login/logind-session.h index 2ab31828c..d054c33ce 100644 --- a/src/login/logind-session.h +++ b/src/login/logind-session.h @@ -25,12 +25,8 @@ typedef struct Session Session; typedef enum KillWho KillWho; #include "list.h" -#include "util.h" -#include "logind.h" -#include "logind-seat.h" -#include "logind-session-device.h" #include "logind-user.h" -#include "login-shared.h" +#include "login-util.h" typedef enum SessionState { SESSION_OPENING, /* Session scope is being created */ @@ -56,6 +52,7 @@ typedef enum SessionType { SESSION_X11, SESSION_WAYLAND, SESSION_MIR, + SESSION_WEB, _SESSION_TYPE_MAX, _SESSION_TYPE_INVALID = -1 } SessionType; @@ -73,7 +70,7 @@ struct Session { Manager *manager; const char *id; - unsigned int pos; + unsigned int position; SessionType type; SessionClass class; @@ -98,7 +95,6 @@ struct Session { Seat *seat; unsigned int vtnr; int vtfd; - sd_event_source *vt_source; pid_t leader; uint32_t audit_id; @@ -121,6 +117,7 @@ struct Session { char *controller; Hashmap *devices; + sd_bus_track *track; LIST_FIELDS(Session, sessions_by_user); LIST_FIELDS(Session, sessions_by_seat); @@ -141,7 +138,7 @@ int session_create_fifo(Session *s); int session_start(Session *s); int session_stop(Session *s, bool force); int session_finalize(Session *s); -void session_release(Session *s); +int session_release(Session *s); int session_save(Session *s); int session_load(Session *s); int session_kill(Session *s, KillWho who, int signo); @@ -174,7 +171,13 @@ KillWho kill_who_from_string(const char *s) _pure_; int session_prepare_vt(Session *s); void session_restore_vt(Session *s); +void session_leave_vt(Session *s); bool session_is_controller(Session *s, const char *sender); int session_set_controller(Session *s, const char *sender, bool force); void session_drop_controller(Session *s); + +int bus_session_method_activate(sd_bus_message *message, void *userdata, sd_bus_error *error); +int bus_session_method_lock(sd_bus_message *message, void *userdata, sd_bus_error *error); +int bus_session_method_terminate(sd_bus_message *message, void *userdata, sd_bus_error *error); +int bus_session_method_kill(sd_bus_message *message, void *userdata, sd_bus_error *error);