31 lines
696 B
C++
31 lines
696 B
C++
#ifndef ESP32_EEPROM_HPP
|
|
#define ESP32_EEPROM_HPP
|
|
|
|
#include "EEPROM.h"
|
|
#include "FirewallTypes.h"
|
|
|
|
namespace firewall
|
|
{
|
|
class Storage
|
|
{
|
|
private:
|
|
uint16_t eeprom_size;
|
|
uint16_t settings_start = 0;
|
|
uint16_t settings_head = settings_start;
|
|
uint16_t rules_start = 1000;
|
|
uint16_t rules_head = rules_start;
|
|
uint16_t certificate_start = 3000;
|
|
uint16_t certificate_head = certificate_start;
|
|
|
|
protected:
|
|
uint8_t amount_of_rules;
|
|
uint8_t get_amount_of_firewall_rules();
|
|
void set_amount_of_firewall_rules(const uint8_t);
|
|
|
|
public:
|
|
Storage(const uint16_t = 4000);
|
|
~Storage();
|
|
};
|
|
}
|
|
|
|
#endif
|