style: member functions should be lower camel
Rename member functions to be lower camel instead of snake case.
Change-Id: Ib227fd3dadb6d9607290277205223a4324cd4ce5
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/dbus/dbusactiveread.cpp b/dbus/dbusactiveread.cpp
index 37a1f93..c444ad2 100644
--- a/dbus/dbusactiveread.cpp
+++ b/dbus/dbusactiveread.cpp
@@ -27,7 +27,7 @@
struct SensorProperties settings;
double value;
- _helper->GetProperties(_bus, _service, _path, &settings);
+ _helper->getProperties(_bus, _service, _path, &settings);
value = settings.value * pow(10, settings.scale);
diff --git a/dbus/dbuspassive.cpp b/dbus/dbuspassive.cpp
index a43b024..375960f 100644
--- a/dbus/dbuspassive.cpp
+++ b/dbus/dbuspassive.cpp
@@ -24,7 +24,7 @@
#include <sdbusplus/bus.hpp>
#include <string>
-std::unique_ptr<ReadInterface> DbusPassive::CreateDbusPassive(
+std::unique_ptr<ReadInterface> DbusPassive::createDbusPassive(
sdbusplus::bus::bus& bus, const std::string& type, const std::string& id,
DbusHelperInterface* helper)
{
@@ -50,15 +50,15 @@
auto tempBus = sdbusplus::bus::new_default();
/* service == busname */
std::string path = GetSensorPath(type, id);
- std::string service = _helper->GetService(tempBus, sensorintf, path);
+ std::string service = _helper->getService(tempBus, sensorintf, path);
struct SensorProperties settings;
- _helper->GetProperties(tempBus, service, path, &settings);
+ _helper->getProperties(tempBus, service, path, &settings);
_scale = settings.scale;
_value = settings.value * pow(10, _scale);
_updated = std::chrono::high_resolution_clock::now();
- _failed = _helper->ThresholdsAsserted(tempBus, service, path);
+ _failed = _helper->thresholdsAsserted(tempBus, service, path);
}
ReadReturn DbusPassive::read(void)
@@ -93,7 +93,7 @@
return _scale;
}
-std::string DbusPassive::getId(void)
+std::string DbusPassive::getID(void)
{
return _id;
}
diff --git a/dbus/dbuspassive.hpp b/dbus/dbuspassive.hpp
index 71ef339..801722d 100644
--- a/dbus/dbuspassive.hpp
+++ b/dbus/dbuspassive.hpp
@@ -34,7 +34,7 @@
{
public:
static std::unique_ptr<ReadInterface>
- CreateDbusPassive(sdbusplus::bus::bus& bus, const std::string& type,
+ createDbusPassive(sdbusplus::bus::bus& bus, const std::string& type,
const std::string& id, DbusHelperInterface* helper);
DbusPassive(sdbusplus::bus::bus& bus, const std::string& type,
@@ -46,7 +46,7 @@
void setValue(double value);
void setFailed(bool value);
int64_t getScale(void);
- std::string getId(void);
+ std::string getID(void);
private:
sdbusplus::bus::bus& _bus;
diff --git a/dbus/dbuswrite.hpp b/dbus/dbuswrite.hpp
index 6a70fe9..4c5bc29 100644
--- a/dbus/dbuswrite.hpp
+++ b/dbus/dbuswrite.hpp
@@ -33,7 +33,7 @@
path(path)
{
auto tempBus = sdbusplus::bus::new_default();
- connectionName = helper.GetService(tempBus, pwmInterface, path);
+ connectionName = helper.getService(tempBus, pwmInterface, path);
}
void write(double value) override;
@@ -53,7 +53,7 @@
path(path)
{
auto tempBus = sdbusplus::bus::new_default();
- connectionName = helper.GetService(tempBus, pwmInterface, path);
+ connectionName = helper.getService(tempBus, pwmInterface, path);
}
void write(double value) override;
diff --git a/dbus/util.cpp b/dbus/util.cpp
index cdc4bb9..d39f176 100644
--- a/dbus/util.cpp
+++ b/dbus/util.cpp
@@ -11,7 +11,7 @@
/* TODO(venture): Basically all phosphor apps need this, maybe it should be a
* part of sdbusplus. There is an old version in libmapper.
*/
-std::string DbusHelper::GetService(sdbusplus::bus::bus& bus,
+std::string DbusHelper::getService(sdbusplus::bus::bus& bus,
const std::string& intf,
const std::string& path)
{
@@ -40,7 +40,7 @@
return response.begin()->first;
}
-void DbusHelper::GetProperties(sdbusplus::bus::bus& bus,
+void DbusHelper::getProperties(sdbusplus::bus::bus& bus,
const std::string& service,
const std::string& path,
struct SensorProperties* prop)
@@ -90,7 +90,7 @@
return;
}
-bool DbusHelper::ThresholdsAsserted(sdbusplus::bus::bus& bus,
+bool DbusHelper::thresholdsAsserted(sdbusplus::bus::bus& bus,
const std::string& service,
const std::string& path)
{
diff --git a/dbus/util.hpp b/dbus/util.hpp
index ed7a411..41a0af1 100644
--- a/dbus/util.hpp
+++ b/dbus/util.hpp
@@ -28,7 +28,7 @@
/** @brief Get the service providing the interface for the path.
*/
- virtual std::string GetService(sdbusplus::bus::bus& bus,
+ virtual std::string getService(sdbusplus::bus::bus& bus,
const std::string& intf,
const std::string& path) = 0;
@@ -39,7 +39,7 @@
* @param[in] path - The dbus path.
* @param[out] prop - A pointer to a properties struct to fill out.
*/
- virtual void GetProperties(sdbusplus::bus::bus& bus,
+ virtual void getProperties(sdbusplus::bus::bus& bus,
const std::string& service,
const std::string& path,
struct SensorProperties* prop) = 0;
@@ -50,7 +50,7 @@
* @param[in] service - The service providing the interface.
* @param[in] path - The dbus path.
*/
- virtual bool ThresholdsAsserted(sdbusplus::bus::bus& bus,
+ virtual bool thresholdsAsserted(sdbusplus::bus::bus& bus,
const std::string& service,
const std::string& path) = 0;
};
@@ -65,14 +65,14 @@
DbusHelper(DbusHelper&&) = default;
DbusHelper& operator=(DbusHelper&&) = default;
- std::string GetService(sdbusplus::bus::bus& bus, const std::string& intf,
+ std::string getService(sdbusplus::bus::bus& bus, const std::string& intf,
const std::string& path) override;
- void GetProperties(sdbusplus::bus::bus& bus, const std::string& service,
+ void getProperties(sdbusplus::bus::bus& bus, const std::string& service,
const std::string& path,
struct SensorProperties* prop) override;
- bool ThresholdsAsserted(sdbusplus::bus::bus& bus,
+ bool thresholdsAsserted(sdbusplus::bus::bus& bus,
const std::string& service,
const std::string& path) override;
};