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/gpio.hpp b/inc/gpio.hpp
index ebaf3cf..a5b943a 100644
--- a/inc/gpio.hpp
+++ b/inc/gpio.hpp
@@ -15,6 +15,7 @@
 */
 #pragma once
 
+#include <nlohmann/json.hpp>
 #include <sdbusplus/bus.hpp>
 #include <string>
 #include <vector>
@@ -30,9 +31,9 @@
 // this struct represents button interface
 struct buttonConfig
 {
-    std::string formFactorName;  // name of the button interface
-    std::vector<gpioInfo> gpios; // holds single or group gpio config
-                                 // corresponding to button interface
+    std::string formFactorName;   // name of the button interface
+    std::vector<gpioInfo> gpios;  // holds single or group gpio config
+    nlohmann::json extraJsonInfo; // corresponding to button interface
 };
 
 /**
@@ -53,3 +54,5 @@
 
 uint32_t getGpioNum(const std::string& gpioPin);
 void closeGpio(int fd);
+// global json object which holds gpio_defs.json configs
+extern nlohmann::json gpioDefs;