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