|
PebbleOS
|
Builds timeline items from ANCS notifications. More...
Functions | |
| TimelineItem * | ancs_item_create_and_populate (ANCSAttribute *notif_attributes[], ANCSAttribute *app_attributes[], const ANCSAppMetadata *app_metadata, iOSNotifPrefs *notif_prefs, time_t timestamp, ANCSProperty properties) |
| Create a timeline item from ANCS data. | |
| void | ancs_item_update_dismiss_action (TimelineItem *item, uint32_t uid, const ANCSAttribute *attr_action_neg) |
| Replace the dismiss action of an item with an ANCS negative action. | |
Builds timeline items from ANCS notifications.
| TimelineItem * ancs_item_create_and_populate | ( | ANCSAttribute * | notif_attributes[], |
| ANCSAttribute * | app_attributes[], | ||
| const ANCSAppMetadata * | app_metadata, | ||
| iOSNotifPrefs * | notif_prefs, | ||
| time_t | timestamp, | ||
| ANCSProperty | properties | ||
| ) |
Create a timeline item from ANCS data.
Strings that reach the ANCS length limit are ellipsized. Actions are, in order, the ANCS positive and negative actions followed by the actions from notif_prefs.
| notif_attributes | Notification attributes, indexed by FetchedNotifAttributeIndex. |
| app_attributes | App attributes (the display name), indexed by FetchedAppAttributeIndex. |
| app_metadata | Icon and color of the app. |
| notif_prefs | iOS notification prefs of the app, may be NULL. |
| timestamp | Time the notification occurred. |
| properties | ANCS properties (category, flags). |
| void ancs_item_update_dismiss_action | ( | TimelineItem * | item, |
| uint32_t | uid, | ||
| const ANCSAttribute * | attr_action_neg | ||
| ) |
Replace the dismiss action of an item with an ANCS negative action.
The item's buffer is reallocated; pointers into the old one become invalid.
| [in,out] | item | Item to update. Nothing happens if it has no dismiss action. |
| uid | ANCS UID of the notification whose negative action is used. | |
| attr_action_neg | Negative action label from that notification. |