Go to the documentation of this file.
62 #include "custom_config.h"
70 #define ANS_C_CONNECTION_MAX (10 < CFG_MAX_CONNECTIONS ?\
71 10 : CFG_MAX_CONNECTIONS)
72 #define ANS_C_ERROR_CMD_NOT_SUP 0xa0
73 #define ANS_C_UTF_8_STR_LEN_MAX 18
74 #define ANS_C_ALERT_NTF_CTRL_PT_VAL_LEN 2
81 #define ANS_SMPL_ALERT_SUP (0x01 << 0)
82 #define ANS_EMAIL_SUP (0x01 << 1)
83 #define ANS_NEWS_SUP (0x01 << 2)
84 #define ANS_CALL_SUP (0x01 << 3)
85 #define ANS_MISSED_CALL_SUP (0x01 << 4)
86 #define ANS_SMS_MMS_SUP (0x01 << 5)
87 #define ANS_VOICE_MAIL_SUP (0x01 << 6)
88 #define ANS_SCHEDULE_SUP (0x01 << 7)
89 #define ANS_HG_PRIO_ALERT_SUP (0x01 << 8)
90 #define ANS_INSTANT_MES (0x01 << 9)
91 #define ANS_ALL_CAT_SUP (0x03ff)
@ ANS_C_EVT_UNREAD_ALERT_RECEIVE
Definition: ans_c.h:138
@ ANS_C_CTRL_PT_DIS_NEW_INC_ALERT_NTF
Definition: ans_c.h:121
uint16_t ans_new_alert_cccd_handle
Definition: ans_c.h:178
Alert Notification Service Client event.
Definition: ans_c.h:187
uint16_t ans_ctrl_pt_handle
Definition: ans_c.h:182
@ ANS_C_EVT_DISCOVERY_COMPLETE
Definition: ans_c.h:131
@ ANS_C_EVT_INVALID
Definition: ans_c.h:130
uint8_t length
Definition: ans_c.h:154
@ ANS_C_EVT_SUP_UNREAD_ALERT_CAT_REC
Definition: ans_c.h:136
ans_c_ctrl_pt_id_t
Alert Notification Service Client Control point ID.
Definition: ans_c.h:118
ans_c_alert_cat_id_t cat_id
Definition: ans_c.h:168
@ ANS_C_CAT_ID_SMS_MMS
Definition: ans_c.h:107
@ ANS_C_CAT_ID_INSTANT_MES
Definition: ans_c.h:111
@ ANS_C_EVT_DISCOVERY_FAIL
Definition: ans_c.h:132
@ ANS_C_CAT_ID_ALL
Definition: ans_c.h:113
ans_c_unread_alert_t unread_alert
Definition: ans_c.h:195
@ ANS_C_EVT_WRITE_OP_ERR
Definition: ans_c.h:140
uint8_t alert_num
Definition: ans_c.h:152
sdk_err_t ans_c_new_alert_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer New Alert characteristic notify.
@ ANS_C_CTRL_PT_NTF_NEW_INC_ALERT_IMME
Definition: ans_c.h:123
ans_c_alert_cat_id_t
Alert Notification Service Categories of alerts/messages.
Definition: ans_c.h:101
@ ANS_C_CAT_ID_EMAIL
Definition: ans_c.h:103
ans_c_evt_type_t evt_type
Definition: ans_c.h:189
uint16_t ans_sup_new_alert_cat_handle
Definition: ans_c.h:176
uint16_t sup_new_alert_cat_ids
Definition: ans_c.h:192
@ ANS_C_EVT_UNREAD_ALERT_STA_NTF_SET_SUCCESS
Definition: ans_c.h:134
uint16_t ans_unread_alert_handle
Definition: ans_c.h:180
@ ANS_C_CTRL_PT_EN_UNREAD_CAT_STA_NTF
Definition: ans_c.h:120
sdk_err_t ans_c_unread_alert_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer Unread Alert characteristic notify.
uint16_t ans_sup_unread_alert_cat_handle
Definition: ans_c.h:179
uint16_t ans_srvc_end_handle
Definition: ans_c.h:175
Alert Notification Service Client Control Point value.
Definition: ans_c.h:166
@ ANS_C_EVT_CTRL_POINT_SET_SUCCESS
Definition: ans_c.h:139
@ ANS_C_EVT_NEW_ALERT_NTF_SET_SUCCESS
Definition: ans_c.h:133
@ AANS_C_CAT_ID_NB
Definition: ans_c.h:112
Alert Notification Service Client decoded Unread Alert Status value.
Definition: ans_c.h:159
@ ANS_C_CTRL_PT_EN_NEW_INC_ALERT_NTF
Definition: ans_c.h:119
@ ANS_C_CAT_ID_SCHEDULE
Definition: ans_c.h:109
uint8_t conn_idx
Definition: ans_c.h:188
@ ANS_C_CAT_ID_MISSED_CALL
Definition: ans_c.h:106
uint16_t ans_new_alert_handle
Definition: ans_c.h:177
@ ANS_C_CAT_ID_CALL
Definition: ans_c.h:105
@ ANS_C_CAT_ID_SMPL_ALERT
Definition: ans_c.h:102
sdk_err_t ans_c_sup_new_alert_cat_read(uint8_t conn_idx)
Read Supported New Alert Category characteristic value.
uint16_t ans_srvc_start_handle
Definition: ans_c.h:174
sdk_err_t ans_client_init(ans_c_evt_handler_t evt_handler)
Register ANS Client event handler.
ans_c_alert_cat_id_t cat_id
Definition: ans_c.h:151
Profile/Service Common Types.
uint16_t sup_unread_alert_cat_ids
Definition: ans_c.h:193
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243
@ ANS_C_CAT_ID_HG_PRIO_ALERT
Definition: ans_c.h:110
void(* ans_c_evt_handler_t)(ans_c_evt_t *p_evt)
Alert Notification Service Client event handler type.
Definition: ans_c.h:205
uint16_t ans_unread_alert_cccd_handle
Definition: ans_c.h:181
sdk_err_t ans_c_sup_unread_alert_cat_read(uint8_t conn_idx)
Read Supported Unread Alert Category characteristic value.
Handles on the connected peer device needed to interact with it.
Definition: ans_c.h:173
@ ANS_C_EVT_SUP_NEW_ALERT_CAT_RECEIV
Definition: ans_c.h:135
ans_c_alert_cat_id_t cat_id
Definition: ans_c.h:160
@ ANS_C_CTRL_PT_DIS_UNREAD_CAT_STA_NTF
Definition: ans_c.h:122
ans_c_evt_type_t
Alert Notification Service Client Event type.
Definition: ans_c.h:129
sdk_err_t ans_c_disc_srvc_start(uint8_t conn_idx)
Discover Alert Notification Service on peer.
@ ANS_C_CAT_ID_VOICE_MAIL
Definition: ans_c.h:108
@ ANS_C_CTRL_PT_NTF_UNREAD_CAT_STA_IMME
Definition: ans_c.h:124
sdk_err_t ans_c_ctrl_point_set(uint8_t conn_idx, ans_c_ctrl_pt_t *p_ctrl_pt)
Set Control Point characteristic value.
@ ANS_C_EVT_NEW_ALERT_RECEIVE
Definition: ans_c.h:137
Alert Notification Service Client decoded New Alert value.
Definition: ans_c.h:150
uint8_t unread_num
Definition: ans_c.h:161
@ ANS_C_CAT_ID_NEWS
Definition: ans_c.h:104
ans_c_new_alert_t new_alert
Definition: ans_c.h:194
ans_c_ctrl_pt_id_t cmd_id
Definition: ans_c.h:167
#define ANS_C_UTF_8_STR_LEN_MAX
Definition: ans_c.h:73