mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 03:34:18 +01:00
19 lines
472 B
C++
19 lines
472 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;
|
|
virtual bool supports_compression() = 0;
|
|
};
|
|
|
|
} // namespace ota
|
|
} // namespace esphome
|