Allow initiating or offloading host dumps only when host is up.

When the host is not up the system dump cannot be initiated or
offloaded. Adding a check whether the host is up before starting
the creation of the host dump.
Added a new utility to check whether host is running, this can
be called to check whether host is running before initiating
actions like initiate, offload, delete on host dumps.
Automatic clearing off host dump entries during a system power
off will be handled with #ibm-openbmc/issues/2860

Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: Ieb3163ef9b329d3b99807722bd5ac985bf3da25e
diff --git a/dump_utils.hpp b/dump_utils.hpp
index 5121bab..40891ea 100644
--- a/dump_utils.hpp
+++ b/dump_utils.hpp
@@ -84,5 +84,13 @@
  */
 BootProgress getBootProgress();
 
+/**
+ * @brief Check whether host is running
+ *
+ * @return true if the host running else false.
+ *         Throw exception on failure.
+ */
+bool isHostRunning();
+
 } // namespace dump
 } // namespace phosphor