remove IPMI_CC

Since IPMI_CC declared in api.h has been gradually deprecated,
this submission will use ipmi::cc in api.hpp instead.

Change-Id: Iaaca85d13ebd1e114587fe64ec169ad92efc7f9d
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index eb45900..c8d6d94 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -1179,7 +1179,7 @@
     fru = frus.find(fruID);
     if (fru == frus.end())
     {
-        return IPMI_CC_SENSOR_INVALID;
+        return ipmi::ccSensorInvalid;
     }
 
     /* Header */
@@ -1239,7 +1239,7 @@
     // Check for invalid offset size
     if (req->offset > sizeof(record))
     {
-        return IPMI_CC_PARM_OUT_OF_RANGE;
+        return ipmi::ccParmOutOfRange;
     }
 
     dataLength = std::min(static_cast<size_t>(req->bytes_to_read),
@@ -1273,7 +1273,7 @@
     entity = entityRecords.find(entityRecordID);
     if (entity == entityRecords.end())
     {
-        return IPMI_CC_SENSOR_INVALID;
+        return ipmi::ccSensorInvalid;
     }
 
     /* Header */
@@ -1312,7 +1312,7 @@
     // Check for invalid offset size
     if (req->offset > sizeof(record))
     {
-        return IPMI_CC_PARM_OUT_OF_RANGE;
+        return ipmi::ccParmOutOfRange;
     }
 
     dataLength = std::min(static_cast<size_t>(req->bytes_to_read),
@@ -1362,7 +1362,7 @@
             sensor = ipmi::sensor::sensors.find(recordID);
             if (sensor == ipmi::sensor::sensors.end())
             {
-                return IPMI_CC_SENSOR_INVALID;
+                return ipmi::ccSensorInvalid;
             }
         }
     }
@@ -1418,7 +1418,7 @@
 
     if (req->offset > sizeof(record))
     {
-        return IPMI_CC_PARM_OUT_OF_RANGE;
+        return ipmi::ccParmOutOfRange;
     }
 
     // data_len will ultimately be the size of the record, plus
@@ -1460,7 +1460,7 @@
     if ((paraLen < selSystemEventSizeWith1Bytes) ||
         (paraLen > selSystemEventSizeWith3Bytes))
     {
-        return IPMI_CC_REQ_DATA_LEN_INVALID;
+        return ipmi::ccReqDataLenInvalid;
     }
 
     if (isFromSystemChannel())
@@ -1488,7 +1488,7 @@
         ((req->data[0] & byte2EnableMask) != 0 &&
          paraLen < selSystemEventSizeWith2Bytes))
     {
-        return IPMI_CC_REQ_DATA_LEN_INVALID;
+        return ipmi::ccReqDataLenInvalid;
     }
 
     // Count bytes of Event Data
@@ -1521,7 +1521,7 @@
     catch (const sdbusplus::exception_t& e)
     {
         lg2::error("exception message: {ERROR}", "ERROR", e);
-        return IPMI_CC_UNSPECIFIED_ERROR;
+        return ipmi::ccUnspecifiedError;
     }
     return ipmi::ccSuccess;
 }