tinance2-doorbot/include/settings.h

44 lines
827 B
C
Raw Normal View History

2023-06-13 18:01:13 +00:00
#ifndef SETTINGS_H
#define SETTINGS_H
#include <Preferences.h>
2024-01-31 10:50:05 +00:00
#ifdef WIFI
#ifdef TINANCE2_BACKEND
#include "tinance2.h"
#include "secrets.h"
#endif
#endif
2023-06-13 18:01:13 +00:00
class Settings {
private:
bool disableDoor;
2023-12-28 09:14:36 +00:00
String doorMode;
2024-04-13 21:51:35 +00:00
String tinance2ReaderIdentifier;
String tinance2ReaderKey;
2023-06-13 18:01:13 +00:00
public:
Settings();
void loadFromEEPROM();
void saveToEEPROM();
2024-04-13 21:51:35 +00:00
void saveStringToEEPROM(String string, String value);
void saveBoolToEEPROM(String string, String value);
2023-06-13 18:01:13 +00:00
void setDisableDoor(bool value);
2023-12-28 09:14:36 +00:00
bool getDoorDisabled();
void setDoorMode(String value);
String getDoorMode();
2024-04-13 21:51:35 +00:00
void setTinance2ReaderIdentifier(String value);
String getTinance2ReaderIdentifier();
void setTinance2ReaderKey(String value);
String getTinance2ReaderKey();
2023-06-13 18:01:13 +00:00
};
extern Settings settings;
2023-06-13 18:01:13 +00:00
#endif // SETTINGS_H