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