blob: cbe6faf920eacf234caa5912550c94e60ff056e4 [file] [log] [blame]
Matthew Barthb86374d2017-04-12 10:57:19 -05001#pragma once
2
3#include <functional>
4#include <sdbusplus/bus.hpp>
5#include <sdbusplus/message.hpp>
6
7namespace phosphor
8{
9namespace dbus
10{
11namespace monitoring
12{
13
14class Monitor;
15
Matthew Barthc5736432017-04-17 12:22:50 -050016/** @brief The possible item value types */
Matthew Barthb86374d2017-04-12 10:57:19 -050017using Value = int64_t;
18
Matthew Barthc5736432017-04-17 12:22:50 -050019/** @brief A list of what constructs a unique item and its value */
Matthew Barthb86374d2017-04-12 10:57:19 -050020using Group = std::vector<std::tuple<std::string, Value>>;
21
Matthew Barthc5736432017-04-17 12:22:50 -050022/** @brief A conditional function type for item(s) conditions */
Matthew Barthb86374d2017-04-12 10:57:19 -050023using Condition = std::function<bool(sdbusplus::bus::bus&,
24 sdbusplus::message::message&,
25 Monitor&)>;
26
Matthew Barthc5736432017-04-17 12:22:50 -050027/** @brief A void function type for actions based condition(s) */
Matthew Barthb86374d2017-04-12 10:57:19 -050028using Action = std::function<void(sdbusplus::bus::bus&,
29 Monitor&)>;
30
31} // namespace monitoring
32} // namespace dbus
33} // namespace phosphor