Classes | Macros | Enumerations | Functions
ancs_protocol.h File Reference

Apple Notification Center Service Protocol API. More...

`#include "gr_includes.h"`
`#include <stdint.h>`

Go to the source code of this file.

## Classes
struct | ancs_ntf_flags_t
| notification flags that can be performed for iOS notifications. More...
struct | ntf_source_pdu_t
| iOS notification structure. More...

## Macros
#define | CFG_ANCS_ATTRIBUTE_MAXLEN 500
#define | ANCS_ATTR(ID) ((uint32_t) 0x80000000 | ((uint8_t) ID))
#define | ANCS_ATTR_MAXLEN(ID, LEN) ((uint32_t) 0x80000000 | ((uint8_t) ID) | ((uint16_t) LEN << 8))

## Enumerations
enum | ancs_notification_attr_t { ANCS_NOTIF_ATTR_ID_APP_IDENTIFIER = 0, ANCS_NOTIF_ATTR_ID_TITLE, ANCS_NOTIF_ATTR_ID_SUBTITLE, ANCS_NOTIF_ATTR_ID_MESSAGE, ANCS_NOTIF_ATTR_ID_MESSAGE_SIZE, ANCS_NOTIF_ATTR_ID_DATE, ANCS_NOTIF_ATTR_ID_POSITIVE_ACTION_LABEL, ANCS_NOTIF_ATTR_ID_NEGATIVE_ACTION_LABEL }
| IDs for iOS notification attributes. More...
enum | ancs_category_id_t { ANCS_CATEGORY_ID_OTHER, ANCS_CATEGORY_ID_INCOMING_CALL, ANCS_CATEGORY_ID_MISSED_CALL, ANCS_CATEGORY_ID_VOICE_MAIL, ANCS_CATEGORY_ID_SOCIAL, ANCS_CATEGORY_ID_SCHEDULE, ANCS_CATEGORY_ID_EMAIL, ANCS_CATEGORY_ID_NEWS, ANCS_CATEGORY_ID_HEALTH_AND_FITNESS, ANCS_CATEGORY_ID_BUSINESS_AND_FINANCE, ANCS_CATEGORY_ID_LOCATION, ANCS_CATEGORY_ID_ENTERTAINMENT }
| Category IDs for iOS notifications. More...
enum | ancs_evt_id_t { ANCS_EVENT_ID_NOTIFICATION_ADDED, ANCS_EVENT_ID_NOTIFICATION_MODIFIED, ANCS_EVENT_ID_NOTIFICATION_REMOVED }
| Event IDs for iOS notifications. More...
enum | ancs_c_action_id_t { ACTION_ID_POSITIVE = 0, ACTION_ID_NEGATIVE }
| ID for actions that can be performed for iOS notifications. More...
enum | ancs_c_ctrl_point_t { CTRL_POINT_GET_NTF_ATTRIBUTE = 0, CTRL_POINT_GET_APP_ATTRIBUTE, CTRL_POINT_PERFORM_NTF_ACTION }
| ctrl point command that can be performed for iOS notifications. More...

## Functions
void | ancs_notify_attr_get (int uid, char noti_attr)
| Get notification attribute. More...
void | ancs_action_perform (int uid, int action)
| ancs perform action More...
int | ancs_get_uid (void)
| get ancs phone call UID More...
void | ancs_decode_notification_source (uint8_t *p_data, uint16_t length)
| Decode notification source message. More...
void | ancs_decode_data_source (uint8_t *p_data, uint16_t length)
| Decode data source message. More...

## Detailed Description

Apple Notification Center Service Protocol 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_protocol.h.

## Macro Definition Documentation

## ◆ ANCS_ATTR

#define ANCS_ATTR | ( |  | ID | ) | ((uint32_t) 0x80000000 | ((uint8_t) ID))

Attribute ID element without maximum length

Definition at line 49 of file ancs_protocol.h.

## ◆ ANCS_ATTR_MAXLEN

#define ANCS_ATTR_MAXLEN | ( |  | ID,
|  |  | LEN
| ) |  | ((uint32_t) 0x80000000 | ((uint8_t) ID) | ((uint16_t) LEN << 8))

Attribute ID element with maximum length

Definition at line 52 of file ancs_protocol.h.

## ◆ CFG_ANCS_ATTRIBUTE_MAXLEN

#define CFG_ANCS_ATTRIBUTE_MAXLEN 500

Maximum allowed value for attribute length

Definition at line 45 of file ancs_protocol.h.