Go to the documentation of this file.
62 #include "custom_config.h"
70 #define ANS_CONNECTION_MAX (10 < CFG_MAX_CONNECTIONS ?\
71 10 : CFG_MAX_CONNECTIONS)
72 #define ANS_ERROR_CMD_NOT_SUP 0xa0
73 #define ANS_UTF_8_STR_LEN_MAX 18
74 #define ANS_SUP_NEW_ALERT_CAT_VAL_LEN 2
75 #define ANS_NEWS_ALERT_VAL_LEN (ANS_UTF_8_STR_LEN_MAX + 2)
76 #define ANS_SUP_UNREAD_ALERT_CAT_VAL_LEN 2
77 #define ANS_UNREAD_ALERT_STA_VAL_LEN 2
78 #define ANS_ALERT_NTF_CTRL_PT_VAL_LEN 2
85 #define ANS_SMPL_ALERT_SUP (0x01 << 0)
86 #define ANS_EMAIL_SUP (0x01 << 1)
87 #define ANS_NEWS_SUP (0x01 << 2)
88 #define ANS_CALL_SUP (0x01 << 3)
89 #define ANS_MISSED_CALL_SUP (0x01 << 4)
90 #define ANS_SMS_MMS_SUP (0x01 << 5)
91 #define ANS_VOICE_MAIL_SUP (0x01 << 6)
92 #define ANS_SCHEDULE_SUP (0x01 << 7)
93 #define ANS_HG_PRIO_ALERT_SUP (0x01 << 8)
94 #define ANS_INSTANT_MES (0x01 << 9)
95 #define ANS_ALL_CAT_SUP (0x03ff)
ans_alert_cat_id_t cat_id
Definition: ans.h:151
@ ANS_EVT_INVALID
Definition: ans.h:134
ans_alert_cat_id_t cat_id
Definition: ans.h:160
@ ANS_CAT_ID_SCHEDULE
Definition: ans.h:113
@ ANS_CTRL_PT_EN_UNREAD_CAT_STA_NTF
Definition: ans.h:124
@ ANS_CAT_ID_EMAIL
Definition: ans.h:107
@ ANS_CTRL_PT_NTF_UNREAD_CAT_STA_IMME
Definition: ans.h:128
uint8_t alert_num
Definition: ans.h:152
@ ANS_CAT_ID_CALL
Definition: ans.h:109
ans_ctrl_pt_id_t
Alert Notification Service Control point.
Definition: ans.h:122
Alert Notification Service event.
Definition: ans.h:173
uint8_t unread_num
Definition: ans.h:161
uint16_t cat_ids
Definition: ans.h:176
@ ANS_CAT_ID_NB
Definition: ans.h:116
sdk_err_t ans_service_init(ans_init_t *p_ans_init)
Initialize an Alert Notification Service instance and add to the DB.
@ ANS_CAT_ID_HG_PRIO_ALERT
Definition: ans.h:114
@ ANS_CAT_ID_SMS_MMS
Definition: ans.h:111
@ ANS_EVT_UNREAD_ALERT_STA_NTF_ENABLE
Definition: ans.h:137
@ ANS_CAT_ID_INSTANT_MES
Definition: ans.h:115
Alert Notification Service Unread Alert Status value.
Definition: ans.h:159
@ ANS_CAT_ID_MISSED_CALL
Definition: ans.h:110
@ ANS_CTRL_PT_DIS_UNREAD_CAT_STA_NTF
Definition: ans.h:126
sdk_err_t ans_new_alert_send(uint8_t conn_idx, ans_new_alert_t *p_new_alert)
Send New Alert if its notification has been enabled.
@ ANS_EVT_NEW_ALERT_IMME_NTF_REQ
Definition: ans.h:139
@ ANS_EVT_Unread_ALERT_IMME_NTF_REQ
Definition: ans.h:140
ans_evt_type_t
Alert Notification Service Event type.
Definition: ans.h:133
uint8_t length
Definition: ans.h:154
@ ANS_CAT_ID_VOICE_MAIL
Definition: ans.h:112
ans_alert_cat_id_t cat_id
Definition: ans.h:168
sdk_err_t ans_unread_alert_send(uint8_t conn_idx, ans_unread_alert_t *p_unread_alert)
Send Unread Alert Status if its notification has been enabled.
@ ANS_CAT_ID_ALL
Definition: ans.h:117
ans_evt_type_t evt_type
Definition: ans.h:175
@ ANS_CTRL_PT_NTF_NEW_INC_ALERT_IMME
Definition: ans.h:127
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243
#define ANS_UTF_8_STR_LEN_MAX
Definition: ans.h:73
Alert Notification Service Control Point value.
Definition: ans.h:166
Alert Notification Service init stucture. This contains all options and data needed for initializatio...
Definition: ans.h:194
@ ANS_CAT_ID_NEWS
Definition: ans.h:108
ans_evt_handler_t evt_handler
Definition: ans.h:195
Alert Notification Service New Alert value.
Definition: ans.h:150
ans_alert_cat_id_t
Alert Notification Service Categories of alerts/messages.
Definition: ans.h:105
@ ANS_CTRL_PT_EN_NEW_INC_ALERT_NTF
Definition: ans.h:123
@ ANS_CAT_ID_SMPL_ALERT
Definition: ans.h:106
@ ANS_EVT_NEW_ALERT_NTF_DISABLE
Definition: ans.h:136
@ ANS_EVT_UNREAD_ALERT_STA_NTF_DISABLE
Definition: ans.h:138
@ ANS_CTRL_PT_DIS_NEW_INC_ALERT_NTF
Definition: ans.h:125
uint16_t sup_new_alert_cat
Definition: ans.h:196
uint8_t conn_idx
Definition: ans.h:174
ans_ctrl_pt_id_t cmd_id
Definition: ans.h:167
void(* ans_evt_handler_t)(ans_evt_t *p_evt)
Alert Notification Service event handler type.
Definition: ans.h:185
@ ANS_EVT_NEW_ALERT_NTF_ENABLE
Definition: ans.h:135
uint16_t sup_unread_alert_sta
Definition: ans.h:197