xref: /openbmc/phosphor-ipmi-flash/tools/bt.hpp (revision 42a44c281cce08be0ca6251955f4fb73d30c8ced)
1af69625fSPatrick Venture #pragma once
2af69625fSPatrick Venture 
3af69625fSPatrick Venture #include "interface.hpp"
4c181ebafSPatrick Venture #include "internal/sys.hpp"
5cf9b2195SPatrick Venture #include "progress.hpp"
6af69625fSPatrick Venture 
7664c5bc7SPatrick Venture #include <ipmiblob/blob_interface.hpp>
8664c5bc7SPatrick Venture 
99b534f06SPatrick Venture namespace host_tool
109b534f06SPatrick Venture {
119b534f06SPatrick Venture 
12af69625fSPatrick Venture class BtDataHandler : public DataInterface
13af69625fSPatrick Venture {
14af69625fSPatrick Venture   public:
BtDataHandler(ipmiblob::BlobInterface * blob,ProgressInterface * progress,const internal::Sys * sys=& internal::sys_impl)15cf9b2195SPatrick Venture     BtDataHandler(ipmiblob::BlobInterface* blob, ProgressInterface* progress,
16c181ebafSPatrick Venture                   const internal::Sys* sys = &internal::sys_impl) :
17*42a44c28SPatrick Williams         blob(blob), progress(progress), sys(sys) {};
18af69625fSPatrick Venture 
19af69625fSPatrick Venture     bool sendContents(const std::string& input, std::uint16_t session) override;
supportedType() const2084778b8dSPatrick Venture     ipmi_flash::FirmwareFlags::UpdateFlags supportedType() const override
218a55dcbdSPatrick Venture     {
2284778b8dSPatrick Venture         return ipmi_flash::FirmwareFlags::UpdateFlags::ipmi;
238a55dcbdSPatrick Venture     }
2400887597SPatrick Venture 
2500887597SPatrick Venture   private:
26664c5bc7SPatrick Venture     ipmiblob::BlobInterface* blob;
27cf9b2195SPatrick Venture     ProgressInterface* progress;
28c181ebafSPatrick Venture     const internal::Sys* sys;
29af69625fSPatrick Venture };
309b534f06SPatrick Venture 
319b534f06SPatrick Venture } // namespace host_tool
32