Move src to src/lib, include to src/include, test to src/test.
[deb_shairplay.git] / src / lib / httpd.h
CommitLineData
2340bcd3
JVH
1#ifndef HTTPD_H
2#define HTTPD_H
3
4#include "logger.h"
5#include "http_request.h"
6#include "http_response.h"
7
8typedef struct httpd_s httpd_t;
9
10struct httpd_callbacks_s {
11 void* opaque;
12 void* (*conn_init)(void *opaque, unsigned char *local, int locallen, unsigned char *remote, int remotelen);
13 void (*conn_request)(void *ptr, http_request_t *request, http_response_t **response);
14 void (*conn_destroy)(void *ptr);
15};
16typedef struct httpd_callbacks_s httpd_callbacks_t;
17
18
19httpd_t *httpd_init(logger_t *logger, httpd_callbacks_t *callbacks, int max_connections, int use_rtsp);
20
21int httpd_start(httpd_t *httpd, unsigned short *port);
22void httpd_stop(httpd_t *httpd);
23
24void httpd_destroy(httpd_t *httpd);
25
26
27#endif