add .clang-format
Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/dbus/dbuspassive.hpp b/dbus/dbuspassive.hpp
index 545b928..87315a0 100644
--- a/dbus/dbuspassive.hpp
+++ b/dbus/dbuspassive.hpp
@@ -1,23 +1,22 @@
#pragma once
+#include "dbus/util.hpp"
+#include "interfaces.hpp"
+
#include <chrono>
#include <cmath>
#include <iostream>
#include <map>
#include <memory>
#include <mutex>
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/message.hpp>
+#include <sdbusplus/server.hpp>
#include <set>
#include <string>
#include <tuple>
#include <vector>
-#include <sdbusplus/bus.hpp>
-#include <sdbusplus/message.hpp>
-#include <sdbusplus/server.hpp>
-
-#include "interfaces.hpp"
-#include "dbus/util.hpp"
-
int DbusHandleSignal(sd_bus_message* msg, void* data, sd_bus_error* err);
/*
@@ -33,33 +32,31 @@
*/
class DbusPassive : public ReadInterface
{
- public:
- static std::unique_ptr<ReadInterface> CreateDbusPassive(
- sdbusplus::bus::bus& bus, const std::string& type,
- const std::string& id, DbusHelperInterface *helper);
+ public:
+ static std::unique_ptr<ReadInterface>
+ CreateDbusPassive(sdbusplus::bus::bus& bus, const std::string& type,
+ const std::string& id, DbusHelperInterface* helper);
- DbusPassive(sdbusplus::bus::bus& bus,
- const std::string& type,
- const std::string& id,
- DbusHelperInterface *helper);
+ DbusPassive(sdbusplus::bus::bus& bus, const std::string& type,
+ const std::string& id, DbusHelperInterface* helper);
- ReadReturn read(void) override;
+ ReadReturn read(void) override;
- void setValue(double value);
- int64_t getScale(void);
- std::string getId(void);
+ void setValue(double value);
+ int64_t getScale(void);
+ std::string getId(void);
- private:
- sdbusplus::bus::bus& _bus;
- sdbusplus::server::match::match _signal;
- int64_t _scale;
- std::string _id; // for debug identification
- DbusHelperInterface *_helper;
+ private:
+ sdbusplus::bus::bus& _bus;
+ sdbusplus::server::match::match _signal;
+ int64_t _scale;
+ std::string _id; // for debug identification
+ DbusHelperInterface* _helper;
- std::mutex _lock;
- double _value = 0;
- /* The last time the value was refreshed, not necessarily changed. */
- std::chrono::high_resolution_clock::time_point _updated;
+ std::mutex _lock;
+ double _value = 0;
+ /* The last time the value was refreshed, not necessarily changed. */
+ std::chrono::high_resolution_clock::time_point _updated;
};
int HandleSensorValue(sdbusplus::message::message& msg, DbusPassive* owner);