ans_c.h
Go to the documentation of this file.
1 /**
2  ****************************************************************************************
3  *
4  * @file ans_c.h
5  *
6  * @brief Alert Notification Service Client API.
7  *
8  ****************************************************************************************
9  * @attention
10  #####Copyright (c) 2019 GOODIX
11  All rights reserved.
12 
13  Redistribution and use in source and binary forms, with or without
14  modification, are permitted provided that the following conditions are met:
15  * Redistributions of source code must retain the above copyright
16  notice, this list of conditions and the following disclaimer.
17  * Redistributions in binary form must reproduce the above copyright
18  notice, this list of conditions and the following disclaimer in the
19  documentation and/or other materials provided with the distribution.
20  * Neither the name of GOODIX nor the names of its contributors may be used
21  to endorse or promote products derived from this software without
22  specific prior written permission.
23 
24  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  POSSIBILITY OF SUCH DAMAGE.
35  *****************************************************************************************
36  */
37 /**
38  * @addtogroup BLE_SRV BLE Services
39  * @{
40  */
41 
42 /**
43  * @defgroup BLE_SDK_ANS_C Alert Notification Service Client (ANS_C)
44  * @{
45  * @brief Alert Notification Service Client module.
46  *
47  * @details The Alert Notification Service Client contains the APIs and types, which can be used
48  * by the application to discovery of Alert Notification Service of peer and interact with it.
49  *
50  * The application must provide an event handler to be register, then call \ref ans_client_init().
51  * After Alert Notification Service Client discoveries peer Alert Notification Service,
52  * application can call \ref ans_c_ctrl_point_set() to send Alert Notification Control Point to peer.
53  * When number of New Alert or Unread Alert changes, the module will receive notification from peer
54  * if notifications of them are enabled.
55  */
56 
57 #ifndef __ANS_C_H__
58 #define __ANS_C_H__
59 
60 #include "gr55xx_sys.h"
61 #include "ble_prf_types.h"
62 #include "custom_config.h"
63 #include <stdint.h>
64 #include <stdbool.h>
65 
66 /**
67  * @defgroup ANS_C_MACRO Defines
68  * @{
69  */
70 #define ANS_C_CONNECTION_MAX (10 < CFG_MAX_CONNECTIONS ?\
71  10 : CFG_MAX_CONNECTIONS) /**< Maximum number of HRS Client connections. */
72 #define ANS_C_ERROR_CMD_NOT_SUP 0xa0 /**< Command not supported. */
73 #define ANS_C_UTF_8_STR_LEN_MAX 18 /**< Maximum length of “UTF-8 string”. */
74 #define ANS_C_ALERT_NTF_CTRL_PT_VAL_LEN 2 /**< Length of Alert Notification Control Point value. */
75 
76 /**
77  * @defgroup ANS_C_CAT_ID_BIT_MASK Category ID Bit Masks
78  * @{
79  * @brief Category ID Bit Masks.
80  */
81 #define ANS_SMPL_ALERT_SUP (0x01 << 0) /**< Bit for Simple Alert Supported. */
82 #define ANS_EMAIL_SUP (0x01 << 1) /**< Bit for Email Supported. */
83 #define ANS_NEWS_SUP (0x01 << 2) /**< Bit for News Supported. */
84 #define ANS_CALL_SUP (0x01 << 3) /**< Bit for Call Supported. */
85 #define ANS_MISSED_CALL_SUP (0x01 << 4) /**< Bit for Missed Call Supported. */
86 #define ANS_SMS_MMS_SUP (0x01 << 5) /**< Bit for SMS/MMS Supported. */
87 #define ANS_VOICE_MAIL_SUP (0x01 << 6) /**< Bit for Voice Mail Supported. */
88 #define ANS_SCHEDULE_SUP (0x01 << 7) /**< Bit for Schedule Supported. */
89 #define ANS_HG_PRIO_ALERT_SUP (0x01 << 8) /**< Bit for High Prioritized Alert Supported. */
90 #define ANS_INSTANT_MES (0x01 << 9) /**< Bit for Instant Message Supported. */
91 #define ANS_ALL_CAT_SUP (0x03ff) /**< Bit for All Category Supported. */
92 /** @} */
93 /** @} */
94 
95 /**
96  * @defgroup ANS_C_ENUM Enumerations
97  * @{
98  */
99 /**@brief Alert Notification Service Categories of alerts/messages. */
100 typedef enum
101 {
102  ANS_C_CAT_ID_SMPL_ALERT, /**< Simple Alert: General text alert or non-text alert. */
103  ANS_C_CAT_ID_EMAIL, /**< Email: Alert when Email messages arrives. */
104  ANS_C_CAT_ID_NEWS, /**< News: News feeds such as RSS, Atom. */
105  ANS_C_CAT_ID_CALL, /**< Call: Incoming call. */
106  ANS_C_CAT_ID_MISSED_CALL, /**< Missed call: Missed Call. */
107  ANS_C_CAT_ID_SMS_MMS, /**< SMS/MMS: SMS/MMS message arrives. */
108  ANS_C_CAT_ID_VOICE_MAIL, /**< Voice mail: Voice mail.*/
109  ANS_C_CAT_ID_SCHEDULE, /**< Schedule: Alert occurred on calendar, planner. */
110  ANS_C_CAT_ID_HG_PRIO_ALERT, /**< High Prioritized Alert: Alert that should be handled as high priority. */
111  ANS_C_CAT_ID_INSTANT_MES, /**< Instant Message: Alert for incoming instant messages. */
112  AANS_C_CAT_ID_NB, /**< Number of all Categories of alerts/messages. */
113  ANS_C_CAT_ID_ALL = 0xff, /**< All Categories of alerts/messages. */
115 
116 /**@brief Alert Notification Service Client Control point ID. */
117 typedef enum
118 {
119  ANS_C_CTRL_PT_EN_NEW_INC_ALERT_NTF, /**< Enable New Incoming Alert Notification. */
120  ANS_C_CTRL_PT_EN_UNREAD_CAT_STA_NTF, /**< Enable Unread Category Status Notification. */
121  ANS_C_CTRL_PT_DIS_NEW_INC_ALERT_NTF, /**< Disable New Incoming Alert Notification. */
122  ANS_C_CTRL_PT_DIS_UNREAD_CAT_STA_NTF, /**< Disable Unread Category Status Notification. */
123  ANS_C_CTRL_PT_NTF_NEW_INC_ALERT_IMME, /**< Notify New Incoming Alert immediately. */
124  ANS_C_CTRL_PT_NTF_UNREAD_CAT_STA_IMME, /**< Notify Unread Category Status immediately. */
126 
127 /**@brief Alert Notification Service Client Event type. */
128 typedef enum
129 {
130  ANS_C_EVT_INVALID, /**< ANS Client invalid event type. */
131  ANS_C_EVT_DISCOVERY_COMPLETE, /**< ANS Client has found ANS service and its characteristics. */
132  ANS_C_EVT_DISCOVERY_FAIL , /**< ANS Client found ANS service failed because of invalid operation or no found at the peer. */
133  ANS_C_EVT_NEW_ALERT_NTF_SET_SUCCESS, /**< ANS Client has set NEW Alert notification. */
134  ANS_C_EVT_UNREAD_ALERT_STA_NTF_SET_SUCCESS, /**< ANS Client has set Unread Alert Status notification. */
135  ANS_C_EVT_SUP_NEW_ALERT_CAT_RECEIV, /**< ANS Client has received Supported New Alert Category value (Read from peer). */
136  ANS_C_EVT_SUP_UNREAD_ALERT_CAT_REC, /**< ANS Client has received Supported Unread Alert Category value (Read from peer). */
137  ANS_C_EVT_NEW_ALERT_RECEIVE, /**< ANS Client has received New Alert value (Notification from peer). */
138  ANS_C_EVT_UNREAD_ALERT_RECEIVE, /**< ANS Client has received Unread Alert Status value (Notification from peer). */
139  ANS_C_EVT_CTRL_POINT_SET_SUCCESS, /**< ANS Client has written Control Point completely. */
140  ANS_C_EVT_WRITE_OP_ERR, /**< Error occured when ANS Client wrote to peer. */
142 /** @} */
143 
144 /**
145  * @defgroup ANS_C_STRUCT Structures
146  * @{
147  */
148 /**@brief Alert Notification Service Client decoded New Alert value. */
149 typedef struct
150 {
151  ans_c_alert_cat_id_t cat_id; /**< Category ID. */
152  uint8_t alert_num; /**< Number of new alert. */
153  uint8_t str_info[ANS_C_UTF_8_STR_LEN_MAX]; /**< Text String Information. */
154  uint8_t length; /**< Length of Text String. */
156 
157 /**@brief Alert Notification Service Client decoded Unread Alert Status value. */
158 typedef struct
159 {
160  ans_c_alert_cat_id_t cat_id; /**< Category ID. */
161  uint8_t unread_num; /**< Number of unread alert. */
163 
164 /**@brief Alert Notification Service Client Control Point value. */
165 typedef struct
166 {
167  ans_c_ctrl_pt_id_t cmd_id; /**< Command ID. */
168  ans_c_alert_cat_id_t cat_id; /**< Category ID. */
170 
171 /**@brief Handles on the connected peer device needed to interact with it. */
172 typedef struct
173 {
174  uint16_t ans_srvc_start_handle; /**< ANS Service start handle. */
175  uint16_t ans_srvc_end_handle; /**< ANS Service end handle. */
176  uint16_t ans_sup_new_alert_cat_handle; /**< ANS Supported New Alert Category characteristic Value handle which has been got from peer. */
177  uint16_t ans_new_alert_handle; /**< ANS New Alert characteristic Value handle which has been got from peer. */
178  uint16_t ans_new_alert_cccd_handle; /**< ANS CCCD handle of New Alert characteristic which has been got from peer. */
179  uint16_t ans_sup_unread_alert_cat_handle; /**< ANS Supported Unread Alert Category characteristic Value handle which has been got from peer. */
180  uint16_t ans_unread_alert_handle; /**< ANS Unread Alert characteristic Value handle which has been got from peer. */
181  uint16_t ans_unread_alert_cccd_handle; /**< ANS CCCD handle of Unread Alert characteristic which has been got from peer. */
182  uint16_t ans_ctrl_pt_handle; /**< ANS Control Point characteristic Value handle which has been got from peer. */
184 
185 /**@brief Alert Notification Service Client event. */
186 typedef struct
187 {
188  uint8_t conn_idx; /**< The index of the connection. */
189  ans_c_evt_type_t evt_type; /**< The ANS event type. */
190  union
191  {
192  uint16_t sup_new_alert_cat_ids; /**< Alert status received. */
193  uint16_t sup_unread_alert_cat_ids; /**< Ringer setting received. */
194  ans_c_new_alert_t new_alert; /**< New Alert value. */
195  ans_c_unread_alert_t unread_alert; /**< Unread Alert Status value. */
196  } value; /**< Value received. */
197 } ans_c_evt_t;
198 /** @} */
199 
200 /**
201  * @defgroup ANS_C_TYPEDEF Typedefs
202  * @{
203  */
204 /**@brief Alert Notification Service Client event handler type.*/
205 typedef void (*ans_c_evt_handler_t)(ans_c_evt_t *p_evt);
206 /** @} */
207 
208 /**
209  * @defgroup ANS_FUNCTION Functions
210  * @{
211  */
212 /**
213  *****************************************************************************************
214  * @brief Register ANS Client event handler.
215  *
216  * @param[in] evt_handler: Alert Notification Service Client event handler.
217  *
218  * @return Result of initialization.
219  *****************************************************************************************
220  */
222 
223 /**
224  *****************************************************************************************
225  * @brief Discover Alert Notification Service on peer.
226  *
227  * @param[in] conn_idx: Index of connection.
228  *
229  * @return Operation result.
230  *****************************************************************************************
231  */
233 
234 /**
235  *****************************************************************************************
236  * @brief Enable or disable peer New Alert characteristic notify.
237  *
238  * @param[in] conn_idx: Index of connection.
239  * @param[in] is_enable: True or false.
240  *
241  * @return Operation result.
242  *****************************************************************************************
243  */
244 sdk_err_t ans_c_new_alert_notify_set(uint8_t conn_idx, bool is_enable);
245 
246 /**
247  *****************************************************************************************
248  * @brief Enable or disable peer Unread Alert characteristic notify.
249  *
250  * @param[in] conn_idx: Index of connection.
251  * @param[in] is_enable: True or false.
252  *
253  * @return Operation result.
254  *****************************************************************************************
255  */
256 sdk_err_t ans_c_unread_alert_notify_set(uint8_t conn_idx, bool is_enable);
257 
258 /**
259  *****************************************************************************************
260  * @brief Read Supported New Alert Category characteristic value.
261  *
262  * @param[in] conn_idx: Index of connection.
263  *
264  * @return Operation result.
265  *****************************************************************************************
266  */
268 
269 /**
270  *****************************************************************************************
271  * @brief Read Supported Unread Alert Category characteristic value.
272  *
273  * @param[in] conn_idx: Index of connection.
274  *
275  * @return Operation result.
276  *****************************************************************************************
277  */
279 
280 /**
281  *****************************************************************************************
282  * @brief Set Control Point characteristic value.
283  *
284  * @param[in] conn_idx: Index of connection.
285  * @param[in] p_ctrl_pt: Pointer to control point.
286  *
287  * @return Operation result.
288  *****************************************************************************************
289  */
290 sdk_err_t ans_c_ctrl_point_set(uint8_t conn_idx, ans_c_ctrl_pt_t *p_ctrl_pt);
291 /** @} */
292 
293 #endif
294 /** @} */
295 /** @} */
296 
ANS_C_EVT_UNREAD_ALERT_RECEIVE
@ ANS_C_EVT_UNREAD_ALERT_RECEIVE
ANS Client has received Unread Alert Status value (Notification from peer).
Definition: ans_c.h:138
ANS_C_CTRL_PT_DIS_NEW_INC_ALERT_NTF
@ ANS_C_CTRL_PT_DIS_NEW_INC_ALERT_NTF
Disable New Incoming Alert Notification.
Definition: ans_c.h:121
ans_c_handles_t::ans_new_alert_cccd_handle
uint16_t ans_new_alert_cccd_handle
ANS CCCD handle of New Alert characteristic which has been got from peer.
Definition: ans_c.h:178
ans_c_evt_t
Alert Notification Service Client event.
Definition: ans_c.h:187
ans_c_handles_t::ans_ctrl_pt_handle
uint16_t ans_ctrl_pt_handle
ANS Control Point characteristic Value handle which has been got from peer.
Definition: ans_c.h:182
ANS_C_EVT_DISCOVERY_COMPLETE
@ ANS_C_EVT_DISCOVERY_COMPLETE
ANS Client has found ANS service and its characteristics.
Definition: ans_c.h:131
ANS_C_EVT_INVALID
@ ANS_C_EVT_INVALID
ANS Client invalid event type.
Definition: ans_c.h:130
ans_c_new_alert_t::length
uint8_t length
Length of Text String.
Definition: ans_c.h:154
ANS_C_EVT_SUP_UNREAD_ALERT_CAT_REC
@ ANS_C_EVT_SUP_UNREAD_ALERT_CAT_REC
ANS Client has received Supported Unread Alert Category value (Read from peer).
Definition: ans_c.h:136
ans_c_ctrl_pt_id_t
ans_c_ctrl_pt_id_t
Alert Notification Service Client Control point ID.
Definition: ans_c.h:118
ans_c_ctrl_pt_t::cat_id
ans_c_alert_cat_id_t cat_id
Category ID.
Definition: ans_c.h:168
ANS_C_CAT_ID_SMS_MMS
@ ANS_C_CAT_ID_SMS_MMS
SMS/MMS: SMS/MMS message arrives.
Definition: ans_c.h:107
ANS_C_CAT_ID_INSTANT_MES
@ ANS_C_CAT_ID_INSTANT_MES
Instant Message: Alert for incoming instant messages.
Definition: ans_c.h:111
ANS_C_EVT_DISCOVERY_FAIL
@ ANS_C_EVT_DISCOVERY_FAIL
ANS Client found ANS service failed because of invalid operation or no found at the peer.
Definition: ans_c.h:132
ANS_C_CAT_ID_ALL
@ ANS_C_CAT_ID_ALL
All Categories of alerts/messages.
Definition: ans_c.h:113
ans_c_evt_t::unread_alert
ans_c_unread_alert_t unread_alert
Unread Alert Status value.
Definition: ans_c.h:195
ANS_C_EVT_WRITE_OP_ERR
@ ANS_C_EVT_WRITE_OP_ERR
Error occured when ANS Client wrote to peer.
Definition: ans_c.h:140
ans_c_new_alert_t::alert_num
uint8_t alert_num
Number of new alert.
Definition: ans_c.h:152
ans_c_new_alert_notify_set
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
@ ANS_C_CTRL_PT_NTF_NEW_INC_ALERT_IMME
Notify New Incoming Alert immediately.
Definition: ans_c.h:123
ans_c_alert_cat_id_t
ans_c_alert_cat_id_t
Alert Notification Service Categories of alerts/messages.
Definition: ans_c.h:101
ANS_C_CAT_ID_EMAIL
@ ANS_C_CAT_ID_EMAIL
Email: Alert when Email messages arrives.
Definition: ans_c.h:103
gr55xx_sys.h
GR55XX System API.
ans_c_evt_t::evt_type
ans_c_evt_type_t evt_type
The ANS event type.
Definition: ans_c.h:189
ans_c_handles_t::ans_sup_new_alert_cat_handle
uint16_t ans_sup_new_alert_cat_handle
ANS Supported New Alert Category characteristic Value handle which has been got from peer.
Definition: ans_c.h:176
ans_c_evt_t::sup_new_alert_cat_ids
uint16_t sup_new_alert_cat_ids
Alert status received.
Definition: ans_c.h:192
ANS_C_EVT_UNREAD_ALERT_STA_NTF_SET_SUCCESS
@ ANS_C_EVT_UNREAD_ALERT_STA_NTF_SET_SUCCESS
ANS Client has set Unread Alert Status notification.
Definition: ans_c.h:134
ans_c_handles_t::ans_unread_alert_handle
uint16_t ans_unread_alert_handle
ANS Unread Alert characteristic Value handle which has been got from peer.
Definition: ans_c.h:180
ANS_C_CTRL_PT_EN_UNREAD_CAT_STA_NTF
@ ANS_C_CTRL_PT_EN_UNREAD_CAT_STA_NTF
Enable Unread Category Status Notification.
Definition: ans_c.h:120
ans_c_unread_alert_notify_set
sdk_err_t ans_c_unread_alert_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer Unread Alert characteristic notify.
ans_c_handles_t::ans_sup_unread_alert_cat_handle
uint16_t ans_sup_unread_alert_cat_handle
ANS Supported Unread Alert Category characteristic Value handle which has been got from peer.
Definition: ans_c.h:179
ans_c_handles_t::ans_srvc_end_handle
uint16_t ans_srvc_end_handle
ANS Service end handle.
Definition: ans_c.h:175
ans_c_ctrl_pt_t
Alert Notification Service Client Control Point value.
Definition: ans_c.h:166
ANS_C_EVT_CTRL_POINT_SET_SUCCESS
@ ANS_C_EVT_CTRL_POINT_SET_SUCCESS
ANS Client has written Control Point completely.
Definition: ans_c.h:139
ANS_C_EVT_NEW_ALERT_NTF_SET_SUCCESS
@ ANS_C_EVT_NEW_ALERT_NTF_SET_SUCCESS
ANS Client has set NEW Alert notification.
Definition: ans_c.h:133
AANS_C_CAT_ID_NB
@ AANS_C_CAT_ID_NB
Number of all Categories of alerts/messages.
Definition: ans_c.h:112
ans_c_unread_alert_t
Alert Notification Service Client decoded Unread Alert Status value.
Definition: ans_c.h:159
ANS_C_CTRL_PT_EN_NEW_INC_ALERT_NTF
@ ANS_C_CTRL_PT_EN_NEW_INC_ALERT_NTF
Enable New Incoming Alert Notification.
Definition: ans_c.h:119
ANS_C_CAT_ID_SCHEDULE
@ ANS_C_CAT_ID_SCHEDULE
Schedule: Alert occurred on calendar, planner.
Definition: ans_c.h:109
ans_c_evt_t::conn_idx
uint8_t conn_idx
The index of the connection.
Definition: ans_c.h:188
ANS_C_CAT_ID_MISSED_CALL
@ ANS_C_CAT_ID_MISSED_CALL
Missed call: Missed Call.
Definition: ans_c.h:106
ans_c_handles_t::ans_new_alert_handle
uint16_t ans_new_alert_handle
ANS New Alert characteristic Value handle which has been got from peer.
Definition: ans_c.h:177
ANS_C_CAT_ID_CALL
@ ANS_C_CAT_ID_CALL
Call: Incoming call.
Definition: ans_c.h:105
ANS_C_CAT_ID_SMPL_ALERT
@ ANS_C_CAT_ID_SMPL_ALERT
Simple Alert: General text alert or non-text alert.
Definition: ans_c.h:102
ans_c_sup_new_alert_cat_read
sdk_err_t ans_c_sup_new_alert_cat_read(uint8_t conn_idx)
Read Supported New Alert Category characteristic value.
ans_c_handles_t::ans_srvc_start_handle
uint16_t ans_srvc_start_handle
ANS Service start handle.
Definition: ans_c.h:174
ans_client_init
sdk_err_t ans_client_init(ans_c_evt_handler_t evt_handler)
Register ANS Client event handler.
ans_c_new_alert_t::cat_id
ans_c_alert_cat_id_t cat_id
Category ID.
Definition: ans_c.h:151
ble_prf_types.h
Profile/Service Common Types.
ans_c_evt_t::sup_unread_alert_cat_ids
uint16_t sup_unread_alert_cat_ids
Ringer setting received.
Definition: ans_c.h:193
sdk_err_t
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243
ANS_C_CAT_ID_HG_PRIO_ALERT
@ ANS_C_CAT_ID_HG_PRIO_ALERT
High Prioritized Alert: Alert that should be handled as high priority.
Definition: ans_c.h:110
ans_c_evt_handler_t
void(* ans_c_evt_handler_t)(ans_c_evt_t *p_evt)
Alert Notification Service Client event handler type.
Definition: ans_c.h:205
ans_c_handles_t::ans_unread_alert_cccd_handle
uint16_t ans_unread_alert_cccd_handle
ANS CCCD handle of Unread Alert characteristic which has been got from peer.
Definition: ans_c.h:181
ans_c_sup_unread_alert_cat_read
sdk_err_t ans_c_sup_unread_alert_cat_read(uint8_t conn_idx)
Read Supported Unread Alert Category characteristic value.
ans_c_handles_t
Handles on the connected peer device needed to interact with it.
Definition: ans_c.h:173
ANS_C_EVT_SUP_NEW_ALERT_CAT_RECEIV
@ ANS_C_EVT_SUP_NEW_ALERT_CAT_RECEIV
ANS Client has received Supported New Alert Category value (Read from peer).
Definition: ans_c.h:135
ans_c_unread_alert_t::cat_id
ans_c_alert_cat_id_t cat_id
Category ID.
Definition: ans_c.h:160
ANS_C_CTRL_PT_DIS_UNREAD_CAT_STA_NTF
@ ANS_C_CTRL_PT_DIS_UNREAD_CAT_STA_NTF
Disable Unread Category Status Notification.
Definition: ans_c.h:122
ans_c_evt_type_t
ans_c_evt_type_t
Alert Notification Service Client Event type.
Definition: ans_c.h:129
ans_c_disc_srvc_start
sdk_err_t ans_c_disc_srvc_start(uint8_t conn_idx)
Discover Alert Notification Service on peer.
ANS_C_CAT_ID_VOICE_MAIL
@ ANS_C_CAT_ID_VOICE_MAIL
Voice mail: Voice mail.
Definition: ans_c.h:108
ANS_C_CTRL_PT_NTF_UNREAD_CAT_STA_IMME
@ ANS_C_CTRL_PT_NTF_UNREAD_CAT_STA_IMME
Notify Unread Category Status immediately.
Definition: ans_c.h:124
ans_c_ctrl_point_set
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
@ ANS_C_EVT_NEW_ALERT_RECEIVE
ANS Client has received New Alert value (Notification from peer).
Definition: ans_c.h:137
ans_c_new_alert_t
Alert Notification Service Client decoded New Alert value.
Definition: ans_c.h:150
ans_c_unread_alert_t::unread_num
uint8_t unread_num
Number of unread alert.
Definition: ans_c.h:161
ANS_C_CAT_ID_NEWS
@ ANS_C_CAT_ID_NEWS
News: News feeds such as RSS, Atom.
Definition: ans_c.h:104
ans_c_evt_t::new_alert
ans_c_new_alert_t new_alert
New Alert value.
Definition: ans_c.h:194
ans_c_ctrl_pt_t::cmd_id
ans_c_ctrl_pt_id_t cmd_id
Command ID.
Definition: ans_c.h:167
ANS_C_UTF_8_STR_LEN_MAX
#define ANS_C_UTF_8_STR_LEN_MAX
Maximum length of “UTF-8 string”.
Definition: ans_c.h:73