2015-08-29 06:03:56 -07:00
|
|
|
#ifndef _HTTP_H_INCLUDED_
|
|
|
|
# define _HTTP_H_INCLUDED_
|
|
|
|
|
2016-07-18 07:37:28 -07:00
|
|
|
#include <stdarg.h>
|
2015-08-29 06:03:56 -07:00
|
|
|
#include "mongoose.h"
|
|
|
|
#include "storage.h"
|
2015-09-09 23:37:09 -07:00
|
|
|
#include "json.h"
|
2015-08-29 06:03:56 -07:00
|
|
|
|
2015-09-03 06:34:10 -07:00
|
|
|
#define API_PREFIX "/api/0/"
|
2015-09-09 12:21:38 -07:00
|
|
|
#define MONITOR_URI "/api/0/monitor"
|
2015-09-03 06:34:10 -07:00
|
|
|
|
2016-02-11 12:43:11 -07:00
|
|
|
typedef enum {
|
|
|
|
PAGE = 0,
|
|
|
|
GEODATA = 1,
|
|
|
|
LASTPOS = 2,
|
|
|
|
} viewtype;
|
|
|
|
|
2015-08-29 06:03:56 -07:00
|
|
|
int ev_handler(struct mg_connection *conn, enum mg_event ev);
|
2015-09-09 23:37:09 -07:00
|
|
|
void http_ws_push_json(struct mg_server *server, JsonNode *obj);
|
2015-08-29 06:03:56 -07:00
|
|
|
|
|
|
|
#endif
|