blob: 0955607ae1107dd2f87c0608d58ba577f1553436 [file] [log] [blame]
#pragma once
#include <sdbusplus/asio/connection.hpp>
#include <sdbusplus/bus/match.hpp>
namespace power
{
class PowerStatusMonitor
{
public:
bool isPowerOn();
void setupPowerMatch(
const std::shared_ptr<sdbusplus::asio::connection>& conn);
private:
void handlePowerMatch(sdbusplus::message_t& message);
bool powerStatusOn = false;
std::unique_ptr<sdbusplus::bus::match_t> powerMatch = nullptr;
};
} // namespace power