blob: 811c81dd436a88ee071bb5be7cfb93c1b571d754 [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 Venture8a55dcb2018-12-12 21:12:58 -080020 blobs::FirmwareBlobHandler::UpdateFlags supportedType() const override
21 {
Patrick Venture55c53742019-01-17 15:54:09 -080022 return blobs::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