#pragma once
#include "manager.hpp"
#include "types.hpp"

#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/bus.hpp>

namespace vpd
{

/**
 * @brief Interface class for BIOS handling.
 *
 * The class layout has the virtual methods required to be implemented by any
 * concrete class that intends to use the feature provided via BIOS handler
 * class.
 */
class BiosHandlerInterface
{
  public:
    /**
     * @brief API to back up or restore BIOS attributes.
     *
     * Concrete class should implement the API and read the backed up data from
     * its designated location and take a call if it should be backed up or
     * restored.
     */
    virtual void backUpOrRestoreBiosAttributes() = 0;

    /**
     * @brief Callback API to be triggered on BIOS attribute change.
     *
     * Concrete class should implement the API to extract the attribute and its
     * value from DBus message broadcasted on BIOS attribute change.
     * The definition should be overridden in concrete class to deal with BIOS
     * attributes interested in.
     *
     * @param[in] i_msg - The callback message.
     */
    virtual void biosAttributesCallback(sdbusplus::message_t& i_msg) = 0;
};

/**
 * @brief IBM specifc BIOS handler class.
 */
class IbmBiosHandler : public BiosHandlerInterface
{
  public:
    /**
     * @brief Construct a new IBM BIOS Handler object
     *
     * This constructor constructs a new IBM BIOS Handler object
     * @param[in] i_manager - Manager object.
     */
    explicit IbmBiosHandler(const std::shared_ptr<Manager>& i_manager) :
        m_manager(i_manager)
    {}

    /**
     * @brief API to back up or restore BIOS attributes.
     *
     * The API will read the backed up data from the VPD keyword and based on
     * its value, either backs up or restores the data.
     */
    virtual void backUpOrRestoreBiosAttributes();

    /**
     * @brief Callback API to be triggered on BIOS attribute change.
     *
     * The API to extract the required attribute and its value from DBus message
     * broadcasted on BIOS attribute change.
     *
     * @param[in] i_msg - The callback message.
     */
    virtual void biosAttributesCallback(sdbusplus::message_t& i_msg);

  private:
    /**
     * @brief API to read given attribute from BIOS table.
     *
     * @param[in] attributeName - Attribute to be read.
     * @return - Bios attribute current value.
     */
    types::BiosAttributeCurrentValue readBiosAttribute(
        const std::string& attributeName);

    /**
     * @brief API to process "hb_field_core_override" attribute.
     *
     * The API checks value stored in VPD. If found default then the BIOS value
     * is saved to VPD else VPD value is restored in BIOS pending attribute
     * table.
     */
    void processFieldCoreOverride();

    /**
     * @brief API to save FCO data into VPD.
     *
     * @param[in] i_fcoInBios - FCO value.
     */
    void saveFcoToVpd(int64_t i_fcoInBios);

    /**
     * @brief API to save given value to "hb_field_core_override" attribute.
     *
     * @param[in] i_fcoVal - FCO value.
     */
    void saveFcoToBios(const types::BinaryVector& i_fcoVal);

    /**
     * @brief API to save AMM data into VPD.
     *
     * @param[in] i_memoryMirrorMode - Memory mirror mode value.
     */
    void saveAmmToVpd(const std::string& i_memoryMirrorMode);

    /**
     * @brief API to save given value to "hb_memory_mirror_mode" attribute.
     *
     * @param[in] i_ammVal - AMM value.
     */
    void saveAmmToBios(const std::string& i_ammVal);

    /**
     * @brief API to process "hb_memory_mirror_mode" attribute.
     *
     * The API checks value stored in VPD. If found default then the BIOS value
     * is saved to VPD else VPD value is restored in BIOS pending attribute
     * table.
     */
    void processActiveMemoryMirror();

    /**
     * @brief API to process "pvm_create_default_lpar" attribute.
     *
     * The API reads the value from VPD and restore it to the BIOS attribute
     * in BIOS pending attribute table.
     */
    void processCreateDefaultLpar();

