#pragma once

#include "image_handler.hpp"

#include <cstdint>
#include <fstream>
#include <memory>
#include <string>
#include <vector>

namespace ipmi_flash
{

class FileHandler : public ImageHandlerInterface
{
  public:
    /**
     * Create a FileHandler.  This object is basically a filewriter.
     *
     * @param[in] filename - file to use for the contents, fully
     * qualified file system path.
     */
    explicit FileHandler(const std::string& filename) : filename(filename) {}

    bool open(const std::string& path,
              std::ios_base::openmode mode = std::ios::out) override;
    void close() override;
    bool write(std::uint32_t offset,
               const std::vector<std::uint8_t>& data) override;
    virtual std::optional<std::vector<uint8_t>>
        read(std::uint32_t offset, std::uint32_t size) override;
    int getSize() override;

  private:
    /** the active hash path, ignore. */
    std::string path;

    /** The file handle. */
    std::fstream file;

    /** The filename (including path) to use to write bytes. */
    std::string filename;
};

} // namespace ipmi_flash
