Documentation only, no functional change
Added copyrights and comments within headers
Change-Id: Iebb17ba34b82a6c80718ad32338105a5245e640c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/src/events.hpp b/src/events.hpp
index b6de8de..684a0a8 100644
--- a/src/events.hpp
+++ b/src/events.hpp
@@ -9,9 +9,17 @@
namespace monitoring
{
+/**
+ * @class Event
+ * @brief An item monitoring triggered event
+ * @details An event with an associated list of conditions to check
+ */
class Event : public std::vector<Condition>
{
public:
+ /**
+ * @brief Types of triggers of the event
+ */
enum class Trigger
{
START,
@@ -25,6 +33,12 @@
Event& operator=(Event&&) = delete;
virtual ~Event() = default;
+ /**
+ * @brief Constructs an event with given conditions and trigger
+ *
+ * @param[in] conditions - Conditions for the event
+ * @param[in] t - Type of trigger of the event
+ */
Event(const std::vector<Condition>& conditions,
Trigger t) :
std::vector<Condition>(conditions),
@@ -33,6 +47,7 @@
// Nothing to do here
}
+ /** @brief Event trigger type */
Trigger trigger;
};
@@ -46,6 +61,11 @@
StartEvent& operator=(StartEvent&&) = delete;
~StartEvent() = default;
+ /**
+ * @brief Constructs a derived application started event
+ *
+ * @param[in] conditions - Conditions for the event
+ */
explicit StartEvent(const std::vector<Condition>& conditions) :
Event(conditions, Trigger::START)
{
@@ -63,6 +83,12 @@
SignalEvent& operator=(SignalEvent&&) = delete;
~SignalEvent() = default;
+ /**
+ * @brief Constructs a derived Dbus signal event
+ *
+ * @param[in] signature - Dbus object signature
+ * @param[in] conditions - Conditions for the event
+ */
SignalEvent(const char* signature,
const std::vector<Condition>& conditions) :
Event(conditions, Trigger::SIGNAL),
@@ -71,6 +97,7 @@
// Nothing to do here
}
+ /** @brief Dbus object signature */
const char* signature;
};