blob: 8601f5792fe3689d51c28b45c29c210d7d06a2dc [file]
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include "google3/host_commands.h"
#include "ec_util_interface.hpp"
#include "host_command.hpp"
#include <sdbusplus/bus.hpp>
#include <sdbusplus/bus/match.hpp>
#include <xyz/openbmc_project/Association/Definitions/server.hpp>
#include <xyz/openbmc_project/Inventory/Decorator/Asset/server.hpp>
#include <string>
#include <string_view>
namespace google
{
namespace hoth
{
template <typename... T>
using ServerObject = typename sdbusplus::server::object::object<T...>;
using AssetInterface =
sdbusplus::xyz::openbmc_project::Inventory::Decorator::server::Asset;
using AssoInterface =
sdbusplus::xyz::openbmc_project::Association::server::Definitions;
using AssetAssociationObject = ServerObject<AssetInterface, AssoInterface>;
using internal::EcUtil;
class Asset : public AssetAssociationObject
{
public:
Asset(sdbusplus::bus::bus& bus, const std::string& objPath,
const std::string& boardPath, EcUtil* ecUtil);
};
struct HothChipAssetInfo
{
std::string chip_serial_number;
std::string_view chip_part_number;
std::string_view chip_revision;
std::string_view chip_manufacturer;
};
HothChipAssetInfo get_hoth_chip_asset_info(internal::EcUtil& ec_util);
} // namespace hoth
} // namespace google