1 #pragma once 2 #include "ipmi_fru_info_area.hpp" 3 4 #include <sdbusplus/bus.hpp> 5 #include <string> 6 7 namespace ipmi 8 { 9 namespace fru 10 { 11 using FRUId = uint8_t; 12 using FRUAreaMap = std::map<FRUId, FruAreaData>; 13 14 static constexpr auto xyzPrefix = "/xyz/openbmc_project/"; 15 static constexpr auto invMgrInterface = "xyz.openbmc_project.Inventory.Manager"; 16 static constexpr auto invObjPath = "/xyz/openbmc_project/inventory"; 17 static constexpr auto propInterface = "org.freedesktop.DBus.Properties"; 18 static constexpr auto invItemInterface = "xyz.openbmc_project.Inventory.Item"; 19 static constexpr auto itemPresentProp = "Present"; 20 21 /** 22 * @brief Get fru area data as per IPMI specification 23 * 24 * @param[in] fruNum FRU ID 25 * 26 * @return FRU area data as per IPMI specification 27 */ 28 const FruAreaData& getFruAreaData(const FRUId& fruNum); 29 30 /** 31 * @brief Register callback handler into DBUS for PropertyChange events 32 * 33 * @return negative value on failure 34 */ 35 int registerCallbackHandler(); 36 } // namespace fru 37 } // namespace ipmi 38