aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/Notifications.h
diff options
context:
space:
mode:
authorJF002 <JF002@users.noreply.github.com>2021-02-14 12:03:49 +0100
committerGitHub <noreply@github.com>2021-02-14 12:03:49 +0100
commit4c3803450e33e321dd2f90bdf62b9abe99f1e491 (patch)
tree1b69be394c55dce4cbe64750dae6603bfd33b09c /src/displayapp/screens/Notifications.h
parent6420885abb96735e085f3c60b123b0c671a7afb8 (diff)
parentd4c31bcbbe2f8b6d2e6c45203193745f9cb2a41b (diff)
Merge pull request #161 from petterhs/calls
Call functionality with changed UUID for notification event characteristic
Diffstat (limited to 'src/displayapp/screens/Notifications.h')
-rw-r--r--src/displayapp/screens/Notifications.h52
1 files changed, 35 insertions, 17 deletions
diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h
index f5c6a860..c40e7002 100644
--- a/src/displayapp/screens/Notifications.h
+++ b/src/displayapp/screens/Notifications.h
@@ -7,44 +7,62 @@
#include "components/ble/NotificationManager.h"
namespace Pinetime {
+ namespace Controllers {
+ class AlertNotificationService;
+ }
namespace Applications {
namespace Screens {
+
class Notifications : public Screen {
public:
enum class Modes {Normal, Preview};
- explicit Notifications(DisplayApp* app, Pinetime::Controllers::NotificationManager& notificationManager, Modes mode);
+ explicit Notifications(DisplayApp* app, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::AlertNotificationService& alertNotificationService, Modes mode);
~Notifications() override;
bool Refresh() override;
bool OnButtonPushed() override;
bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override;
+ class NotificationItem {
+ public:
+ NotificationItem(const char* title, const char* msg, uint8_t notifNr, Controllers::NotificationManager::Categories, uint8_t notifNb, Modes mode, Pinetime::Controllers::AlertNotificationService& alertNotificationService);
+ ~NotificationItem();
+ bool Refresh() {return false;}
+ void OnAcceptIncomingCall(lv_event_t event);
+ void OnMuteIncomingCall(lv_event_t event);
+ void OnRejectIncomingCall(lv_event_t event);
+
private:
- bool running = true;
+ uint8_t notifNr = 0;
+ uint8_t notifNb = 0;
+ char pageText[4];
- class NotificationItem {
- public:
- NotificationItem(const char* title, const char* msg, uint8_t notifNr, uint8_t notifNb, Modes mode);
- ~NotificationItem();
- bool Refresh() {return false;}
+ lv_obj_t* container1;
+ lv_obj_t* t1;
+ lv_obj_t* l1;
+ lv_obj_t* l2;
+ lv_obj_t* bt_accept;
+ lv_obj_t* bt_mute;
+ lv_obj_t* bt_reject;
+ lv_obj_t* label_accept;
+ lv_obj_t* label_mute;
+ lv_obj_t* label_reject;
+ lv_obj_t* bottomPlaceholder;
+ Modes mode;
+ Pinetime::Controllers::AlertNotificationService& alertNotificationService;
- private:
- uint8_t notifNr = 0;
- uint8_t notifNb = 0;
- char pageText[4];
- lv_obj_t* container1;
- lv_obj_t* t1;
- lv_obj_t* l1;
- lv_obj_t* bottomPlaceholder;
- Modes mode;
- };
+ };
+
+ private:
+ bool running = true;
struct NotificationData {
const char* title;
const char* text;
};
Pinetime::Controllers::NotificationManager& notificationManager;
+ Pinetime::Controllers::AlertNotificationService& alertNotificationService;
Modes mode = Modes::Normal;
std::unique_ptr<NotificationItem> currentItem;
Controllers::NotificationManager::Notification::Id currentId;