blob: 2d294f0d76d71636b8462a074c23ebb32e7d6676 [file] [log] [blame]
Sampa Misraaea5dde2020-08-31 08:33:47 -05001#pragma once
2
3#include "inband_code_update.hpp"
4#include "libpldmresponder/oem_handler.hpp"
5#include "libpldmresponder/platform.hpp"
6
7namespace pldm
8{
9
10namespace responder
11{
12
13namespace oem_ibm_platform
14{
15
16#define PLDM_OEM_IBM_FIRMWARE_UPDATE_STATE 32768
17#define PLDM_OEM_IBM_BOOT_STATE 32769
18
19class Handler : public oem_platform::Handler
20{
21 public:
22 Handler(const pldm::utils::DBusHandler* dBusIntf,
23 pldm::responder::CodeUpdate* codeUpdate) :
24 oem_platform::Handler(dBusIntf),
25 codeUpdate(codeUpdate), platformHandler(nullptr)
26 {
27 codeUpdate->setVersions();
28 }
29
30 int getOemStateSensorReadingsHandler(
31 EntityType entityType, EntityInstance entityInstance,
32 StateSetId stateSetId, CompositeCount compSensorCnt,
33 std::vector<get_sensor_state_field>& stateField);
34
35 int oemSetStateEffecterStatesHandler(
36 EntityType entityType, EntityInstance entityInstance,
37 StateSetId stateSetId, CompositeCount compEffecterCnt,
38 const std::vector<set_effecter_state_field>& stateField);
39
40 /** @brief Method to set the platform handler in the
41 * oem_ibm_handler class
42 * @param[in] handler - pointer to PLDM platform handler
43 */
44 void setPlatformHandler(pldm::responder::platform::Handler* handler);
45
46 ~Handler() = default;
47
48 pldm::responder::CodeUpdate* codeUpdate; //!< pointer to CodeUpdate object
49 pldm::responder::platform::Handler*
50 platformHandler; //!< pointer to PLDM platform handler
51};
52
53} // namespace oem_ibm_platform
54
55} // namespace responder
56
57} // namespace pldm