24#ifndef NOTIFICATION_MANAGER_H_
25#define NOTIFICATION_MANAGER_H_
29#include "observable/evtvar.h"
39 std::shared_ptr<Notification> _notification)
40 :
AppMsg(AppMsg::Type::CustomMsg),
42 notification(_notification) {};
46 const std::string action_verb;
47 std::shared_ptr<Notification> notification;
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);
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;
The global list of user notifications, a singleton.
const std::vector< std::shared_ptr< Notification > > & GetNotifications() const
Return current active notifications.
bool AcknowledgeNotification(const std::string &guid)
User ack on a notification which eventually will remove it.
obs::EventVar evt_notificationlist_change
Notified without data when a notification is added or removed.
NotificationSeverity GetMaxSeverity()
Return max severity among current active notifications.
Decoded messages definitions.
User notification container.