mirror of https://github.com/lumapu/ahoy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
#ifndef __WEB_API_H__
|
|
#define __WEB_API_H__
|
|
|
|
#include "dbg.h"
|
|
#include "ESPAsyncTCP.h"
|
|
#include "ESPAsyncWebServer.h"
|
|
#include "AsyncJson.h"
|
|
#include "app.h"
|
|
|
|
|
|
class app;
|
|
|
|
class webApi {
|
|
public:
|
|
webApi(AsyncWebServer *srv, app *app, sysConfig_t *sysCfg, config_t *config, statistics_t *stat, char version[]);
|
|
|
|
void setup(void);
|
|
void loop(void);
|
|
|
|
private:
|
|
void onApi(AsyncWebServerRequest *request);
|
|
void getNotFound(JsonObject obj, String url);
|
|
|
|
void getSystem(JsonObject obj);
|
|
void getStatistics(JsonObject obj);
|
|
void getInverterList(JsonObject obj);
|
|
void getMqtt(JsonObject obj);
|
|
void getNtp(JsonObject obj);
|
|
void getPinout(JsonObject obj);
|
|
void getRadio(JsonObject obj);
|
|
void getSerial(JsonObject obj);
|
|
|
|
void getIndex(JsonObject obj);
|
|
void getSetup(JsonObject obj);
|
|
void getLive(JsonObject obj);
|
|
|
|
AsyncWebServer *mSrv;
|
|
app *mApp;
|
|
|
|
config_t *mConfig;
|
|
sysConfig_t *mSysCfg;
|
|
statistics_t *mStat;
|
|
char *mVersion;
|
|
};
|
|
|
|
#endif /*__WEB_API_H__*/
|
|
|