13 #ifndef IN_BLE_PRF_ANP_H 14 #define IN_BLE_PRF_ANP_H 26 #include "./ble/in_ble_prf.h" 31 BLE_ANP_SUPP_CAT_ID_SPL_ALERT_SUP = 0x01,
32 BLE_ANP_SUPP_CAT_ID_EMAIL_SUP = 0x02,
33 BLE_ANP_SUPP_CAT_ID_NEWS_SUP = 0x04,
34 BLE_ANP_SUPP_CAT_ID_CALL_SUP = 0x08,
35 BLE_ANP_SUPP_CAT_ID_MISSED_CALL_SUP = 0x10,
36 BLE_ANP_SUPP_CAT_ID_SMS_MMS_SUP = 0x20,
37 BLE_ANP_SUPP_CAT_ID_VOICE_MAIL_SUP = 0x40,
38 BLE_ANP_SUPP_CAT_ID_SCHEDULE_SUP = 0x80,
39 BLE_ANP_SUPP_CAT_ID_HIGH_PRTY_ALERT = 0x0100,
40 BLE_ANP_SUPP_CAT_ID_INST_MSG = 0x0200,
55 #define BLE_ANS_NEW_ALERT_STRING_INFO_MAX_LEN (18) 140 BLE_ANP_UNREAD_ALERT,
149 uint16_t supp_new_alert_cat;
151 uint16_t supp_unread_alert_cat;
156 uint16_t new_alert_ntf_cfg;
157 uint16_t unread_alert_status_ntf_cfg;
174 uint16_t supp_alert_cat;
175 } ble_evt_supp_alert_cat_t;
183 uint8_t info_str_len;
189 uint8_t nb_new_alert;
191 uint8_t str_info[18];
192 } ble_evt_new_alert_t;
202 uint8_t nb_unread_alert;
203 } ble_evt_unread_alert_t;
208 BLE_EVT_ANPC_NEW_ALERT = ANP_EVT_CODE +1,
210 BLE_EVT_ANPC_UNREAD_ALERT,
213 BLE_EVT_ANPS_NTF_IMMEDIATE_REQ_IND,
217 BLE_EVT_ANPS_NTF_STATUS_UPDATE_IND,
219 BLE_EVT_ANPS_NTF_CAT_STATUS_UPDATE_IND,
232 } ble_evt_anps_ntf_immediate_req_ind_t;
241 } ble_evt_anps_ntf_status_update_ind_t;
251 } ble_evt_anps_ntf_cat_status_update_ind_t;
256 uint8_t info_str_len;
262 uint8_t nb_new_alert;
265 } ble_anp_new_alert_value;
272 uint8_t nb_unread_alert;
273 } ble_anp_unread_alert_status;
278 ble_anp_new_alert_value new_alert;
280 ble_anp_unread_alert_status unread_alert_status;
281 } ble_anp_notify_alert_value;
316 int in_ble_anps_enable(
void *hdl,
int conidx,
struct anps_enable_rsp *p_rsp, comp_cb callback);
360 int in_ble_anpc_enable(
void *hdl,
int conidx,
struct anpc_enable_rsp *p_rsp, comp_cb callback);
int in_ble_anps_enable(void *hdl, int conidx, struct anps_enable_rsp *p_rsp, comp_cb callback)
Enable ANP service.
ble_att_perm
Definition: in_ble_att.h:63
int in_ble_anpc_add(void *hdl, ble_anp_prf_t *p_prf, comp_cb callback)
Add ANP Client Service.
bool check_enc_key_size
If let the service check whether encryption key size is 16bytes (more security).
Definition: in_ble_prf_anp.h:126
int in_ble_anps_notify_alert(void *hdl, int conidx, enum ble_anp_alert_type alert_type, ble_anp_notify_alert_value value, struct anps_cmp_evt *p_rsp, comp_cb callback)
Send new alert notification or indication to peer device.
int in_ble_anpc_set_ntf_status(void *hdl, int conidx, enum ble_anp_alert_type alert_type, enum ble_ntf_cfg alert_ntf_cfg, comp_cb callback)
Get ANP server notification status.
int in_ble_anpc_req_ntf_immediately(void *hdl, int conidx, enum ble_anp_alert_type alert_type, enum ble_anp_ntf_category_id_bits cat_id, comp_cb callback)
Ask ANP server to send notification immediately for individual category.
bool multi_instance
If the service is multi-instance.
Definition: in_ble_prf_anp.h:121
ble_anp_ntf_category_id_bits
Alert Category ID Bit Mask 0 Masks.
Definition: in_ble_prf_anp.h:29
int in_ble_anps_add(void *hdl, ble_anp_prf_t *p_prf, comp_cb callback)
Add ANP Server Service.
int in_ble_anpc_set_ntf_cat_status(void *hdl, int conidx, enum ble_anp_alert_type alert_type, enum ble_anp_ntf_category_id_bits cat_id, enum ble_ntf_cfg ntf_cfg, comp_cb callback)
Set ANP server notification status for individual category.
#define BLE_ANS_NEW_ALERT_STRING_INFO_MAX_LEN
New Alert Characteristic Value - Text String Information Max Length.
Definition: in_ble_prf_anp.h:55
int in_ble_anpc_enable(void *hdl, int conidx, struct anpc_enable_rsp *p_rsp, comp_cb callback)
Enable ANP client.
int in_ble_anpc_get_ntf_status(void *hdl, int conidx, enum ble_anp_alert_type alert_type, enum ble_ntf_cfg *p_alert_ntf_cfg, comp_cb callback)
Get ANP server notification status.
ble_ntf_cfg
Notification config.
Definition: in_ble_prf.h:79
int in_ble_anpc_get_ntf_supp_categroy(void *hdl, int conidx, enum ble_anp_alert_type alert_type, enum ble_anp_ntf_category_id_bits *p_supp_cat, comp_cb callback)
Get ANP server supported category.
New Alert.
Definition: in_ble_prf_anp.h:139
Category ID Field Keys.
Definition: in_ble_prf_anp.h:118
ble_anp_evt
Events defines for ANP Services.
Definition: in_ble_prf_anp.h:206
Parameters of the ANPS_ENABLE_REQ message.
Definition: in_ble_prf_anp.h:144
ble_anp_alert_type
Alert codes.
Definition: in_ble_prf_anp.h:136