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;
|
2023-06-13 18:01:13 +00:00
|
|
|
public:
|
|
|
|
Settings();
|
2024-04-15 19:07:26 +00:00
|
|
|
String tinance2_url;
|
2024-04-15 18:28:30 +00:00
|
|
|
String tinance2_url_validatecard;
|
|
|
|
String tinance2_url_readerinfo;
|
|
|
|
String tinance2_url_acls;
|
|
|
|
String tinance2_url_log;
|
|
|
|
String tinance2ReaderIdentifier;
|
|
|
|
String tinance2ReaderKey;
|
|
|
|
bool webhookLockEnabled;
|
|
|
|
String webhookLockHook;
|
|
|
|
bool webhookUnlockEnabled;
|
|
|
|
String webhookUnlockHook;
|
|
|
|
|
2023-06-13 18:01:13 +00:00
|
|
|
void loadFromEEPROM();
|
|
|
|
void saveToEEPROM();
|
2024-04-15 18:28:30 +00:00
|
|
|
void saveSetting(const String& namespaceStr, const String& key, const String& value, const String& typeStr);
|
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();
|
2023-06-13 18:01:13 +00:00
|
|
|
};
|
|
|
|
|
2024-01-30 16:33:00 +00:00
|
|
|
extern Settings settings;
|
|
|
|
|
2023-06-13 18:01:13 +00:00
|
|
|
#endif // SETTINGS_H
|