esphome/esphome/components/ota/ota_backend.h
2021-10-22 13:02:55 +02:00

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