#ifndef UNIT_TEST #include #ifdef UNIT_TEST #include #else #include #endif #pragma once class OTA { public: OTA(String server_url, Version currentVersion, String currentDeviceConfiguration); Firmware getLatestVersionOnServer(); bool checkForUpdate(); private: bool _isHTTPS = false; String _serverUrl; Version _currentVersion; String _current_device_configuration; Firmware createErrorResponse(const String& errorMsg); }; void run_ota_update(String url, std::function callback_started, std::function callback_finished, std::function callback_progress, std::function callback_error); void run_ota_spiffs_update(String url, std::function callback_started, std::function callback_finished, std::function callback_progress, std::function callback_error); #endif