blob: f407afa56c628db4e82a18bae414cb4b87001afe [file] [log] [blame]
Patrick Ventureaf696252018-12-11 10:22:14 -08001#pragma once
2
Patrick Venture00887592018-12-11 10:57:06 -08003#include "blob_interface.hpp"
Patrick Ventureaf696252018-12-11 10:22:14 -08004#include "interface.hpp"
Patrick Venturec181eba2019-01-15 13:10:22 -08005#include "internal/sys.hpp"
Patrick Ventureaf696252018-12-11 10:22:14 -08006
Patrick Venture9b534f02018-12-13 16:10:02 -08007namespace host_tool
8{
9
Patrick Ventureaf696252018-12-11 10:22:14 -080010class BtDataHandler : public DataInterface
11{
12 public:
Patrick Venturec181eba2019-01-15 13:10:22 -080013 BtDataHandler(BlobInterface* blob,
14 const internal::Sys* sys = &internal::sys_impl) :
15 blob(blob),
16 sys(sys){};
Patrick Ventureaf696252018-12-11 10:22:14 -080017
18 bool sendContents(const std::string& input, std::uint16_t session) override;
Patrick Venture8a55dcb2018-12-12 21:12:58 -080019 blobs::FirmwareBlobHandler::UpdateFlags supportedType() const override
20 {
21 return flags;
22 }
Patrick Venture00887592018-12-11 10:57:06 -080023
24 private:
25 BlobInterface* blob;
Patrick Venturec181eba2019-01-15 13:10:22 -080026 const internal::Sys* sys;
Patrick Venture8a55dcb2018-12-12 21:12:58 -080027 blobs::FirmwareBlobHandler::UpdateFlags flags =
28 blobs::FirmwareBlobHandler::UpdateFlags::ipmi;
Patrick Ventureaf696252018-12-11 10:22:14 -080029};
Patrick Venture9b534f02018-12-13 16:10:02 -080030
31} // namespace host_tool