Patrick Venture | af69625 | 2018-12-11 10:22:14 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "interface.hpp" |
Patrick Venture | c181eba | 2019-01-15 13:10:22 -0800 | [diff] [blame] | 4 | #include "internal/sys.hpp" |
Patrick Venture | cf9b219 | 2019-06-27 12:09:52 -0700 | [diff] [blame] | 5 | #include "progress.hpp" |
Patrick Venture | af69625 | 2018-12-11 10:22:14 -0800 | [diff] [blame] | 6 | |
Patrick Venture | 664c5bc | 2019-03-07 08:09:45 -0800 | [diff] [blame] | 7 | #include <ipmiblob/blob_interface.hpp> |
| 8 | |
Patrick Venture | 9b534f0 | 2018-12-13 16:10:02 -0800 | [diff] [blame] | 9 | namespace host_tool |
| 10 | { |
| 11 | |
Patrick Venture | af69625 | 2018-12-11 10:22:14 -0800 | [diff] [blame] | 12 | class BtDataHandler : public DataInterface |
| 13 | { |
| 14 | public: |
Patrick Venture | cf9b219 | 2019-06-27 12:09:52 -0700 | [diff] [blame] | 15 | BtDataHandler(ipmiblob::BlobInterface* blob, ProgressInterface* progress, |
Patrick Venture | c181eba | 2019-01-15 13:10:22 -0800 | [diff] [blame] | 16 | const internal::Sys* sys = &internal::sys_impl) : |
Patrick Williams | 42a44c2 | 2024-08-16 15:21:32 -0400 | [diff] [blame^] | 17 | blob(blob), progress(progress), sys(sys) {}; |
Patrick Venture | af69625 | 2018-12-11 10:22:14 -0800 | [diff] [blame] | 18 | |
| 19 | bool sendContents(const std::string& input, std::uint16_t session) override; |
Patrick Venture | 84778b8 | 2019-06-26 20:11:09 -0700 | [diff] [blame] | 20 | ipmi_flash::FirmwareFlags::UpdateFlags supportedType() const override |
Patrick Venture | 8a55dcb | 2018-12-12 21:12:58 -0800 | [diff] [blame] | 21 | { |
Patrick Venture | 84778b8 | 2019-06-26 20:11:09 -0700 | [diff] [blame] | 22 | return ipmi_flash::FirmwareFlags::UpdateFlags::ipmi; |
Patrick Venture | 8a55dcb | 2018-12-12 21:12:58 -0800 | [diff] [blame] | 23 | } |
Patrick Venture | 0088759 | 2018-12-11 10:57:06 -0800 | [diff] [blame] | 24 | |
| 25 | private: |
Patrick Venture | 664c5bc | 2019-03-07 08:09:45 -0800 | [diff] [blame] | 26 | ipmiblob::BlobInterface* blob; |
Patrick Venture | cf9b219 | 2019-06-27 12:09:52 -0700 | [diff] [blame] | 27 | ProgressInterface* progress; |
Patrick Venture | c181eba | 2019-01-15 13:10:22 -0800 | [diff] [blame] | 28 | const internal::Sys* sys; |
Patrick Venture | af69625 | 2018-12-11 10:22:14 -0800 | [diff] [blame] | 29 | }; |
Patrick Venture | 9b534f0 | 2018-12-13 16:10:02 -0800 | [diff] [blame] | 30 | |
| 31 | } // namespace host_tool |