Add support for application startup events.
Allow clients to specify filters and actions that trigger
on application startup.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: Ib36c5bab778d7c87906dd3f61a3a6e033c7ccde1
diff --git a/events.hpp b/events.hpp
index e197719..6737861 100644
--- a/events.hpp
+++ b/events.hpp
@@ -33,6 +33,7 @@
enum class Type
{
DBUS_SIGNAL,
+ STARTUP,
};
virtual ~Event() = default;
@@ -47,7 +48,7 @@
* @param[in] t - The event type.
*/
explicit Event(
- const std::vector<FilterBasePtr>& filters, Type t) :
+ const std::vector<FilterBasePtr>& filters, Type t = Type::STARTUP) :
std::vector<FilterBasePtr>(filters),
type(t) {}
@@ -55,6 +56,8 @@
Type type;
};
+using StartupEvent = Event;
+
using EventBasePtr = std::shared_ptr<Event>;
/** @struct DbusSignal