|
PebbleOS
|
#include <applib/preferred_content_size.h>#include <kernel/events.h>#include <pbl/services/notifications/alerts_private.h>#include <pbl/services/notifications/do_not_disturb.h>#include <pbl/services/vibes/vibe_intensity.h>#include <pbl/util/units.h>#include <pbl/services/vibes/vibe_client.h>#include <pbl/services/vibes/vibe_score_info.h>Macros | |
| #define | NOTIF_WINDOW_TIMEOUT_INFINITE ((uint32_t)~0) |
| Notification window timeout meaning "never time out". | |
| #define | NOTIF_WINDOW_TIMEOUT_DEFAULT (3 * PBL_MSEC_PER_MIN) |
| Default notification window timeout, in milliseconds. | |
| #define | NOTIF_WINDOW_TIMEOUT_MIN (15 * PBL_MSEC_PER_SEC) |
| Shortest notification window timeout, in milliseconds. | |
| #define | NotificationContentSizeSystem ((PreferredContentSize)NumPreferredContentSizes) |
| Notification content size value meaning "follow the system content size". | |
Enumerations | |
| enum | NotificationGroupingRange { NotificationGroupingRange_Never = 0 , NotificationGroupingRange_OneDay , NotificationGroupingRange_OneWeek , NotificationGroupingRange_All , NotificationGroupingRangeCount } |
| Age range within which notifications from the same sender are grouped. More... | |
| enum | NotificationStatusBarStyle { NotificationStatusBarStyle_Default = 0 , NotificationStatusBarStyle_Bold = 1 , NotificationStatusBarStyle_LargeBold = 2 , NotificationStatusBarStyleCount } |
| Style of the clock in the notification window status bar. More... | |
Functions | |
| void | alerts_preferences_init (void) |
| Load all preferences from the settings file, migrating legacy keys. | |
| AlertMask | alerts_preferences_get_alert_mask (void) |
| Get the alert mask. | |
| void | alerts_preferences_set_alert_mask (AlertMask mask) |
| Set the alert mask. | |
| AlertMask | alerts_preferences_dnd_get_mask (void) |
| Get the Do Not Disturb mask. | |
| void | alerts_preferences_dnd_set_mask (AlertMask mask) |
| Set the Do Not Disturb mask. | |
| uint32_t | alerts_preferences_get_notification_window_timeout_ms (void) |
| Get the notification window timeout. | |
| void | alerts_preferences_set_notification_window_timeout_ms (uint32_t timeout_ms) |
| Set the notification window timeout. | |
| bool | alerts_preferences_get_notification_alternative_design (void) |
| Get whether notifications use the alternative design. | |
| void | alerts_preferences_set_notification_alternative_design (bool alternative) |
| Set whether notifications use the alternative design. | |
| bool | alerts_preferences_get_notification_vibe_delay (void) |
| Get whether the notification vibration is delayed. | |
| void | alerts_preferences_set_notification_vibe_delay (bool delay) |
| Set whether the notification vibration is delayed. | |
| bool | alerts_preferences_get_notification_backlight (void) |
| Get whether notifications turn on the backlight. | |
| void | alerts_preferences_set_notification_backlight (bool enable) |
| Set whether notifications turn on the backlight. | |
| NotificationGroupingRange | alerts_preferences_get_notification_grouping_range (void) |
| Get the notification grouping range. | |
| void | alerts_preferences_set_notification_grouping_range (NotificationGroupingRange range) |
| Set the notification grouping range. | |
| NotificationStatusBarStyle | alerts_preferences_get_notification_status_bar_style (void) |
| Get the notification status bar style. | |
| void | alerts_preferences_set_notification_status_bar_style (NotificationStatusBarStyle style) |
| Set the notification status bar style. | |
| PreferredContentSize | alerts_preferences_get_notification_content_size (void) |
| Get the notification content size. | |
| void | alerts_preferences_set_notification_content_size (PreferredContentSize size) |
| Set the notification content size. | |
| bool | alerts_preferences_get_vibrate (void) |
| Get whether notifications vibrate. | |
| void | alerts_preferences_set_vibrate (bool enable) |
| Set whether notifications vibrate. | |
| VibeIntensity | alerts_preferences_get_vibe_intensity (void) |
| Get the legacy vibration intensity. | |
| void | alerts_preferences_set_vibe_intensity (VibeIntensity intensity) |
| Set the legacy vibration intensity. | |
| VibeScoreId | alerts_preferences_get_vibe_score_for_client (VibeClient client) |
| Get the vibration pattern used for a vibe client. | |
| void | alerts_preferences_set_vibe_score_for_client (VibeClient client, VibeScoreId id) |
| Set the vibration pattern used for a vibe client. | |
| bool | alerts_preferences_dnd_is_manually_enabled (void) |
| Get the stored manual DND state. | |
| void | alerts_preferences_dnd_set_manually_enabled (bool enable) |
| Store the manual DND state. | |
| void | alerts_preferences_dnd_get_schedule (DoNotDisturbScheduleType type, DoNotDisturbSchedule *schedule_out) |
| Get a DND schedule. | |
| void | alerts_preferences_dnd_set_schedule (DoNotDisturbScheduleType type, const DoNotDisturbSchedule *schedule) |
| Store a DND schedule. | |
| bool | alerts_preferences_dnd_is_schedule_enabled (DoNotDisturbScheduleType type) |
| Get whether a DND schedule is enabled. | |
| void | alerts_preferences_dnd_set_schedule_enabled (DoNotDisturbScheduleType type, bool enable) |
| Store whether a DND schedule is enabled. | |
| bool | alerts_preferences_dnd_is_smart_enabled (void) |
| Get whether calendar-aware (smart) DND is enabled. | |
| void | alerts_preferences_dnd_set_smart_enabled (bool enable) |
| Store whether calendar-aware (smart) DND is enabled. | |
| void | alerts_preferences_lock (void) |
| Lock the alerts preferences mutex. | |
| void | alerts_preferences_unlock (void) |
| Unlock the alerts preferences mutex. | |
| void | alerts_preferences_handle_blob_db_event (PebbleBlobDBEvent *event) |
| Process a BlobDB event for notification preferences. | |