summaryrefslogtreecommitdiffstats
path: root/tools/bt.hpp
blob: 16605fd3208efc0dc63bfc68580e3d955f982152 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include "interface.hpp"
#include "internal/sys.hpp"
#include "progress.hpp"

#include <ipmiblob/blob_interface.hpp>

namespace host_tool
{

class BtDataHandler : public DataInterface
{
  public:
    BtDataHandler(ipmiblob::BlobInterface* blob, ProgressInterface* progress,
                  const internal::Sys* sys = &internal::sys_impl) :
        blob(blob),
        progress(progress), sys(sys){};

    bool sendContents(const std::string& input, std::uint16_t session) override;
    ipmi_flash::FirmwareFlags::UpdateFlags supportedType() const override
    {
        return ipmi_flash::FirmwareFlags::UpdateFlags::ipmi;
    }

  private:
    ipmiblob::BlobInterface* blob;
    ProgressInterface* progress;
    const internal::Sys* sys;
};

} // namespace host_tool
OpenPOWER on IntegriCloud