pldm: Add support for OCC reset

BMC initiated OCC reset is translated to a SetStateEffecterStates
request for state effecter corresponding to the OCC instance.

Tested:

Invoked resetOCC path explicitly and verified that the
SetStateEffecterStates request message for OCCReset is accurate.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: I4e0d211b51151d24bf0112819fc9f201698bfac0
diff --git a/occ_status.hpp b/occ_status.hpp
index 1617d12..24dcb0e 100644
--- a/occ_status.hpp
+++ b/occ_status.hpp
@@ -62,10 +62,18 @@
      *  @param[in] manager  - OCC manager instance
      *  @param[in] callBack - Callback handler to invoke during
      *                        property change
+     *  @param[in] resetCallBack - callback handler to invoke for resetting the
+     *                             OCC if PLDM is the host communication
+     *                             protocol
      */
     Status(sdbusplus::bus::bus& bus, EventPtr& event, const char* path,
-           const Manager& manager,
-           std::function<void(bool)> callBack = nullptr) :
+           const Manager& manager, std::function<void(bool)> callBack = nullptr
+#ifdef PLDM
+           ,
+           std::function<void(instanceID)> resetCallBack = nullptr
+#endif
+           ) :
+
         Interface(bus, getDbusPath(path).c_str(), true),
         bus(bus), path(path), callBack(callBack), instance(getInstance(path)),
         device(event,
@@ -87,6 +95,10 @@
                                        Control::Host::Command::OCCReset)),
             std::bind(std::mem_fn(&Status::hostControlEvent), this,
                       std::placeholders::_1))
+#ifdef PLDM
+        ,
+        resetCallBack(resetCallBack)
+#endif
     {
         // Check to see if we have OCC already bound.  If so, just set it
         if (device.bound())
@@ -207,6 +219,9 @@
 
         return estimatedPath;
     }
+#ifdef PLDM
+    std::function<void(instanceID)> resetCallBack = nullptr;
+#endif
 };
 
 } // namespace occ