#include "config.h"

#include "firmware_handler.hpp"
#include "image_handler.hpp"
#include "lpc_handler.hpp"
#include "pci_handler.hpp"
#include "static_handler.hpp"

#include <blobs-ipmid/manager.hpp>
#include <cstdint>
#include <memory>
#include <phosphor-logging/log.hpp>

namespace blobs
{
using namespace phosphor::logging;

namespace
{
StaticLayoutHandler staticLayoutHandler;
LpcDataHandler lpcDataHandler;
PciDataHandler pciDataHandler;

std::vector<HandlerPack> supportedFirmware = {
#ifdef ENABLE_STATIC_LAYOUT
    {"/flash/image", &staticLayoutHandler},
#endif
};

std::vector<DataHandlerPack> supportedTransports = {
    {FirmwareBlobHandler::FirmwareUpdateFlags::bt, nullptr},
#ifdef ENABLE_PCI_BRIDGE
    {FirmwareBlobHandler::FirmwareUpdateFlags::p2a, &pciDataHandler},
#endif
#ifdef ENABLE_LPC_BRIDGE
    {FirmwareBlobHandler::FirmwareUpdateFlags::lpc, &lpcDataHandler},
#endif
};

} // namespace

void setupFirmwareHandler() __attribute__((constructor));

void setupFirmwareHandler()
{
    auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
        supportedFirmware, supportedTransports);

    if (!handler)
    {
        log<level::ERR>("Firmware Handler has invalid configuration");
        return;
    }

    auto* manager = getBlobManager();

    if (!manager->registerHandler(std::move(handler)))
    {
        log<level::ERR>("Failed to register Firmware Handler");
    }
}

} // namespace blobs
