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: I4de358f8db628269b64f33acc4d6f250e27f6405
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/README.md b/README.md
index 7945e5b..7cc93c0 100644
--- a/README.md
+++ b/README.md
@@ -239,7 +239,7 @@
 
 Query the number of available devices from the google-accel-oob service.
 
-If not enough data is proveded, `IPMI_CC_REQ_DATA_LEN_INVALID` is returned.
+If not enough data is proveded, `ipmi::ccReqDataLenInvalid` is returned.
 
 Request
 
@@ -279,15 +279,16 @@
 
 The maximum length for any name is 43 bytes (not including the trailing NULL).
 
-If a name is longer than 43 bytes, `IPMI_CC_REQ_DATA_TRUNCATED` is returned.
-These names will not be usable in the rest of the API. Changing the name
-requires code changes to the `managed_acceld` service binary.
+If a name is longer than 43 bytes, `ipmi::ccReqDataTruncated` is returned. These
+names will not be usable in the rest of the API. Changing the name requires code
+changes to the `managed_acceld` service binary.
 
-If not enough data is proveded, `IPMI_CC_REQ_DATA_LEN_INVALID` is returned.
+If not enough data is proveded, `ipmi::ccReqDataLenInvalid` is returned.
 
 If a name does not begin with the expected "/com/google/customAccel/" prefix,
-`IPMI_CC_INVALID` is returned. This indicates a change in the DBus API for the
-google-accel-oob service that requires a matching code change in the handler.
+`ipmi::ccInvalidCommand` is returned. This indicates a change in the DBus API
+for the google-accel-oob service that requires a matching code change in the
+handler.
 
 Request
 
@@ -331,9 +332,9 @@
 On success, the response ends with the data read as a single uint64.
 
 If the number of bytes requested would not fit in a single IPMI payload,
-`IPMI_CC_REQUESTED_TOO_MANY_BYTES` is returned.
+`ipmi::ccRetBytesUnavailable` is returned.
 
-If not enough data is proveded, `IPMI_CC_REQ_DATA_LEN_INVALID` is returned.
+If not enough data is proveded, `ipmi::ccReqDataLenInvalid` is returned.
 
 Request
 
@@ -372,9 +373,9 @@
 
 All fields returned in the Response are simply a copy of the Request.
 
-On success, `IPMI_CC_OK` is returned.
+On success, `ipmi::ccSuccess` is returned.
 
-If not enough data is proveded, `IPMI_CC_REQ_DATA_LEN_INVALID` is returned.
+If not enough data is proveded, `ipmi::ccReqDataLenInvalid` is returned.
 
 Request
 
@@ -468,7 +469,7 @@
 
 On success, the response contains 2 bytes containing the setting value.
 
-If not enough data is proveded, `IPMI_CC_REQ_DATA_LEN_INVALID` is returned.
+If not enough data is proveded, `ipmi::ccReqDataLenInvalid` is returned.
 
 Request
 
@@ -495,9 +496,9 @@
 The settings value parameter is a 2 byte value and is expected in little endian
 format
 
-On success, `IPMI_CC_OK` is returned.
+On success, `ipmi::ccSuccess` is returned.
 
-If not enough data is proveded, `IPMI_CC_REQ_DATA_LEN_INVALID` is returned.
+If not enough data is proveded, `ipmi::ccReqDataLenInvalid` is returned.
 
 Request
 
diff --git a/pcie_i2c.cpp b/pcie_i2c.cpp
index 0a59738..8cde233 100644
--- a/pcie_i2c.cpp
+++ b/pcie_i2c.cpp
@@ -89,7 +89,7 @@
                  pcie_slot_name.length();
 
     // TODO (jaghu) : Add a way to dynamically receive the MAX_IPMI_BUFFER
-    // value and change error to IPMI_CC_REQUESTED_TOO_MANY_BYTES.
+    // value and change error to ipmi::ccRetBytesUnavailable.
     if (length > MAX_IPMI_BUFFER)
     {
         stdplus::print(stderr, "Response would overflow response buffer\n");
diff --git a/test/google_accel_oob_unittest.cpp b/test/google_accel_oob_unittest.cpp
index 5797cd3..00c573a 100644
--- a/test/google_accel_oob_unittest.cpp
+++ b/test/google_accel_oob_unittest.cpp
@@ -47,7 +47,7 @@
     Resp r = accelOobDeviceCount(reqBuf, &h);
 
     const auto response = std::get<0>(r);
-    EXPECT_EQ(response, IPMI_CC_OK);
+    EXPECT_EQ(response, ::ipmi::ccSuccess);
 
     const auto payload = std::get<1>(r);
     ASSERT_EQ(payload.has_value(), true);
@@ -89,7 +89,7 @@
         &h);
 
     const auto response = std::get<0>(r);
-    EXPECT_EQ(response, IPMI_CC_OK);
+    EXPECT_EQ(response, ::ipmi::ccSuccess);
 
     const auto payload = std::get<1>(r);
     ASSERT_EQ(payload.has_value(), true);
@@ -150,7 +150,7 @@
         &h);
 
     const auto response = std::get<0>(r);
-    EXPECT_EQ(response, IPMI_CC_OK);
+    EXPECT_EQ(response, ::ipmi::ccSuccess);
 
     const auto payload = std::get<1>(r);
     ASSERT_EQ(payload.has_value(), true);
@@ -216,7 +216,7 @@
         &h);
 
     const auto response = std::get<0>(r);
-    EXPECT_EQ(response, IPMI_CC_OK);
+    EXPECT_EQ(response, ::ipmi::ccSuccess);
 
     const auto payload = std::get<1>(r);
     ASSERT_EQ(payload.has_value(), true);
@@ -251,7 +251,7 @@
     Resp r = accelSetVrSettings(nullptr, testData, &h);
 
     const auto response = std::get<0>(r);
-    EXPECT_EQ(response, IPMI_CC_OK);
+    EXPECT_EQ(response, ::ipmi::ccSuccess);
 
     const auto payload = std::get<1>(r);
     ASSERT_EQ(payload.has_value(), true);
@@ -275,7 +275,7 @@
     Resp r = accelSetVrSettings(nullptr, testData, &h);
 
     const auto response = std::get<0>(r);
-    EXPECT_EQ(response, IPMI_CC_REQ_DATA_LEN_INVALID);
+    EXPECT_EQ(response, ::ipmi::ccReqDataLenInvalid);
 
     const auto payload = std::get<1>(r);
     ASSERT_EQ(payload.has_value(), false);
@@ -295,7 +295,7 @@
     Resp r = accelGetVrSettings(nullptr, testData, &h);
 
     const auto response = std::get<0>(r);
-    EXPECT_EQ(response, IPMI_CC_OK);
+    EXPECT_EQ(response, ::ipmi::ccSuccess);
 
     const auto payload = std::get<1>(r);
     ASSERT_EQ(payload.has_value(), true);
@@ -322,7 +322,7 @@
     Resp r = accelGetVrSettings(nullptr, testData, &h);
 
     const auto response = std::get<0>(r);
-    EXPECT_EQ(response, IPMI_CC_REQ_DATA_LEN_INVALID);
+    EXPECT_EQ(response, ::ipmi::ccReqDataLenInvalid);
 
     const auto payload = std::get<1>(r);
     ASSERT_EQ(payload.has_value(), false);