    /**
     * @brief API to save given value to "pvm_create_default_lpar" attribute.
     *
     * @param[in] i_createDefaultLparVal - Value to be saved;
     */
    void saveCreateDefaultLparToBios(const std::string& i_createDefaultLparVal);

    /**
     * @brief API to save given value to VPD.
     *
     * @param[in] i_createDefaultLparVal - Value to be saved.
     *
     */
    void saveCreateDefaultLparToVpd(const std::string& i_createDefaultLparVal);

    /**
     * @brief API to process "pvm_clear_nvram" attribute.
     *
     * The API reads the value from VPD and restores it to the BIOS pending
     * attribute table.
     */
    void processClearNvram();

    /**
     * @brief API to save given value to "pvm_clear_nvram" attribute.
     *
     * @param[in] i_clearNvramVal - Value to be saved.
     */
    void saveClearNvramToBios(const std::string& i_clearNvramVal);

    /**
     * @brief API to save given value to VPD.
     *
     * @param[in] i_clearNvramVal - Value to be saved.
     */
    void saveClearNvramToVpd(const std::string& i_clearNvramVal);

    /**
     * @brief API to process "pvm_keep_and_clear" attribute.
     *
     * The API reads the value from VPD and restore it to the BIOS pending
     * attribute table.
     */
    void processKeepAndClear();

    /**
     * @brief API to save given value to "pvm_keep_and_clear" attribute.
     *
     * @param[in] i_KeepAndClearVal - Value to be saved.
     */
    void saveKeepAndClearToBios(const std::string& i_KeepAndClearVal);

    /**
     * @brief API to save given value to VPD.
     *
     * @param[in] i_KeepAndClearVal - Value to be saved.
     */
    void saveKeepAndClearToVpd(const std::string& i_KeepAndClearVal);

    // const reference to shared pointer to Manager object.
    const std::shared_ptr<Manager>& m_manager;
};

/**
 * @brief A class to operate upon BIOS attributes.
 *
 * The class along with specific BIOS handler class(es), provides a feature
 * where specific BIOS attributes identified by the concrete specific class can
 * be listened for any change and can be backed up to a desired location or
 * restored back to the BIOS table.
 *
 * To use the feature, "BiosHandlerInterface" should be implemented by a
 * concrete class and the same should be used to instantiate BiosHandler.
 *
 * This class registers call back to listen to PLDM service as it is being used
 * for reading/writing BIOS attributes.
 *
 * The feature can be used in a factory reset scenario where backed up values
 * can be used to restore BIOS.
 *
 */
template <typename T>
class BiosHandler
{
  public:
    // deleted APIs
    BiosHandler() = delete;
    BiosHandler(const BiosHandler&) = delete;
    BiosHandler& operator=(const BiosHandler&) = delete;
    BiosHandler& operator=(BiosHandler&&) = delete;
    ~BiosHandler() = default;

    /**
     * @brief Constructor.
     *
     * @param[in] i_connection - Asio connection object.
     * @param[in] i_manager - Manager object.
     */
    BiosHandler(
        const std::shared_ptr<sdbusplus::asio::connection>& i_connection,
        const std::shared_ptr<Manager>& i_manager) : m_asioConn(i_connection)
    {
        m_specificBiosHandler = std::make_shared<T>(i_manager);
        checkAndListenPldmService();
    }

  private:
    /**
     * @brief API to check if PLDM service is running and run BIOS sync.
     *
     * This API checks if the PLDM service is running and if yes it will start
     * an immediate sync of BIOS attributes. If the service is not running, it
     * registers a listener to be notified when the service starts so that a
     * restore can be performed.
     */
    void checkAndListenPldmService();

    /**
     * @brief Register listener for BIOS attribute property change.
     *
     * The VPD manager needs to listen for property change of certain BIOS
     * attributes that are backed in VPD. When the attributes change, the new
     * value is written back to the VPD keywords that backs them up.
     */
    void listenBiosAttributes();

    // Reference to the connection.
    const std::shared_ptr<sdbusplus::asio::connection>& m_asioConn;

    // shared pointer to specific BIOS handler.
    std::shared_ptr<T> m_specificBiosHandler;
};
} // namespace vpd
