34class NotificationMsg :
public AppMsg {
36 NotificationMsg() : AppMsg(AppMsg::Type::CustomMsg) {}
38 NotificationMsg(
const std::string action,
39 std::shared_ptr<Notification> _notification)
40 : AppMsg(AppMsg::Type::CustomMsg),
42 notification(_notification) {};
44 virtual ~NotificationMsg() =
default;
46 const std::string action_verb;
47 std::shared_ptr<Notification> notification;
51class NotificationManager {
53 static NotificationManager& GetInstance();
55 NotificationManager(
const NotificationManager&) =
delete;
56 NotificationManager& operator=(
const NotificationManager&) =
delete;
58 std::string AddNotification(std::shared_ptr<Notification> _notification);
67 std::string AddNotification(NotificationSeverity _severity,
68 const std::string& _message,
69 int timeout_secs = -1);
77 bool AcknowledgeAllNotifications();
84 return active_notifications;
87 size_t GetNotificationCount()
const {
return active_notifications.size(); }
88 void ScrubNotificationDirectory(
int days_to_retain);
94 NotificationManager();
95 void PersistNotificationAsFile(
96 const std::shared_ptr<Notification> _notification);
98 void OnTimer(wxTimerEvent& event);
100 std::vector<std::shared_ptr<Notification>> active_notifications;
101 wxTimer m_timeout_timer;