Tom Joseph | be5eaa1 | 2017-07-12 19:54:44 +0530 | [diff] [blame^] | 1 | #ifndef __HOST_IPMI_DCMI_HANDLER_H__ |
| 2 | #define __HOST_IPMI_DCMI_HANDLER_H__ |
| 3 | |
| 4 | #include <map> |
| 5 | #include <string> |
| 6 | #include <vector> |
| 7 | |
| 8 | // IPMI commands for net functions. |
| 9 | enum ipmi_netfn_sen_cmds |
| 10 | { |
| 11 | // Get capability bits |
| 12 | IPMI_CMD_DCMI_GET_POWER = 0x03, |
| 13 | }; |
| 14 | |
| 15 | namespace dcmi |
| 16 | { |
| 17 | |
| 18 | static constexpr auto propIntf = "org.freedesktop.DBus.Properties"; |
| 19 | static constexpr auto assetTagIntf = |
| 20 | "xyz.openbmc_project.Inventory.Decorator.AssetTag"; |
| 21 | static constexpr auto assetTagProp = "AssetTag"; |
| 22 | |
| 23 | namespace assettag |
| 24 | { |
| 25 | |
| 26 | using ObjectPath = std::string; |
| 27 | using Service = std::string; |
| 28 | using Interfaces = std::vector<std::string>; |
| 29 | using ObjectTree = std::map<ObjectPath, std::map<Service, Interfaces>>; |
| 30 | |
| 31 | } //namespace assettag |
| 32 | |
| 33 | /** @brief Read the object tree to fetch the object path that implemented the |
| 34 | * Asset tag interface. |
| 35 | * |
| 36 | * @param[in,out] objectTree - object tree |
| 37 | * |
| 38 | * @return On success return the object tree with the object path that |
| 39 | * implemented the AssetTag interface. |
| 40 | */ |
| 41 | void readAssetTagObjectTree(dcmi::assettag::ObjectTree& objectTree); |
| 42 | |
| 43 | /** @brief Read the asset tag of the server |
| 44 | * |
| 45 | * @return On success return the asset tag. |
| 46 | */ |
| 47 | std::string readAssetTag(); |
| 48 | |
| 49 | } // namespace dcmi |
| 50 | |
| 51 | #endif |