Marri Devender Rao | 0acf057 | 2017-07-03 12:25:47 -0500 | [diff] [blame] | 1 | #pragma once |
Marri Devender Rao | 0acf057 | 2017-07-03 12:25:47 -0500 | [diff] [blame] | 2 | #include "ipmi_fru_info_area.hpp" |
| 3 | |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 4 | #include <sdbusplus/bus.hpp> |
| 5 | #include <string> |
| 6 | |
Marri Devender Rao | 0acf057 | 2017-07-03 12:25:47 -0500 | [diff] [blame] | 7 | namespace ipmi |
| 8 | { |
| 9 | namespace fru |
| 10 | { |
| 11 | using FRUId = uint8_t; |
| 12 | using FRUAreaMap = std::map<FRUId, FruAreaData>; |
Kirill Pakhomov | b118c4b | 2020-05-08 18:38:26 +0300 | [diff] [blame] | 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"; |
Kirill Pakhomov | fa6e209 | 2020-04-24 18:57:15 +0300 | [diff] [blame] | 18 | static constexpr auto invItemInterface = "xyz.openbmc_project.Inventory.Item"; |
| 19 | static constexpr auto itemPresentProp = "Present"; |
Kirill Pakhomov | b118c4b | 2020-05-08 18:38:26 +0300 | [diff] [blame] | 20 | |
Marri Devender Rao | 0acf057 | 2017-07-03 12:25:47 -0500 | [diff] [blame] | 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 | |
Marri Devender Rao | 908f750 | 2017-07-10 01:49:54 -0500 | [diff] [blame] | 30 | /** |
| 31 | * @brief Register callback handler into DBUS for PropertyChange events |
| 32 | * |
| 33 | * @return negative value on failure |
| 34 | */ |
| 35 | int registerCallbackHandler(); |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 36 | } // namespace fru |
| 37 | } // namespace ipmi |