ancs_c.h File Reference

Apple Notification Center Service API. More...

#include "gr_includes.h"
#include "ble_prf_types.h"
#include "custom_config.h"
#include <stdint.h>
+ Include dependency graph for ancs_c.h:

Go to the source code of this file.

Classes

struct  ancs_c_att_handles_t
 ancs handle structure. More...
 
struct  ancs_c_evt_t
 ANCS Client event. More...
 

Macros

#define ANCS_C_CONNECTION_MAX   10
 Maximum number of ANCS Client connections. More...
 
#define ANCS_SRVC_UUID
 UUID of Apple notification center service. More...
 
#define ANCS_NTF_SOURCE_UUID
 UUID of notification source. More...
 
#define ANCS_CONTROL_POINT_UUID
 UUID of control point. More...
 
#define ANCS_DATA_SOURCE_UUID
 UUID of data source. More...
 

Typedefs

typedef void(* ancs_c_evt_handler_t) (ancs_c_evt_t *p_evt)
 Apple Notification Center Service event handler type. More...
 

Enumerations

enum  ble_ancs_c_evt_type_t {
  BLE_ANCS_C_EVT_INVALID, BLE_ANCS_C_EVT_DISCOVERY_CPLT, BLE_ANCS_C_EVT_DISCOVERY_FAILED, BLE_ANCS_C_EVT_NTF_SOURCE_NTF_ENABLED,
  BLE_ANCS_C_EVT_DATA_SOURCE_NTF_ENABLED, BLE_ANCS_C_EVT_NTF_SOURCE_RECEIVE, BLE_ANCS_C_EVT_DATA_SOURCE_RECEIVE, BLE_ANCS_C_EVT_WRITE_OP_ERR
}
 Event types that are passed from client to application on an event. More...
 

Functions

sdk_err_t ancs_c_client_init (ancs_c_evt_handler_t evt_handler)
 Initialize ANCS structure of handle. More...
 
sdk_err_t ancs_c_discovery_service (uint8_t conn_idx)
 To access phone's all services about ANCS. More...
 
sdk_err_t ancs_c_ntf_source_notify_set (uint8_t conn_idx, bool is_enable)
 enable ancs notification source CCCD. More...
 
sdk_err_t ancs_c_data_source_notify_set (uint8_t conn_idx, bool is_enable)
 enable ancs data source CCCD. More...
 
sdk_err_t ancs_c_write_control_point (uint8_t conn_idx, uint8_t *p_data, uint16_t length)
 This function implements writing commands to control points. More...
 

Detailed Description

Apple Notification Center Service API.

Attention
Copyright (c) 2019 GOODIX

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 ancs_c.h.