Go to the documentation of this file.
37 #ifndef _ANCS_PROTOCOL_H_
38 #define _ANCS_PROTOCOL_H_
44 #ifndef CFG_ANCS_ATTRIBUTE_MAXLEN
45 #define CFG_ANCS_ATTRIBUTE_MAXLEN 500
49 #define ANCS_ATTR(ID) ((uint32_t) 0x80000000 | ((uint8_t) ID))
52 #define ANCS_ATTR_MAXLEN(ID, LEN) ((uint32_t) 0x80000000 | ((uint8_t) ID) | ((uint16_t) LEN << 8))
@ ANCS_NOTIF_ATTR_ID_SUBTITLE
Identify that the attribute data is a "Subtitle".
@ ANCS_CATEGORY_ID_OTHER
The iOS notification belongs to the "other" category.
@ ANCS_CATEGORY_ID_SCHEDULE
The iOS notification belongs to the "Schedule" category.
@ CTRL_POINT_GET_APP_ATTRIBUTE
Request attributes to be sent from the NP to the NC for a given iOS app.
@ ANCS_NOTIF_ATTR_ID_MESSAGE_SIZE
Identify that the attribute data is a "Message Size".
iOS notification structure.
@ ACTION_ID_NEGATIVE
Negative action.
ancs_ntf_flags_t event_flags
Whether the notification was added, removed, or modified.
uint8_t pre_existing
If this flag is set, the notification is pre-existing.
uint8_t silent
If this flag is set, the notification has a low priority.
@ ANCS_NOTIF_ATTR_ID_POSITIVE_ACTION_LABEL
The notification has a "Positive action" that can be executed associated with it.
uint8_t important
If this flag is set, the notification has a high priority.
ancs_evt_id_t event_id
Whether the notification was added, removed, or modified.
@ ANCS_CATEGORY_ID_ENTERTAINMENT
The iOS notification belongs to the "Entertainment" category.
void ancs_decode_data_source(uint8_t *p_data, uint16_t length)
Decode data source message.
@ ANCS_NOTIF_ATTR_ID_MESSAGE
Identify that the attribute data is a "Message".
@ ANCS_EVENT_ID_NOTIFICATION_MODIFIED
The iOS notification was modified.
ancs_evt_id_t
Event IDs for iOS notifications.
ancs_category_id_t
Category IDs for iOS notifications.
ancs_notification_attr_t
IDs for iOS notification attributes.
uint8_t category_count
Current number of active notifications for this category ID.
void ancs_decode_notification_source(uint8_t *p_data, uint16_t length)
Decode notification source message.
@ CTRL_POINT_PERFORM_NTF_ACTION
Request an action to be performed on a given notification, for example, dismiss an alarm.
ancs_c_ctrl_point_t
ctrl point command that can be performed for iOS notifications.
@ ANCS_CATEGORY_ID_BUSINESS_AND_FINANCE
The iOS notification belongs to the "Buisness and Finance" category.
void ancs_notify_attr_get(int uid, char noti_attr)
Get notification attribute.
ancs_category_id_t category_id
Classification of the notification type, for example, email or location.
@ ANCS_NOTIF_ATTR_ID_APP_IDENTIFIER
Identify that the attribute data is of an "App Identifier" type.
@ ANCS_NOTIF_ATTR_ID_NEGATIVE_ACTION_LABEL
The notification has a "Negative action" that can be executed associated with it.
@ ANCS_CATEGORY_ID_VOICE_MAIL
The iOS notification belongs to the "Voice Mail" category.
@ ANCS_CATEGORY_ID_LOCATION
The iOS notification belongs to the "Location" category.
@ CTRL_POINT_GET_NTF_ATTRIBUTE
Request attributes to be sent from the NP to the NC for a given notification.
notification flags that can be performed for iOS notifications.
uint8_t negative_action
If this flag is set, the notification has a negative action that can be taken.
ancs_c_action_id_t
ID for actions that can be performed for iOS notifications.
@ ANCS_CATEGORY_ID_EMAIL
The iOS notification belongs to the "E-mail" category.
@ ANCS_CATEGORY_ID_HEALTH_AND_FITNESS
The iOS notification belongs to the "Health and Fitness" category.
uint8_t positive_action
If this flag is set, the notification has a positive action that can be taken.
@ ANCS_CATEGORY_ID_MISSED_CALL
The iOS notification belongs to the "Missed Call" category.
@ ANCS_CATEGORY_ID_SOCIAL
The iOS notification belongs to the "Social" category.
@ ACTION_ID_POSITIVE
Positive action.
int ancs_get_uid(void)
get ancs phone call UID
@ ANCS_NOTIF_ATTR_ID_DATE
Identify that the attribute data is a "Date".
@ ANCS_CATEGORY_ID_NEWS
The iOS notification belongs to the "News" category.
void ancs_action_perform(int uid, int action)
ancs perform action
uint32_t notification_uid
Notification UID.
@ ANCS_CATEGORY_ID_INCOMING_CALL
The iOS notification belongs to the "Incoming Call" category.
@ ANCS_EVENT_ID_NOTIFICATION_ADDED
The iOS notification was added.
@ ANCS_EVENT_ID_NOTIFICATION_REMOVED
The iOS notification was removed.
@ ANCS_NOTIF_ATTR_ID_TITLE
Identify that the attribute data is a "Title".