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

28 lines
553 B
C++
Raw Normal View History

2022-04-20 14:37:21 +02:00
#ifndef ESP32_STORAGE_HPP
#define ESP32_STORAGE_HPP
2022-04-20 11:40:00 +02:00
2022-04-20 15:43:02 +02:00
#include "Preferences.h"
2022-04-20 13:08:12 +02:00
#include "FirewallTypes.h"
2022-04-20 14:37:21 +02:00
#include "mbedtls/md.h"
2022-04-20 11:40:00 +02:00
2022-04-20 13:08:12 +02:00
namespace firewall
2022-04-20 11:40:00 +02:00
{
2022-04-20 13:08:12 +02:00
class Storage
{
private:
2022-04-20 15:43:02 +02:00
Preferences preferences;
2022-04-20 14:37:21 +02:00
2022-04-20 13:08:12 +02:00
protected:
2022-04-20 15:43:02 +02:00
uint8_t retrieve_amount_of_firewall_rules();
void store_amount_of_firewall_rules(const uint8_t);
firewall_rule_t *retrieve_firewall_rule(const uint8_t);
void store_firewall_rule(const uint8_t &, firewall_rule_t *);
2022-04-20 13:08:12 +02:00
public:
2022-04-20 15:43:02 +02:00
Storage();
2022-04-20 13:08:12 +02:00
~Storage();
};
}
2022-04-20 11:40:00 +02:00
#endif