Alert Notification Service Client API. More...
#include "gr_includes.h"
#include "ble_prf_types.h"
#include "custom_config.h"
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Classes | |
struct | ans_c_new_alert_t |
Alert Notification Service Client decoded New Alert value. More... | |
struct | ans_c_unread_alert_t |
Alert Notification Service Client decoded Unread Alert Status value. More... | |
struct | ans_c_ctrl_pt_t |
Alert Notification Service Client Control Point value. More... | |
struct | ans_c_handles_t |
Handles on the connected peer device needed to interact with it. More... | |
struct | ans_c_evt_t |
Alert Notification Service Client event. More... | |
Macros | |
#define | ANS_C_CONNECTION_MAX 10 |
Maximum number of HRS Client connections. More... | |
#define | ANS_C_ERROR_CMD_NOT_SUP 0xa0 |
Command not supported. More... | |
#define | ANS_C_UTF_8_STR_LEN_MAX 18 |
Maximum length of “UTF-8 string”. More... | |
#define | ANS_C_ALERT_NTF_CTRL_PT_VAL_LEN 2 |
Length of Alert Notification Control Point value. More... | |
#define | ANS_C_SMPL_ALERT_SUP (0x01 << 0) |
Bit for Simple Alert Supported. More... | |
#define | ANS_C_EMAIL_SUP (0x01 << 1) |
Bit for Email Supported. More... | |
#define | ANS_C_NEWS_SUP (0x01 << 2) |
Bit for News Supported. More... | |
#define | ANS_C_CALL_SUP (0x01 << 3) |
Bit for Call Supported. More... | |
#define | ANS_C_MISSED_CALL_SUP (0x01 << 4) |
Bit for Missed Call Supported. More... | |
#define | ANS_C_SMS_MMS_SUP (0x01 << 5) |
Bit for SMS/MMS Supported. More... | |
#define | ANS_C_VOICE_MAIL_SUP (0x01 << 6) |
Bit for Voice Mail Supported. More... | |
#define | ANS_C_SCHEDULE_SUP (0x01 << 7) |
Bit for Schedule Supported. More... | |
#define | ANS_C_HG_PRIO_ALERT_SUP (0x01 << 8) |
Bit for High Prioritized Alert Supported. More... | |
#define | ANS_C_INSTANT_MES (0x01 << 9) |
Bit for Instant Message Supported. More... | |
#define | ANS_C_ALL_CAT_SUP (0x03ff) |
Bit for All Category Supported. More... | |
Typedefs | |
typedef void(* | ans_c_evt_handler_t) (ans_c_evt_t *p_evt) |
Alert Notification Service Client event handler type. More... | |
Functions | |
sdk_err_t | ans_client_init (ans_c_evt_handler_t evt_handler) |
Register ANS Client event handler. More... | |
sdk_err_t | ans_c_disc_srvc_start (uint8_t conn_idx) |
Discover Alert Notification Service on peer. More... | |
sdk_err_t | ans_c_new_alert_notify_set (uint8_t conn_idx, bool is_enable) |
Enable or disable peer New Alert characteristic notify. More... | |
sdk_err_t | ans_c_unread_alert_notify_set (uint8_t conn_idx, bool is_enable) |
Enable or disable peer Unread Alert characteristic notify. More... | |
sdk_err_t | ans_c_sup_new_alert_cat_read (uint8_t conn_idx) |
Read Supported New Alert Category characteristic value. More... | |
sdk_err_t | ans_c_sup_unread_alert_cat_read (uint8_t conn_idx) |
Read Supported Unread Alert Category characteristic value. More... | |
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. More... | |
Alert Notification Service Client API.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file ans_c.h.