blob: 2e4afe2886c13bf9e9f3fb93a107e1553bd5fd20 [file] [log] [blame]
Brandon Wyman3f1242f2020-01-28 13:11:25 -06001#pragma once
2
3#include "util_base.hpp"
4#include "utility.hpp"
5
6namespace phosphor::power::psu
7{
8
9class Util : public UtilBase
10{
11 public:
12 //~Util(){};
13 bool getPresence(sdbusplus::bus::bus& bus,
14 const std::string& invpath) const override
15 {
16 bool present = false;
17
18 // Use getProperty utility function to get presence status.
19 util::getProperty(INVENTORY_IFACE, PRESENT_PROP, invpath,
20 INVENTORY_MGR_IFACE, bus, present);
21
22 return present;
23 }
24};
25
26} // namespace phosphor::power::psu