jsfw/server.h

35 lines
784 B
C
Raw Normal View History

2022-08-30 17:54:56 -05:00
// vi:ft=c
#ifndef SERVER_H_
#define SERVER_H_
2022-10-07 18:36:53 -05:00
#include <stdbool.h>
2022-08-30 12:08:36 -05:00
#include <stdint.h>
2022-10-07 18:36:53 -05:00
#include <time.h>
2022-08-29 17:27:03 -05:00
2022-10-07 18:36:53 -05:00
typedef struct {
// the 0 mac_address represents no filter
uint64_t mac_address;
// negative values means no filter
int32_t vendor;
// negative values means no filter
int32_t product;
bool js;
} ControllerFilter;
typedef struct {
ControllerFilter filter;
char *tag;
bool duplicate;
bool ps4_hidraw;
} ServerConfigController;
typedef struct {
ServerConfigController *controllers;
size_t controller_count;
struct timespec poll_interval;
uint32_t request_timeout;
} ServerConfig;
void server_run(uint16_t port, char *config_path);
2022-08-29 17:27:03 -05:00
#endif