ahoy/tools/esp8266/api.h
lumapu 13c88b3626 * created new API functions
* bound html through ajax to parse setup page (not finished now)
* added compression option for static html to python module
* removed generated h-file from index (redundant information), they will be created on compile time
2022-08-27 02:27:32 +02:00

32 lines
657 B
C++

#ifndef __API_H__
#define __API_H__
#include "dbg.h"
#include "ESPAsyncTCP.h"
#include "ESPAsyncWebServer.h"
#include "app.h"
class app;
class api {
public:
api(AsyncWebServer *srv, app *app, sysConfig_t *sysCfg, config_t *config, char version[]);
void setup(void);
void loop(void);
private:
void onSystem(AsyncWebServerRequest *request);
void onInverterList(AsyncWebServerRequest *request);
void onMqtt(AsyncWebServerRequest *request);
AsyncWebServer *mSrv;
app *mApp;
config_t *mConfig;
sysConfig_t *mSysCfg;
char *mVersion;
};
#endif /*__API_H__*/