Skip to content
12 changes: 12 additions & 0 deletions include/pbl/services/notifications/alerts_preferences_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ bool alerts_preferences_get_notification_backlight(void);

void alerts_preferences_set_notification_backlight(bool enable);

typedef enum {
NotificationGroupingRange_Never = 0,
NotificationGroupingRange_OneDay,
NotificationGroupingRange_OneWeek,
NotificationGroupingRange_All,
NotificationGroupingRangeCount,
} NotificationGroupingRange;

NotificationGroupingRange alerts_preferences_get_notification_grouping_range(void);

void alerts_preferences_set_notification_grouping_range(NotificationGroupingRange range);

typedef enum {
NotificationStatusBarStyle_Default = 0,
NotificationStatusBarStyle_Bold = 1,
Expand Down
9 changes: 9 additions & 0 deletions include/pbl/services/notifications/notification_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ bool notification_storage_find_ancs_notification_by_timestamp(
void notification_storage_iterate(bool (*iter_callback)(void *data,
SerializedTimelineItemHeader *header_id), void *data);

//! Iterates over all notifications and deserializes payloads at or after item_cutoff.
//! item is NULL for older notifications. Callback data is only valid during the callback.
//! NOTE: Do NOT call into other notification storage functions from the iterator callback.
void notification_storage_iterate_items_after(
time_t item_cutoff,
bool (*iter_callback)(void *data, const CommonTimelineItemHeader *header,
const TimelineItem *item),
void *data);

//! Iterates over all the notifications calling the callback with the passed data.
//! Overwrites the notifications and rewrites them to disk.
//! This is essentially a noop if the callback doesn't alter the data.
Expand Down
Loading