diff options
author | Avamander <avamander@gmail.com> | 2020-10-02 22:16:48 +0300 |
---|---|---|
committer | Avamander <avamander@gmail.com> | 2020-10-02 22:16:48 +0300 |
commit | 6c86d1d9d706706fcb6f214aba8259e61ed68755 (patch) | |
tree | 2f4137a9916869cee18fd01449aa83ee586b9604 /src/components/ble/NotificationManager.h | |
parent | 4daab2692692d47af24a9384eb0f402821527882 (diff) |
Fixed all the includes that were broken due to the renames
Diffstat (limited to 'src/components/ble/NotificationManager.h')
-rw-r--r-- | src/components/ble/NotificationManager.h | 29 |
1 files changed, 29 insertions, 0 deletions
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 <array> + +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<char, MessageSize+1> 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<Notification, TotalNbNotifications> notifications; + uint8_t readIndex = 0; + uint8_t writeIndex = 0; + bool empty = true; + }; + } +}
\ No newline at end of file |