#include "Inventory.hpp"

#include "Utils.hpp"

#include <NvidiaGpuMctpVdm.hpp>
#include <phosphor-logging/lg2.hpp>
#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/asio/object_server.hpp>

#include <exception>
#include <memory>
#include <string>

constexpr const char* inventoryPrefix = "/xyz/openbmc_project/inventory/";
constexpr const char* acceleratorIfaceName =
    "xyz.openbmc_project.Inventory.Item.Accelerator";

Inventory::Inventory(
    const std::shared_ptr<sdbusplus::asio::connection>& /*conn*/,
    sdbusplus::asio::object_server& objectServer,
    const std::string& inventoryName,
    const gpu::DeviceIdentification deviceType) :
    name(escapeName(inventoryName))
{
    if (deviceType == gpu::DeviceIdentification::DEVICE_GPU)
    {
        std::string path = inventoryPrefix + name;
        try
        {
            acceleratorInterface =
                objectServer.add_interface(path, acceleratorIfaceName);
            acceleratorInterface->register_property("Type", std::string("GPU"));
            acceleratorInterface->initialize();
        }
        catch (const std::exception& e)
        {
            lg2::error(
                "Failed to add accelerator interface. path='{PATH}', error='{ERROR}'",
                "PATH", path, "ERROR", e.what());
        }
    }
}
