Add checks for currently running host image before erasing

- Check for Host state and the Active image. If the image we're trying to
erase matches the Active image and the host is running, fail to erase the
image.

Resolves openbmc/openbmc#1986

Change-Id: Ia9488c9ede585494fa4449ef0e83af35d50d03f8
Signed-off-by: Eddie James <eajames@us.ibm.com>
diff --git a/item_updater.hpp b/item_updater.hpp
index 812c9fe..8e6637a 100755
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -151,6 +151,20 @@
         /** @brief Host factory reset - clears PNOR partitions for each
           * Activation dbus object */
         void reset() override;
+
+        /** @brief Check whether the provided image id is the functional one
+         *
+         * @param[in] - versionId - The id of the image to check.
+         *
+         * @return - Returns true if this version is currently functional.
+         */
+        static bool isVersionFunctional(std::string versionId);
+
+        /** @brief Check whether the host is running
+         *
+         * @return - Returns true if the Chassis is powered on.
+         */
+        bool isChassisOn();
 };
 
 } // namespace updater