Update Get SM Signal command for front panel buttons

This change updates the Get SM Signal command to use the power
control Button service instead of the GPIO daemon to mask and
read the front panel buttons.

This change also updates the Get SM Signal command to the new API.

Tested:
Tested the Get SM Signal IPMI commands to verify that the front panel
    buttons can be masked and read:
    power button:
    ipmitool raw 0x30 0x14 0 0 0
    00
    ipmitool raw 0x30 0x14 0 0 1
    00
    ipmitool raw 0x30 0x14 0 0 0
    01
    ipmitool raw 0x30 0x14 0 0 2
    00

    reset button:
    ipmitool raw 0x30 0x14 1 0 0
    00
    ipmitool raw 0x30 0x14 1 0 1
    00
    ipmitool raw 0x30 0x14 1 0 0
    01
    ipmitool raw 0x30 0x14 1 0 2
    00

    nmi button:
    ipmitool raw 0x30 0x14 3 0 0
    00
    ipmitool raw 0x30 0x14 3 0 1
    00
    ipmitool raw 0x30 0x14 3 0 0
    01
    ipmitool raw 0x30 0x14 3 0 2
    00

Change-Id: Idbb1be30b22d653f8805e1f8addf18a197dc4ee5
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/include/manufacturingcommands.hpp b/include/manufacturingcommands.hpp
index bc70d84..a6ac45f 100644
--- a/include/manufacturingcommands.hpp
+++ b/include/manufacturingcommands.hpp
@@ -35,7 +35,8 @@
 
 // TODO: Service names may change. Worth to consider dynamic detection.
 static constexpr const char* fanService = "xyz.openbmc_project.FanSensor";
-static constexpr const char* gpioService = "xyz.openbmc_project.Gpio";
+static constexpr const char* buttonService =
+    "xyz.openbmc_project.Chassis.Buttons";
 static constexpr const char* ledServicePrefix =
     "xyz.openbmc_project.LED.Controller.";
 
@@ -47,15 +48,13 @@
     "/xyz/openbmc_project/sensors/fan_tach/Fan_";
 
 static constexpr const char* fanIntf = "xyz.openbmc_project.Sensor.Value";
-static constexpr const char* gpioIntf = "xyz.openbmc_project.Control.Gpio";
+static constexpr const char* buttonIntf = "xyz.openbmc_project.Chassis.Buttons";
 static constexpr const char* ledIntf = "xyz.openbmc_project.Led.Physical";
 
 static constexpr const char* busPropertyIntf =
     "org.freedesktop.DBus.Properties";
 static constexpr const char* ledStateStr =
     "xyz.openbmc_project.Led.Physical.Action."; // Comes with postfix Off/On
-static constexpr const char* smGetSignalPathPrefix =
-    "/xyz/openbmc_project/control/gpio/";
 
 /** @enum MtmLvl
 .*
@@ -87,7 +86,7 @@
     smPowerButton = 0,
     smResetButton = 1,
     smSleepButton,
-    smNmiButton = 3,
+    smNMIButton = 3,
     smChassisIntrusion = 4,
     smPowerGood,
     smPowerRequestGet,
@@ -101,9 +100,6 @@
     smSignalReserved,
     smFanTachometerGet = 0xf,
     smNcsiDiag = 0x10,
-    smFpLcpLeftButton = 0x11,
-    smFpLcpRightButton,
-    smFpLcpEnterButton,
     smGetSignalMax
 };
 
@@ -137,20 +133,6 @@
     uint8_t Value;
 };
 
-struct GetSmSignalReq
-{
-    SmSignalGet Signal;
-    uint8_t Instance;
-    SmActionGet Action;
-};
-
-struct GetSmSignalRsp
-{
-    uint8_t SigVal;
-    uint8_t SigVal1;
-    uint8_t SigVal2;
-};
-
 class LedProperty
 {
     SmSignalSet signal;
@@ -245,31 +227,23 @@
         }
     }
 
-    int8_t getProperty(const char* service, std::string path,
-                       const char* interface, std::string propertyName,
-                       ipmi::Value* value);
-    int8_t setProperty(const char* service, std::string path,
-                       const char* interface, std::string propertyName,
-                       ipmi::Value value);
+    int8_t getProperty(const std::string& service, const std::string& path,
+                       const std::string& interface,
+                       const std::string& propertyName, ipmi::Value* value);
+    int8_t setProperty(const std::string& service, const std::string& path,
+                       const std::string& interface,
+                       const std::string& propertyName, ipmi::Value value);
     int8_t disablePidControlService(const bool disable);
 
     void revertTimerHandler();
 
-    std::tuple<uint8_t, ipmi_ret_t, uint8_t> proccessSignal(SmSignalGet signal,
-                                                            SmActionGet action);
-
-    std::string getGpioPathForSmSignal(uint8_t gpioInstane)
-    {
-        return smGetSignalPathPrefix + gpioPaths[gpioInstane];
-    }
-
     MtmLvl getAccessLvl(void)
     {
         static MtmLvl mtmMode = MtmLvl::mtmNotRunning;
         if (mtmMode != MtmLvl::mtmExpired)
         {
             ipmi::Value mode;
-            if (getProperty("xyz.openbmc_project.SpeciaMode",
+            if (getProperty("xyz.openbmc_project.SpecialMode",
                             "/xyz/openbmc_project/security/specialMode",
                             "xyz.openbmc_project.Security.SpecialMode",
                             "SpecialMode", &mode) != 0)
@@ -282,7 +256,6 @@
         return mtmMode;
     }
 
-    std::vector<SmSignalGet> revertSmSignalGetVector;
     bool revertFanPWM = false;
     bool revertLedCallback = false;
     phosphor::Timer revertTimer;