rewrite network code for opener
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user