/* * SPDX-FileCopyrightText: Copyright (c) 2022-2024. All rights * reserved. SPDX-License-Identifier: Apache-2.0 */ #pragma once #include #include namespace gpio_presence { using AddedCallback = std::function; using RemovedCallback = std::function; class ConfigProvider { public: explicit ConfigProvider(sdbusplus::async::context& ctx, const std::string& interface); auto initialize(AddedCallback addConfig, RemovedCallback removeConfig) -> sdbusplus::async::task; private: auto getConfig(AddedCallback addConfig) -> sdbusplus::async::task; auto handleInterfacesAdded(AddedCallback addConfig) -> sdbusplus::async::task; auto handleInterfacesRemoved(RemovedCallback removeConfig) -> sdbusplus::async::task; // name of the dbus configuration interface std::string interface; sdbusplus::async::context& ctx; }; } // namespace gpio_presence