use common buffer

This commit is contained in:
technyon
2023-03-22 23:06:13 +01:00
parent ff4bd2618f
commit 04ebf17b1a
5 changed files with 30 additions and 28 deletions

View File

@@ -9,12 +9,10 @@
#include "NukiOpenerConstants.h"
#include "NetworkLock.h"
#define OPENER_LOG_JSON_BUFFER_SIZE 2048
class NetworkOpener : public MqttReceiver
{
public:
explicit NetworkOpener(Network* network, Preferences* preferences);
explicit NetworkOpener(Network* network, Preferences* preferences, char* buffer, size_t bufferSize);
virtual ~NetworkOpener() = default;
void initialize();
@@ -85,6 +83,9 @@ private:
unsigned long _resetLockStateTs = 0;
uint8_t _queryCommands = 0;
char* _buffer;
size_t _bufferSize;
bool (*_lockActionReceivedCallback)(const char* value) = nullptr;
void (*_configUpdateReceivedCallback)(const char* path, const char* value) = nullptr;
void (*_keypadCommandReceivedReceivedCallback)(const char* command, const uint& id, const String& name, const String& code, const int& enabled) = nullptr;