aboutsummaryrefslogtreecommitdiff
path: root/session/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session/session.c')
-rw-r--r--session/session.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/session/session.c b/session/session.c
deleted file mode 100644
index 3f4c7910..00000000
--- a/session/session.c
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <stddef.h>
-#include <stdarg.h>
-#include <wlr/session.h>
-#include <wlr/session/interface.h>
-#include <wlr/util/log.h>
-
-extern const struct session_impl session_logind;
-extern const struct session_impl session_direct;
-
-static const struct session_impl *impls[] = {
-#ifdef HAS_SYSTEMD
- &session_logind,
-#endif
- &session_direct,
- NULL,
-};
-
-struct wlr_session *wlr_session_start(struct wl_display *disp) {
- const struct session_impl **iter;
-
- for (iter = impls; *iter; ++iter) {
- struct wlr_session *session = (*iter)->start(disp);
- if (session) {
- return session;
- }
- }
-
- wlr_log(L_ERROR, "Failed to load session backend");
- return NULL;
-}
-
-void wlr_session_finish(struct wlr_session *session) {
- if (!session) {
- return;
- }
-
- session->impl->finish(session);
-};
-
-int wlr_session_open_file(struct wlr_session *session, const char *path) {
- return session->impl->open(session, path);
-}
-
-void wlr_session_close_file(struct wlr_session *session, int fd) {
- session->impl->close(session, fd);
-}
-
-bool wlr_session_change_vt(struct wlr_session *session, unsigned vt) {
- if (!session) {
- return false;
- }
-
- return session->impl->change_vt(session, vt);
-}