mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-27 08:18:28 +02:00
932e0469f7
* WIP on separating out the OTA backends. * Split off the individual OTA backends. * Cleanup the three backends, split into .h and .cpp. * After successfull flashing, activate the new boot partition. * Fix linting issues. * Minor cleanup Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net> Co-authored-by: Otto winter <otto@otto-winter.com>
19 lines
429 B
C++
19 lines
429 B
C++
#pragma once
|
|
#include "ota_component.h"
|
|
|
|
namespace esphome {
|
|
namespace ota {
|
|
|
|
class OTABackend {
|
|
public:
|
|
virtual ~OTABackend() = default;
|
|
virtual OTAResponseTypes begin(size_t image_size) = 0;
|
|
virtual void set_update_md5(const char *md5) = 0;
|
|
virtual OTAResponseTypes write(uint8_t *data, size_t len) = 0;
|
|
virtual OTAResponseTypes end() = 0;
|
|
virtual void abort() = 0;
|
|
};
|
|
|
|
} // namespace ota
|
|
} // namespace esphome
|