Add dbus interface for sol commands

Add dbus interface for sol config parameters so that after move set/get
sol config parameter command from net-ipmid to host-ipmid, the command
can send config parameters to net-ipmid sol service through the dbus
interface.

Tested by:
busctl introspect xyz.openbmc_project.Settings /xyz/openbmc_project
/network/host0/sol can show correct dbus properties of sol parameters.
ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x00 0x01
ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x01 0x00
ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x02 0x83
ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x03 0x5 0x03
ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x04 0x5 0x03
all these commands can change the dbus properties as the value in
above commands.
Before and after run these commands, ipmitool -I lanplus -H x -U x
-P x sol activate can start sol session correctly.
After reboot BMC, "Progress" property in dbus interface change back
to 0 and other properties will not reset to default value.

Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: Ib441b551a1559908c427be5378ff3414693e20dd
diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp
index c8e682e..bc987c5 100644
--- a/command/payload_cmds.cpp
+++ b/command/payload_cmds.cpp
@@ -41,6 +41,9 @@
         return outPayload;
     }
 
+    std::get<sol::Manager&>(singletonPool)
+        .updateSOLParameter(ipmi::convertCurrentChannelNum(
+            ipmi::currentChNum, getInterfaceIndex()));
     if (!std::get<sol::Manager&>(singletonPool).enable)
     {
         response->completionCode = IPMI_CC_PAYLOAD_TYPE_DISABLED;
diff --git a/command/sol_cmds.cpp b/command/sol_cmds.cpp
index fda3e91..a1e820f 100644
--- a/command/sol_cmds.cpp
+++ b/command/sol_cmds.cpp
@@ -71,90 +71,6 @@
                                           outPayload);
 }
 
-std::vector<uint8_t> setConfParams(const std::vector<uint8_t>& inPayload,
-                                   const message::Handler& handler)
-{
-    std::vector<uint8_t> outPayload(sizeof(SetConfParamsResponse));
-    auto request =
-        reinterpret_cast<const SetConfParamsRequest*>(inPayload.data());
-    auto response = reinterpret_cast<SetConfParamsResponse*>(outPayload.data());
-    response->completionCode = IPMI_CC_OK;
-
-    switch (static_cast<Parameter>(request->paramSelector))
-    {
-        case Parameter::PROGRESS:
-        {
-            uint8_t progress = request->value & progressMask;
-            std::get<sol::Manager&>(singletonPool).progress = progress;
-            break;
-        }
-        case Parameter::ENABLE:
-        {
-            bool enable = request->value & enableMask;
-            std::get<sol::Manager&>(singletonPool).enable = enable;
-            break;
-        }
-        case Parameter::AUTHENTICATION:
-        {
-            if (!request->auth.auth || !request->auth.encrypt)
-            {
-                response->completionCode = ipmiCCWriteReadParameter;
-            }
-            else if (request->auth.privilege <
-                         static_cast<uint8_t>(session::Privilege::USER) ||
-                     request->auth.privilege >
-                         static_cast<uint8_t>(session::Privilege::OEM))
-            {
-                response->completionCode = IPMI_CC_INVALID_FIELD_REQUEST;
-            }
-            else
-            {
-                std::get<sol::Manager&>(singletonPool).solMinPrivilege =
-                    static_cast<session::Privilege>(request->auth.privilege);
-            }
-            break;
-        }
-        case Parameter::ACCUMULATE:
-        {
-            using namespace std::chrono_literals;
-
-            if (request->acc.threshold == 0)
-            {
-                response->completionCode = IPMI_CC_INVALID_FIELD_REQUEST;
-                break;
-            }
-
-            std::get<sol::Manager&>(singletonPool).accumulateInterval =
-                request->acc.interval * sol::accIntervalFactor * 1ms;
-            std::get<sol::Manager&>(singletonPool).sendThreshold =
-                request->acc.threshold;
-            break;
-        }
-        case Parameter::RETRY:
-        {
-            using namespace std::chrono_literals;
-
-            std::get<sol::Manager&>(singletonPool).retryCount =
-                request->retry.count;
-            std::get<sol::Manager&>(singletonPool).retryInterval =
-                request->retry.interval * sol::retryIntervalFactor * 1ms;
-            break;
-        }
-        case Parameter::PORT:
-        {
-            response->completionCode = ipmiCCWriteReadParameter;
-            break;
-        }
-        case Parameter::NVBITRATE:
-        case Parameter::VBITRATE:
-        case Parameter::CHANNEL:
-        default:
-            response->completionCode = ipmiCCParamNotSupported;
-    }
-
-    return outPayload;
-}
-
 std::vector<uint8_t> getConfParams(const std::vector<uint8_t>& inPayload,
                                    const message::Handler& handler)
 {