snoop.h/main.cpp: Add first tests for PostReporter class

Add unit tests for PostReporter DBus object path, reading, and updating.
Move the class definition to the header file such that the
tests can access it.

Tested: unit tests pass.

Change-Id: I4d3571ccd5455297d6b02ed74ed789fe05e40979
Signed-off-by: Kun Yi <kunyi731@gmail.com>
diff --git a/lpcsnoop/snoop.hpp b/lpcsnoop/snoop.hpp
index d1dd847..90729be 100644
--- a/lpcsnoop/snoop.hpp
+++ b/lpcsnoop/snoop.hpp
@@ -1,6 +1,25 @@
 #pragma once
 
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/server.hpp>
+
+#include "xyz/openbmc_project/State/Boot/Raw/server.hpp"
+
 /* The LPC snoop on port 80h is mapped to this dbus path. */
 #define SNOOP_OBJECTPATH "/xyz/openbmc_project/state/boot/raw"
 /* The LPC snoop on port 80h is mapped to this dbus service. */
 #define SNOOP_BUSNAME "xyz.openbmc_project.State.Boot.Raw"
+
+template <typename... T>
+using ServerObject = typename sdbusplus::server::object::object<T...>;
+using PostInterface = sdbusplus::xyz::openbmc_project::State::Boot::server::Raw;
+using PostObject = ServerObject<PostInterface>;
+
+class PostReporter : public PostObject
+{
+  public:
+    PostReporter(sdbusplus::bus::bus& bus, const char* objPath, bool defer) :
+        PostObject(bus, objPath, defer)
+    {
+    }
+};