PEL: Add HostNotifier class

This class will watch for new PELs being created, and handle sending
them up to the host.  This first commit for this class mostly just fills
in the constructor to set up the various callbacks it will use.

It is only instantiated in the Manager class if the Manager constructor
used is the one that passes in the HostInterface object, to allow for
configurations that don't need PELs passed up.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0ddcf94d047979eb78209d396c2351566c634dbe
diff --git a/test/openpower-pels/mocks.hpp b/test/openpower-pels/mocks.hpp
index 1dc0902..c2a84a0 100644
--- a/test/openpower-pels/mocks.hpp
+++ b/test/openpower-pels/mocks.hpp
@@ -1,4 +1,10 @@
 #include "extensions/openpower-pels/data_interface.hpp"
+#include "extensions/openpower-pels/host_interface.hpp"
+
+#include <fcntl.h>
+
+#include <filesystem>
+#include <sdeventplus/source/io.hpp>
 
 #include <gmock/gmock.h>
 
@@ -13,10 +19,53 @@
     MockDataInterface()
     {
     }
-    MOCK_CONST_METHOD0(getMachineTypeModel, std::string());
-    MOCK_CONST_METHOD0(getMachineSerialNumber, std::string());
-    MOCK_CONST_METHOD0(getServerFWVersion, std::string());
-    MOCK_CONST_METHOD0(getBMCFWVersion, std::string());
+    MOCK_METHOD(std::string, getMachineTypeModel, (), (const override));
+    MOCK_METHOD(std::string, getMachineSerialNumber, (), (const override));
+    MOCK_METHOD(std::string, getServerFWVersion, (), (const override));
+    MOCK_METHOD(std::string, getBMCFWVersion, (), (const override));
+
+    void changeHostState(bool newState)
+    {
+        setHostState(newState);
+    }
+
+    void setHMCManaged(bool managed)
+    {
+        _hmcManaged = managed;
+    }
+};
+
+/**
+ * @brief The mock HostInterface class
+ */
+class MockHostInterface : public HostInterface
+{
+  public:
+    MockHostInterface(sd_event* event, DataInterfaceBase& dataIface) :
+        HostInterface(event, dataIface)
+    {
+    }
+
+    virtual ~MockHostInterface()
+    {
+    }
+
+    virtual void cancelCmd() override
+    {
+    }
+
+    MOCK_METHOD(CmdStatus, sendNewLogCmd, (uint32_t, uint32_t), (override));
+
+  protected:
+    void receive(sdeventplus::source::IO& source, int fd,
+                 uint32_t events) override
+    {
+        // Keep account of the number of commands responses for testing.
+        _cmdsProcessed++;
+    }
+
+  private:
+    size_t _cmdsProcessed = 0;
 };
 
 } // namespace pels