aboutsummaryrefslogtreecommitdiff
path: root/include/server.h
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-07-31 00:22:18 +0200
committerKenny Levinsen <kl@kl.wtf>2020-07-31 00:22:18 +0200
commit61716a2c77dfde9addf6b41a6d72d26a8584150e (patch)
tree537cd84661955497bdb304f88896e36896df4e5f /include/server.h
parentf85434de666f10da0cbcaccdbb7d88917c5fa887 (diff)
Initial implementation of seatd and libseat
Diffstat (limited to 'include/server.h')
-rw-r--r--include/server.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/server.h b/include/server.h
new file mode 100644
index 0000000..11de2c5
--- /dev/null
+++ b/include/server.h
@@ -0,0 +1,26 @@
+#ifndef _SEATD_SERVER_H
+#define _SEATD_SERVER_H
+
+#include <stdbool.h>
+
+#include "list.h"
+
+struct poller;
+struct client;
+
+struct server {
+ bool running;
+ struct poller *poller;
+
+ struct list seats;
+};
+
+struct server *server_create(void);
+void server_destroy(struct server *server);
+
+struct seat *server_get_seat(struct server *server, const char *seat_name);
+
+int server_listen(struct server *server, const char *path);
+int server_add_client(struct server *server, int fd);
+
+#endif