PebbleOS
Loading...
Searching...
No Matches
Enumerations | Functions
Alerts settings

Alert masks and settings accessors used by the settings UI. More...

Enumerations

enum  AlertMask {
  AlertMaskAllOff = 0 , AlertMaskPhoneCalls = NotificationPhoneCall , AlertMaskOther = NotificationOther , AlertMaskAllOnLegacy = NotificationMobile | NotificationPhoneCall | NotificationOther ,
  AlertMaskAllOn
}
 Set of alert types that may alert the user, a bitmask of NotificationType. More...
 

Functions

bool alerts_get_vibrate (void)
 Get whether notifications vibrate.
 
AlertMask alerts_get_mask (void)
 Get the alert mask.
 
AlertMask alerts_get_dnd_mask (void)
 Get the Do Not Disturb mask.
 
uint32_t alerts_get_notification_window_timeout_ms (void)
 Get the notification window timeout.
 
void alerts_set_vibrate (bool enable)
 Set whether notifications vibrate.
 
void alerts_set_mask (AlertMask mask)
 Set the alert mask.
 
void alerts_set_dnd_mask (AlertMask mask)
 Set the Do Not Disturb mask.
 
void alerts_set_notification_window_timeout_ms (uint32_t timeout_ms)
 Set the notification window timeout.
 
void alerts_init (void)
 Initialize the alerts service.
 

Detailed Description

Alert masks and settings accessors used by the settings UI.

The getters and setters forward to Alert preferences; setters persist the value.

Enumeration Type Documentation

◆ AlertMask

enum AlertMask

Set of alert types that may alert the user, a bitmask of NotificationType.

Enumerator
AlertMaskAllOff 

No alerts.

AlertMaskPhoneCalls 

Phone calls only.

AlertMaskOther 

Other alerts only.

AlertMaskAllOnLegacy 

All alerts as stored by older firmware; migrated to AlertMaskAllOn when read.

AlertMaskAllOn 

All alerts, including reminders.

Function Documentation

◆ alerts_get_dnd_mask()

AlertMask alerts_get_dnd_mask ( void  )

Get the Do Not Disturb mask.

Returns
Alert types that may still vibrate or light the backlight while DND is active.

◆ alerts_get_mask()

AlertMask alerts_get_mask ( void  )

Get the alert mask.

Returns
Alert types that may alert the user.

◆ alerts_get_notification_window_timeout_ms()

uint32_t alerts_get_notification_window_timeout_ms ( void  )

Get the notification window timeout.

Returns
Timeout in milliseconds, at least NOTIF_WINDOW_TIMEOUT_MIN.

◆ alerts_get_vibrate()

bool alerts_get_vibrate ( void  )

Get whether notifications vibrate.

Returns
true if vibration is enabled.

◆ alerts_init()

void alerts_init ( void  )

Initialize the alerts service.

Loads the alert preferences and initializes Do Not Disturb and the vibration intensity.

◆ alerts_set_dnd_mask()

void alerts_set_dnd_mask ( AlertMask  mask)

Set the Do Not Disturb mask.

Parameters
maskAlert types that may still vibrate or light the backlight while DND is active.

◆ alerts_set_mask()

void alerts_set_mask ( AlertMask  mask)

Set the alert mask.

Parameters
maskAlert types that may alert the user.

◆ alerts_set_notification_window_timeout_ms()

void alerts_set_notification_window_timeout_ms ( uint32_t  timeout_ms)

Set the notification window timeout.

Parameters
timeout_msTimeout in milliseconds, or NOTIF_WINDOW_TIMEOUT_INFINITE.

◆ alerts_set_vibrate()

void alerts_set_vibrate ( bool  enable)

Set whether notifications vibrate.

Parameters
enabletrue to vibrate.