From 6c86d1d9d706706fcb6f214aba8259e61ed68755 Mon Sep 17 00:00:00 2001 From: Avamander Date: Fri, 2 Oct 2020 22:16:48 +0300 Subject: Fixed all the includes that were broken due to the renames --- src/components/ble/NotificationManager.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/components/ble/NotificationManager.h (limited to 'src/components/ble/NotificationManager.h') diff --git a/src/components/ble/NotificationManager.h b/src/components/ble/NotificationManager.h new file mode 100644 index 00000000..daa1571b --- /dev/null +++ b/src/components/ble/NotificationManager.h @@ -0,0 +1,29 @@ +#pragma once + +#include + +namespace Pinetime { + namespace Controllers { + class NotificationManager { + public: + enum class Categories {Unknown, SimpleAlert, Email, News, IncomingCall, MissedCall, Sms, VoiceMail, Schedule, HighProriotyAlert, InstantMessage }; + static constexpr uint8_t MessageSize{18}; + + struct Notification { + std::array message; + Categories category = Categories::Unknown; + }; + + void Push(Categories category, const char* message, uint8_t messageSize); + Notification Pop(); + + + private: + static constexpr uint8_t TotalNbNotifications = 5; + std::array notifications; + uint8_t readIndex = 0; + uint8_t writeIndex = 0; + bool empty = true; + }; + } +} \ No newline at end of file -- cgit v1.2.3