2017-07-30 01:00:36 +02:00
|
|
|
#ifndef HTTP_SERVER
|
|
|
|
#define HTTP_SERVER
|
2020-08-25 16:40:24 +02:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
2019-11-13 11:48:54 +01:00
|
|
|
#include "lib/handle.h"
|
2015-10-22 11:39:11 +02:00
|
|
|
|
2020-08-27 13:31:40 +02:00
|
|
|
#define PLUGIN_HANDLER "handle"
|
|
|
|
#define WS_MAGIC_STRING "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
|
2018-10-05 19:01:39 +02:00
|
|
|
#define MATCH(s, n) strcmp(section, s) == 0 && strcmp(name, n) == 0
|
2019-11-13 14:22:25 +01:00
|
|
|
#ifndef CONFIG_FILE
|
|
|
|
#define CONFIG_FILE "antd-config.ini"
|
|
|
|
#endif
|
2018-02-10 11:22:41 +01:00
|
|
|
|
2020-08-27 13:31:40 +02:00
|
|
|
config_t *config();
|
2018-10-05 19:01:39 +02:00
|
|
|
void destroy_config();
|
2020-08-27 13:31:40 +02:00
|
|
|
void load_config(const char *file);
|
|
|
|
void *accept_request(void *);
|
|
|
|
void *finish_request(void *);
|
|
|
|
void cat(void *, FILE *);
|
|
|
|
void cannot_execute(void *);
|
2018-02-10 12:24:01 +01:00
|
|
|
//int get_line(int, char *, int);
|
2020-08-27 13:31:40 +02:00
|
|
|
void *serve_file(void *);
|
2015-10-22 11:39:11 +02:00
|
|
|
int startup(unsigned *);
|
2020-08-27 13:31:40 +02:00
|
|
|
int rule_check(const char *, const char *, const char *, const char *, const char *, char *);
|
|
|
|
void ws_confirm_request(void *, const char *);
|
|
|
|
char *post_url_decode(void *client, int len);
|
|
|
|
void decode_url_request(const char *query, dictionary_t);
|
|
|
|
void *decode_request_header(void *data);
|
|
|
|
void *decode_request(void *data);
|
|
|
|
void *decode_post_request(void *data);
|
|
|
|
void *resolve_request(void *data);
|
|
|
|
void *decode_multi_part_request(void *, const char *);
|
|
|
|
void *decode_multi_part_request_data(void *data);
|
|
|
|
void decode_cookie(const char *, dictionary_t d);
|
|
|
|
char *post_data_decode(void *, int);
|
2018-10-05 19:01:39 +02:00
|
|
|
void set_nonblock(int);
|
2020-08-27 13:31:40 +02:00
|
|
|
void *execute_plugin(void *data, const char *path);
|
2017-07-30 01:00:36 +02:00
|
|
|
|
|
|
|
#endif
|