xref: /openbmc/phosphor-ipmi-flash/tools/bt.hpp (revision 84778b8d630ecfb7dbac7ca98ae3e9778ae8cdde)
1af69625fSPatrick Venture #pragma once
2af69625fSPatrick Venture 
3af69625fSPatrick Venture #include "interface.hpp"
4c181ebafSPatrick Venture #include "internal/sys.hpp"
5af69625fSPatrick Venture 
6664c5bc7SPatrick Venture #include <ipmiblob/blob_interface.hpp>
7664c5bc7SPatrick Venture 
89b534f06SPatrick Venture namespace host_tool
99b534f06SPatrick Venture {
109b534f06SPatrick Venture 
11af69625fSPatrick Venture class BtDataHandler : public DataInterface
12af69625fSPatrick Venture {
13af69625fSPatrick Venture   public:
14664c5bc7SPatrick Venture     BtDataHandler(ipmiblob::BlobInterface* blob,
15c181ebafSPatrick Venture                   const internal::Sys* sys = &internal::sys_impl) :
16c181ebafSPatrick Venture         blob(blob),
17c181ebafSPatrick Venture         sys(sys){};
18af69625fSPatrick Venture 
19af69625fSPatrick Venture     bool sendContents(const std::string& input, std::uint16_t session) override;
20*84778b8dSPatrick Venture     ipmi_flash::FirmwareFlags::UpdateFlags supportedType() const override
218a55dcbdSPatrick Venture     {
22*84778b8dSPatrick Venture         return ipmi_flash::FirmwareFlags::UpdateFlags::ipmi;
238a55dcbdSPatrick Venture     }
2400887597SPatrick Venture 
2500887597SPatrick Venture   private:
26664c5bc7SPatrick Venture     ipmiblob::BlobInterface* blob;
27c181ebafSPatrick Venture     const internal::Sys* sys;
28af69625fSPatrick Venture };
299b534f06SPatrick Venture 
309b534f06SPatrick Venture } // namespace host_tool
31