Matthew Barth | b86374d | 2017-04-12 10:57:19 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <functional> |
| 4 | #include <sdbusplus/bus.hpp> |
| 5 | #include <sdbusplus/message.hpp> |
| 6 | |
| 7 | namespace phosphor |
| 8 | { |
| 9 | namespace dbus |
| 10 | { |
| 11 | namespace monitoring |
| 12 | { |
| 13 | |
| 14 | class Monitor; |
| 15 | |
Matthew Barth | c573643 | 2017-04-17 12:22:50 -0500 | [diff] [blame] | 16 | /** @brief The possible item value types */ |
Matthew Barth | b86374d | 2017-04-12 10:57:19 -0500 | [diff] [blame] | 17 | using Value = int64_t; |
| 18 | |
Matthew Barth | c573643 | 2017-04-17 12:22:50 -0500 | [diff] [blame] | 19 | /** @brief A list of what constructs a unique item and its value */ |
Matthew Barth | b86374d | 2017-04-12 10:57:19 -0500 | [diff] [blame] | 20 | using Group = std::vector<std::tuple<std::string, Value>>; |
| 21 | |
Matthew Barth | c573643 | 2017-04-17 12:22:50 -0500 | [diff] [blame] | 22 | /** @brief A conditional function type for item(s) conditions */ |
Matthew Barth | b86374d | 2017-04-12 10:57:19 -0500 | [diff] [blame] | 23 | using Condition = std::function<bool(sdbusplus::bus::bus&, |
| 24 | sdbusplus::message::message&, |
| 25 | Monitor&)>; |
| 26 | |
Matthew Barth | c573643 | 2017-04-17 12:22:50 -0500 | [diff] [blame] | 27 | /** @brief A void function type for actions based condition(s) */ |
Matthew Barth | b86374d | 2017-04-12 10:57:19 -0500 | [diff] [blame] | 28 | using Action = std::function<void(sdbusplus::bus::bus&, |
| 29 | Monitor&)>; |
| 30 | |
| 31 | } // namespace monitoring |
| 32 | } // namespace dbus |
| 33 | } // namespace phosphor |