blob: 16605fd3208efc0dc63bfc68580e3d955f982152 [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) :
17 blob(blob),
Patrick Venturecf9b2192019-06-27 12:09:52 -070018 progress(progress), sys(sys){};
Patrick Ventureaf696252018-12-11 10:22:14 -080019
20 bool sendContents(const std::string& input, std::uint16_t session) override;
Patrick Venture84778b82019-06-26 20:11:09 -070021 ipmi_flash::FirmwareFlags::UpdateFlags supportedType() const override
Patrick Venture8a55dcb2018-12-12 21:12:58 -080022 {
Patrick Venture84778b82019-06-26 20:11:09 -070023 return ipmi_flash::FirmwareFlags::UpdateFlags::ipmi;
Patrick Venture8a55dcb2018-12-12 21:12:58 -080024 }
Patrick Venture00887592018-12-11 10:57:06 -080025
26 private:
Patrick Venture664c5bc2019-03-07 08:09:45 -080027 ipmiblob::BlobInterface* blob;
Patrick Venturecf9b2192019-06-27 12:09:52 -070028 ProgressInterface* progress;
Patrick Venturec181eba2019-01-15 13:10:22 -080029 const internal::Sys* sys;
Patrick Ventureaf696252018-12-11 10:22:14 -080030};
Patrick Venture9b534f02018-12-13 16:10:02 -080031
32} // namespace host_tool