summaryrefslogtreecommitdiffstats
path: root/mainloop.hpp
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-01-06 15:36:43 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-01-17 20:26:10 -0500
commitf7426cff985dfe1fa37082edc665e1cec707b651 (patch)
treec9f92d0f294aba2ded404462345f47bd05ca12c6 /mainloop.hpp
parent43b6ba70a3db07ac51c1d65b9bb38a9db039f61b (diff)
downloadphosphor-hwmon-f7426cff985dfe1fa37082edc665e1cec707b651.tar.gz
phosphor-hwmon-f7426cff985dfe1fa37082edc665e1cec707b651.zip
Add object info tuple
The object path, bus connection, and sdbusplus interfaces are almost always needed together so use a tuple for passing these around. Change-Id: I784edae95f03d306633ccf94209faa381b91a596 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'mainloop.hpp')
-rw-r--r--mainloop.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mainloop.hpp b/mainloop.hpp
index cff5123..c5038f7 100644
--- a/mainloop.hpp
+++ b/mainloop.hpp
@@ -8,6 +8,7 @@
#include "interface.hpp"
using Object = std::map<InterfaceType, std::experimental::any>;
+using ObjectInfo = std::tuple<sdbusplus::bus::bus*, std::string, Object>;
/** @class MainLoop
* @brief hwmon-readd main application loop.
@@ -51,7 +52,7 @@ class MainLoop
void shutdown() noexcept;
private:
- using mapped_type = std::tuple<SensorSet::mapped_type, std::string, Object>;
+ using mapped_type = std::tuple<SensorSet::mapped_type, std::string, ObjectInfo>;
using SensorState = std::map<SensorSet::key_type, mapped_type>;
/** @brief sdbusplus bus client connection. */
OpenPOWER on IntegriCloud