IPMIFruArea: apply naming convention to member functions

Apply naming convention to member functions.

Change-Id: I3b0516592dd4225f7be43c3d9cdcc9c8853d20b7
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/fru_area.cpp b/fru_area.cpp
index 8b09968..b983b53 100644
--- a/fru_area.cpp
+++ b/fru_area.cpp
@@ -47,7 +47,7 @@
 // For a FRU area type, accepts the data and updates
 // area specific data.
 //-----------------------------------------------------
-void IPMIFruArea::set_data(const uint8_t* value, const size_t length)
+void IPMIFruArea::setData(const uint8_t* value, const size_t length)
 {
     len = length;
     data = new uint8_t[len];
@@ -57,8 +57,8 @@
 //-----------------------------------------------------
 // Sets the dbus parameters
 //-----------------------------------------------------
-void IPMIFruArea::update_dbus_paths(const char* bus, const char* path,
-                                    const char* intf)
+void IPMIFruArea::updateDbusPaths(const char* bus, const char* path,
+                                  const char* intf)
 {
     bus_name = bus;
     obj_path = path;
diff --git a/fru_area.hpp b/fru_area.hpp
index 8cb9c00..7b10347 100644
--- a/fru_area.hpp
+++ b/fru_area.hpp
@@ -22,64 +22,64 @@
     virtual ~IPMIFruArea();
 
     // Sets the present bit
-    inline void set_present(const bool present)
+    inline void setPresent(const bool present)
     {
         isPresent = present;
     }
 
     // returns fru id;
-    uint8_t get_fruid() const
+    uint8_t getFruID() const
     {
         return fruid;
     }
 
     // Returns the length.
-    size_t get_len() const
+    size_t getLength() const
     {
         return len;
     }
 
     // Returns the type of the current fru area
-    ipmi_fru_area_type get_type() const
+    ipmi_fru_area_type getType() const
     {
         return type;
     }
 
     // Returns the name
-    const char* get_name() const
+    const char* getName() const
     {
         return name.c_str();
     }
 
     // Returns SD bus name
-    const char* get_bus_name() const
+    const char* getBusName() const
     {
         return bus_name.c_str();
     }
 
     // Retrns SD bus object path
-    const char* get_obj_path() const
+    const char* getObjectPath() const
     {
         return obj_path.c_str();
     }
 
     // Returns SD bus interface name
-    const char* get_intf_name() const
+    const char* getInterfaceName() const
     {
         return intf_name.c_str();
     }
 
     // Returns the data portion
-    inline uint8_t* get_data() const
+    inline uint8_t* getData() const
     {
         return data;
     }
 
     // Accepts a pointer to data and sets it in the object.
-    void set_data(const uint8_t*, const size_t);
+    void setData(const uint8_t*, const size_t);
 
     // Sets the dbus parameters
-    void update_dbus_paths(const char*, const char*, const char*);
+    void updateDbusPaths(const char*, const char*, const char*);
 
   private:
     // Unique way of identifying a FRU
diff --git a/writefrudata.cpp b/writefrudata.cpp
index 978f2b1..d6eb8f9 100644
--- a/writefrudata.cpp
+++ b/writefrudata.cpp
@@ -155,10 +155,10 @@
     // the Inventory.
     for (const auto& fruArea : area_vec)
     {
-        fruid = fruArea->get_fruid();
+        fruid = fruArea->getFruID();
         // Fill the container with information
-        rc = parse_fru_area((fruArea)->get_type(), (void*)(fruArea)->get_data(),
-                            (fruArea)->get_len(), fruData);
+        rc = parse_fru_area((fruArea)->getType(), (void*)(fruArea)->getData(),
+                            (fruArea)->getLength(), fruData);
         if (rc < 0)
         {
             log<level::ERR>("Error parsing FRU records");
@@ -382,7 +382,7 @@
 bool remove_invalid_area(const std::unique_ptr<IPMIFruArea>& fru_area)
 {
     // Filter the ones that are empty
-    if (!(fru_area->get_len()))
+    if (!(fru_area->getLength()))
     {
         return true;
     }
@@ -463,9 +463,9 @@
             // of the fields populated. Update the data portion now.
             for (auto& iter : fru_area_vec)
             {
-                if ((iter)->get_type() == get_fru_area_type(fru_entry))
+                if ((iter)->getType() == get_fru_area_type(fru_entry))
                 {
-                    (iter)->set_data(area_data, area_len);
+                    (iter)->setData(area_data, area_len);
                 }
             }
         } // If we have fru data present
@@ -533,7 +533,7 @@
 
         // Physically being present
         bool present = access(fru_file_name, F_OK) == 0;
-        fru_area->set_present(present);
+        fru_area->setPresent(present);
 
         fru_area_vec.emplace_back(std::move(fru_area));
     }
@@ -597,13 +597,13 @@
 #ifdef __IPMI_DEBUG__
     for (auto& iter : fru_area_vec)
     {
-        std::printf("FRU ID : [%d]\n", (iter)->get_fruid());
-        std::printf("AREA NAME : [%s]\n", (iter)->get_name());
-        std::printf("TYPE : [%d]\n", (iter)->get_type());
-        std::printf("LEN : [%d]\n", (iter)->get_len());
-        std::printf("BUS NAME : [%s]\n", (iter)->get_bus_name());
-        std::printf("OBJ PATH : [%s]\n", (iter)->get_obj_path());
-        std::printf("INTF NAME :[%s]\n", (iter)->get_intf_name());
+        std::printf("FRU ID : [%d]\n", (iter)->getFruID());
+        std::printf("AREA NAME : [%s]\n", (iter)->getName());
+        std::printf("TYPE : [%d]\n", (iter)->getType());
+        std::printf("LEN : [%d]\n", (iter)->getLength());
+        std::printf("BUS NAME : [%s]\n", (iter)->getBusName());
+        std::printf("OBJ PATH : [%s]\n", (iter)->getObjectPath());
+        std::printf("INTF NAME :[%s]\n", (iter)->getIntfName());
     }
 #endif