blob: 9caac5de180d81987b0fa632fc06439bfe1e19d2 [file] [log] [blame]
Patrick Ventureaf696252018-12-11 10:22:14 -08001#pragma once
2
3#include "interface.hpp"
Patrick Venturec181eba2019-01-15 13:10:22 -08004#include "internal/sys.hpp"
Patrick Ventureaf696252018-12-11 10:22:14 -08005
Patrick Venture664c5bc2019-03-07 08:09:45 -08006#include <ipmiblob/blob_interface.hpp>
7
Patrick Venture9b534f02018-12-13 16:10:02 -08008namespace host_tool
9{
10
Patrick Ventureaf696252018-12-11 10:22:14 -080011class BtDataHandler : public DataInterface
12{
13 public:
Patrick Venture664c5bc2019-03-07 08:09:45 -080014 BtDataHandler(ipmiblob::BlobInterface* blob,
Patrick Venturec181eba2019-01-15 13:10:22 -080015 const internal::Sys* sys = &internal::sys_impl) :
16 blob(blob),
17 sys(sys){};
Patrick Ventureaf696252018-12-11 10:22:14 -080018
19 bool sendContents(const std::string& input, std::uint16_t session) override;
Patrick Venture1d5a31c2019-05-20 11:38:22 -070020 ipmi_flash::FirmwareBlobHandler::UpdateFlags supportedType() const override
Patrick Venture8a55dcb2018-12-12 21:12:58 -080021 {
Patrick Venture1d5a31c2019-05-20 11:38:22 -070022 return ipmi_flash::FirmwareBlobHandler::UpdateFlags::ipmi;
Patrick Venture8a55dcb2018-12-12 21:12:58 -080023 }
Patrick Venture00887592018-12-11 10:57:06 -080024
25 private:
Patrick Venture664c5bc2019-03-07 08:09:45 -080026 ipmiblob::BlobInterface* blob;
Patrick Venturec181eba2019-01-15 13:10:22 -080027 const internal::Sys* sys;
Patrick Ventureaf696252018-12-11 10:22:14 -080028};
Patrick Venture9b534f02018-12-13 16:10:02 -080029
30} // namespace host_tool