Sensorhandler: move get SDR info & reserve SDR to new API

Rewrite "Get SDR info and Reserve SDR" command to
use the newly introduced IPMI provider API.

Tested:
verified using ipmitool sensor commands.
a. get SDR info
Command: ipmitool raw 0x04 0x20 0x01
Output:  02 01
Command: ipmitool raw 0x04 0x20 0x00
Output:  00 01
b. reserve sdr
Command: ipmitool raw 0x04 0x22
Output:  01 00

Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: Id1d7015cec45c5524210033e4210c710da27e9ae
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
diff --git a/sensorhandler.hpp b/sensorhandler.hpp
index 64cfa0e..56a7021 100644
--- a/sensorhandler.hpp
+++ b/sensorhandler.hpp
@@ -79,11 +79,7 @@
                             ipmi_request_t request, ipmi_response_t response,
                             ipmi_data_len_t data_len, ipmi_context_t context);
 
-ipmi_ret_t ipmi_sen_reserve_sdr(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                ipmi_request_t request,
-                                ipmi_response_t response,
-                                ipmi_data_len_t data_len,
-                                ipmi_context_t context);
+ipmi::RspType<uint16_t> ipmiSensorReserveSdr();
 
 static const uint16_t FRU_RECORD_ID_START = 256;
 static const uint16_t ENTITY_RECORD_ID_START = 512;
@@ -106,34 +102,6 @@
     return (bool)((uint64_t)(req)&1);
 }
 } // namespace request
-
-namespace response
-{
-#define SDR_INFO_RESP_SIZE 2
-inline void set_lun_present(int lun, uint8_t* resp)
-{
-    *resp |= 1 << lun;
-}
-inline void set_lun_not_present(int lun, uint8_t* resp)
-{
-    *resp &= ~(1 << lun);
-}
-inline void set_dynamic_population(uint8_t* resp)
-{
-    *resp |= 1 << 7;
-}
-inline void set_static_population(uint8_t* resp)
-{
-    *resp &= ~(1 << 7);
-}
-} // namespace response
-
-struct GetSdrInfoResp
-{
-    uint8_t count;
-    uint8_t luns_and_dynamic_population;
-};
-
 } // namespace get_sdr_info
 
 /**