rewrite network code for opener

This commit is contained in:
technyon
2022-05-30 22:52:09 +02:00
parent 2473f68947
commit e68c3453db
8 changed files with 355 additions and 7 deletions

View File

@@ -39,9 +39,12 @@ public:
void setLockActionReceivedCallback(bool (*lockActionReceivedCallback)(const char* value));
void setConfigUpdateReceivedCallback(void (*configUpdateReceivedCallback)(const char* path, const char* value));
void setMqttDataReceivedForwardCallback(void (*callback)(char*, uint8_t*, unsigned int));
void restartAndConfigureWifi();
NetworkDevice* device();
private:
static void onMqttDataReceivedCallback(char* topic, byte* payload, unsigned int length);
void onMqttDataReceived(char*& topic, byte*& payload, unsigned int& length);
@@ -81,4 +84,5 @@ private:
bool (*_lockActionReceivedCallback)(const char* value) = nullptr;
void (*_configUpdateReceivedCallback)(const char* path, const char* value) = nullptr;
void (*_mqttTopicReceivedForwardCallback)(char*, uint8_t*, unsigned int) = nullptr;
};