blob: dfe1d4efbb99a8366e0078c824b23800817eef0b [file] [log] [blame]
Tom Josephbe5eaa12017-07-12 19:54:44 +05301#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.
9enum ipmi_netfn_sen_cmds
10{
11 // Get capability bits
12 IPMI_CMD_DCMI_GET_POWER = 0x03,
13};
14
15namespace dcmi
16{
17
18static constexpr auto propIntf = "org.freedesktop.DBus.Properties";
19static constexpr auto assetTagIntf =
20 "xyz.openbmc_project.Inventory.Decorator.AssetTag";
21static constexpr auto assetTagProp = "AssetTag";
22
23namespace 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 */
41void 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 */
47std::string readAssetTag();
48
49} // namespace dcmi
50
51#endif