28 lines
510 B
C
28 lines
510 B
C
|
/*
|
||
|
* ESP8266 RGBW controller
|
||
|
* Copyright 2020 (c) Mark van Renswoude
|
||
|
*
|
||
|
* https://git.x2software.net/pub/RGBWifi
|
||
|
*/
|
||
|
#ifndef __settingsjson
|
||
|
#define __settingsjson
|
||
|
|
||
|
#include "../debug.h"
|
||
|
|
||
|
class AbstractJsonSettings
|
||
|
{
|
||
|
protected:
|
||
|
virtual const char* getFilename() = 0;
|
||
|
virtual const char* getDebugPrefix() = 0;
|
||
|
|
||
|
public:
|
||
|
void read();
|
||
|
void write();
|
||
|
|
||
|
virtual void toJson(Print &print) = 0;
|
||
|
virtual bool fromJson(char* data, bool* changed) = 0;
|
||
|
|
||
|
bool fromJson(char* data);
|
||
|
};
|
||
|
|
||
|
#endif
|