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