blob: fd0a8cc505f650f019d43373681e8ad1413d98c9 [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 Venturecf9b2192019-06-27 12:09:52 -07005#include "progress.hpp"
Patrick Ventureaf696252018-12-11 10:22:14 -08006
Patrick Venture664c5bc2019-03-07 08:09:45 -08007#include <ipmiblob/blob_interface.hpp>
8
Patrick Venture9b534f02018-12-13 16:10:02 -08009namespace host_tool
10{
11
Patrick Ventureaf696252018-12-11 10:22:14 -080012class BtDataHandler : public DataInterface
13{
14 public:
Patrick Venturecf9b2192019-06-27 12:09:52 -070015 BtDataHandler(ipmiblob::BlobInterface* blob, ProgressInterface* progress,
Patrick Venturec181eba2019-01-15 13:10:22 -080016 const internal::Sys* sys = &internal::sys_impl) :
Patrick Williams42a44c22024-08-16 15:21:32 -040017 blob(blob), progress(progress), sys(sys) {};
Patrick Ventureaf696252018-12-11 10:22:14 -080018
19 bool sendContents(const std::string& input, std::uint16_t session) override;
Patrick Venture84778b82019-06-26 20:11:09 -070020 ipmi_flash::FirmwareFlags::UpdateFlags supportedType() const override
Patrick Venture8a55dcb2018-12-12 21:12:58 -080021 {
Patrick Venture84778b82019-06-26 20:11:09 -070022 return ipmi_flash::FirmwareFlags::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 Venturecf9b2192019-06-27 12:09:52 -070027 ProgressInterface* progress;
Patrick Venturec181eba2019-01-15 13:10:22 -080028 const internal::Sys* sys;
Patrick Ventureaf696252018-12-11 10:22:14 -080029};
Patrick Venture9b534f02018-12-13 16:10:02 -080030
31} // namespace host_tool