forked from xLightsSequencer/xLights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWebServer.h
30 lines (25 loc) · 1.15 KB
/
WebServer.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
27
28
29
30
#pragma once
/***************************************************************
* This source files comes from the xLights project
* https://www.xlights.org
* https://github.com/smeighan/xLights
* See the github commit history for a record of contributing
* developers.
* Copyright claimed based on commit dates recorded in Github
* License: https://github.com/smeighan/xLights/blob/master/License.txt
**************************************************************/
#include "wxHTTPServer/wxhttpserver.h"
class WebServer : HttpServer
{
public:
WebServer(int port, bool apionly = false, const wxString& password = "", int mins = 30, bool allowUnauthPages = false, const std::string& defaultPage = "index.html");
virtual ~WebServer();
void SetAPIOnly(bool apiOnly);
void SetPasswordTimeout(int mins);
void SetPassword(const wxString& password);
void GeneratePass();
void SendMessageToAllWebSockets(const wxString& message);
bool IsSomeoneListening() const;
void SetAllowUnauthenticatedPagesToBypassLogin(bool allowUnauthPages);
void SetDefaultPage(const std::string& defaultPage);
};