-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebHandler.h
More file actions
36 lines (25 loc) · 1 KB
/
webHandler.h
File metadata and controls
36 lines (25 loc) · 1 KB
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
28
29
30
31
32
33
34
35
36
#pragma once
#include "CivetServer.h"
#include "threadsafe_queue.h"
#include "command.h"
#define MAX_PARAMETERS 16
class ExperimentHandler : public CivetHandler{
private:
threadsafe_queue<Command>* pCq;
threadsafe_queue<ENGN_Info>* pRq;
public:
void setCmd_q(threadsafe_queue<Command>* p_cmd_q){pCq = p_cmd_q;};
void setRslt_q(threadsafe_queue<ENGN_Info>* p_rslt_q){pRq = p_rslt_q;};
bool handleGet(CivetServer *server, struct mg_connection *conn);
bool handlePost(CivetServer *server, struct mg_connection *conn);
bool handlePut(CivetServer *server, struct mg_connection *conn);
};
class ExitHandler : public CivetHandler{
private:
threadsafe_queue<Command>* pCq;
public:
void setCmd_q(threadsafe_queue<Command>* p_cmd_q){pCq = p_cmd_q;};
bool handleGet(CivetServer *server, struct mg_connection *conn);
bool handlePost(CivetServer *server, struct mg_connection *conn);
bool handlePut(CivetServer *server, struct mg_connection *conn);
};