/*
 * Stairs
 * Copyright 2017 (c) Mark van Renswoude
 *
 * https://git.x2software.net/pub/Stairs
*/
#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