forked from openairlinetycoon/ATDMasterServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WebView.h
28 lines (21 loc) · 853 Bytes
/
WebView.h
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
#pragma once
struct mg_http_message;
struct mg_connection;
class NATServer;
class WebView {
public:
WebView(const std::shared_ptr<ServerBrowser> serverBrowser, const std::shared_ptr<NATServer> natServer)
: m_serverBrowser(serverBrowser),
m_natServer(natServer) {}
void StartServer();
static void ProcessMessage();
void ServerMessageHandler(mg_connection* c, int ev, void* ev_data);
protected:
std::shared_ptr<ServerBrowser> m_serverBrowser;
std::shared_ptr<NATServer> m_natServer;
bool GetNATUserCount(mg_connection* c, mg_http_message* hm) const;
bool GetBrowserUserCount(mg_connection* c, mg_http_message* hm) const;
bool GetBrowserRooms(mg_connection* c, mg_http_message* hm) const;
bool GetRoomCreationCount(mg_connection* c, mg_http_message* hm) const;
bool GetUserLoginCount(mg_connection* c, mg_http_message* hm);
};