| // 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 "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> |
| |
| 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::HostCommand; |
| |
| class Asset : public AssetAssociationObject |
| { |
| public: |
| Asset(sdbusplus::bus::bus& bus, const std::string& objPath, |
| const std::string& boardPath, HostCommand* hostCmd); |
| |
| private: |
| /** @brief Connection to Hoth for sending and receiving host commands */ |
| HostCommand* hostCmd; |
| }; |
| |
| } // namespace hoth |
| |
| } // namespace google |