This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
esp-firewall/SourceCode/arduino/lib/Firewall/esp32Storage.hpp
2022-04-20 21:17:34 +02:00

34 lines
732 B
C++

#ifndef ESP32_STORAGE_HPP
#define ESP32_STORAGE_HPP
#include "Preferences.h"
#include "SPIFFS.h"
#include "FirewallTypes.h"
#include "mbedtls/md.h"
#include "SSLCert.hpp"
namespace firewall
{
class Storage
{
private:
Preferences memory;
void mount_spiffs();
protected:
uint8_t retrieve_settings_value(const char *);
void store_settings_value(const char *, const uint8_t);
firewall_rule_t *retrieve_firewall_rule(const uint8_t);
void store_firewall_rule(firewall_rule_t *);
httpsserver::SSLCert *retrieve_certificate();
void store_certificate(httpsserver::SSLCert *certificate);
public:
Storage();
~Storage();
};
}
#endif