27#ifndef __CONFIG_SERVER_H
28#define __CONFIG_SERVER_H
32typedef void(diagserver)(
int sock,
const char *url);
33extern diagserver *pDiagServer;
45#define DiscoverStyle \
47 ".styleDiv{width:70%; min-width:480px; max-width:900px; font-family:sans-serif; margin-left:auto; margin-right:auto;}" \
48 ".discDiv{border-width:1px; border-style:solid; border-color:#595454; border-radius:5px; margin-top:30px;}" \
49 ".discTab{width:100%; color:#595454; border-spacing:0px;}" \
50 ".devTh{font-weight:bold; border-bottom:2px solid #ddd; padding:8px; border-top:1px solid #595454; color:#333;}" \
51 ".devTd{border-top:1px solid #ddd; padding:8px; color:#333;}" \
52 ".tabTh{padding:8px; background-color:#595454; color:#fff; text-align:left;}" \
53 ".btnCnf{width:125px; height:40px; background-color:#595454; color:#fff; border-radius:5px; margin-top:10px;}" \
56void StartConfigServer(
int prio);
59void AddConfigServlet(servlet *s);
60void ResumeSerialConfig(
int fd_cfg =
CurrentStdioFD(1),
bool persist =
true);
76bool ConfigAuthenticate(
const char *up);
79void ConfigSetServlets();
82void AddConfigServlet(servlet *s);
85void ConfigIntFillInFD(fd_set &r_set, fd_set &w_set, fd_set &write_fds);
86void ConfigIntProcessSelectResult(fd_set &r_set, fd_set &w_set, fd_set &error_fds);
105 virtual int AddToSelectSet(fd_set &read_fds, fd_set &write_fds, fd_set &error_fds);
106 virtual void ProcessSelectResult(fd_set &read_fds, fd_set &write_fds, fd_set &error_fds);
Class to run web configurator.
Definition config_server.h:99
size_t ConfigMaxSize()
Returns the number of bytes available in configuration flash.
void SaveConfigToStorage()
Write all pending data to flash memory.
void EnableConfigMirror()
Enable the configuration mirror.
size_t ConfigSize()
Returns the number of bytes currently in use by configuration flash.
int CurrentStdioFD(int stdio_fd)
Returns the current file descriptor mapped to the stdio file descriptor.