File: server.h

package info (click to toggle)
seatd 0.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 500 kB
  • sloc: ansic: 4,867; sh: 24; makefile: 6
file content (27 lines) | stat: -rw-r--r-- 541 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef _SEATD_SERVER_H
#define _SEATD_SERVER_H

#include <stdbool.h>

#include "linked_list.h"
#include "poller.h"

struct client;

struct server {
	bool running;
	struct poller poller;

	struct linked_list seats;
	struct linked_list idle_clients;
};

int server_init(struct server *server);
void server_finish(struct server *server);

struct seat *server_get_seat(struct server *server, const char *seat_name);

int server_handle_connection(int fd, uint32_t mask, void *data);
int server_add_client(struct server *server, int fd);

#endif