Add Host selector button interface

This change includes new button interface
for the host selector switch.

The  button handler code is adapted to support
both single host and multiple host power control
dbus events.

design : https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/45544

Signed-off-by: Naveen Moses <naveen.mosess@hcl.com>
Change-Id: Icbfb22baaee057fd255c3ab0cba129693b913a9d
diff --git a/inc/button_handler.hpp b/inc/button_handler.hpp
index 7340c2f..b3c65f5 100644
--- a/inc/button_handler.hpp
+++ b/inc/button_handler.hpp
@@ -7,7 +7,12 @@
 {
 namespace button
 {
-
+enum class PowerEvent
+{
+    powerPressed,
+    longPowerPressed,
+    resetPressed
+};
 /**
  * @class Handler
  *
@@ -80,14 +85,9 @@
      *
      * @return true if powered on, false else
      */
-    bool poweredOn() const;
+    bool poweredOn(size_t hostNumber) const;
 
-    /**
-     * @brief Returns the service name for an object
-     *
-     * @param[in] path - the object path
-     * @param[in] interface - the interface name
-     *
+    /*
      * @return std::string - the D-Bus service name if found, else
      *                       an empty string
      */
@@ -95,6 +95,32 @@
                            const std::string& interface) const;
 
     /**
+     * @brief gets the valid host selector value in multi host
+     * system
+     *
+     * @return size_t throws exception if host selector position is
+     * invalid or not available.
+     */
+
+    size_t getHostSelectorValue();
+
+    /**
+     * @brief checks if the system has multi host
+     * based on the host selector property availability
+     *
+     * @return bool returns true if multi host system
+     * else returns false.
+     */
+    bool isMultiHost();
+    /**
+     * @brief trigger the power ctrl event based on the
+     *  button press event type.
+     *
+     * @return void
+     */
+    void handlePowerEvent(PowerEvent powerEventType);
+
+    /**
      * @brief sdbusplus connection object
      */
     sdbusplus::bus::bus& bus;