| // 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 <sdbusplus/bus.hpp> |
| #include <xyz/openbmc_project/Software/Activation/server.hpp> |
| |
| namespace google |
| { |
| namespace hoth |
| { |
| |
| template <typename... T> |
| using ServerObject = typename sdbusplus::server::object::object<T...>; |
| using ActivationInterface = |
| sdbusplus::xyz::openbmc_project::Software::server::Activation; |
| using ActivationObject = ServerObject<ActivationInterface>; |
| |
| /** @class SwActivation |
| * @brief Software Activation interface implementation for all Versions. |
| * @details A concrete implementation for |
| * xyz.openbmc_project.Software.Activation DBus API. |
| */ |
| class SwActivation : public ActivationObject |
| { |
| public: |
| SwActivation(sdbusplus::bus::bus& bus, const char* objPath) : |
| ActivationObject(bus, objPath) |
| { |
| activation(Activations::Active); |
| } |
| }; |
| |
| } // namespace hoth |
| |
| } // namespace google |