blob: d89646ccd30d0ccc8b4b0ea7a5a233a9a3a6026f [file] [log] [blame]
Marri Devender Rao0acf0572017-07-03 12:25:47 -05001#pragma once
Marri Devender Rao0acf0572017-07-03 12:25:47 -05002#include "ipmi_fru_info_area.hpp"
3
Patrick Venture0b02be92018-08-31 11:55:55 -07004#include <sdbusplus/bus.hpp>
5#include <string>
6
Marri Devender Rao0acf0572017-07-03 12:25:47 -05007namespace ipmi
8{
9namespace fru
10{
11using FRUId = uint8_t;
12using FRUAreaMap = std::map<FRUId, FruAreaData>;
Kirill Pakhomovb118c4b2020-05-08 18:38:26 +030013
14static constexpr auto xyzPrefix = "/xyz/openbmc_project/";
15static constexpr auto invMgrInterface = "xyz.openbmc_project.Inventory.Manager";
16static constexpr auto invObjPath = "/xyz/openbmc_project/inventory";
17static constexpr auto propInterface = "org.freedesktop.DBus.Properties";
18
Marri Devender Rao0acf0572017-07-03 12:25:47 -050019/**
20 * @brief Get fru area data as per IPMI specification
21 *
22 * @param[in] fruNum FRU ID
23 *
24 * @return FRU area data as per IPMI specification
25 */
26const FruAreaData& getFruAreaData(const FRUId& fruNum);
27
Marri Devender Rao908f7502017-07-10 01:49:54 -050028/**
29 * @brief Register callback handler into DBUS for PropertyChange events
30 *
31 * @return negative value on failure
32 */
33int registerCallbackHandler();
Patrick Venture0b02be92018-08-31 11:55:55 -070034} // namespace fru
35} // namespace ipmi