Cordio Stack and Cordio Profiles  r2p3-02rel0
paspc_api.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Phone Alert Status profile client.
6  *
7  * Copyright (c) 2011-2018 Arm Ltd. All Rights Reserved.
8  * Arm Ltd. confidential and proprietary.
9  *
10  * IMPORTANT. Your use of this file is governed by a Software License Agreement
11  * ("Agreement") that must be accepted in order to download or otherwise receive a
12  * copy of this file. You may not use or copy this file for any purpose other than
13  * as described in the Agreement. If you do not agree to all of the terms of the
14  * Agreement do not use this file and delete all copies in your possession or control;
15  * if you do not have a copy of the Agreement, you must contact Arm Ltd. prior
16  * to any use, copying or further distribution of this software.
17  */
18 /*************************************************************************************************/
19 #ifndef PASPC_API_H
20 #define PASPC_API_H
21 
22 #include "att_api.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /*! \addtogroup PHONE_ALERT_STATUS_PROFILE
29  * \{ */
30 
31 /**************************************************************************************************
32  Macros
33 **************************************************************************************************/
34 
35 /*! \brief Phone Alert Status service enumeration of handle indexes of characteristics to be discovered */
36 enum
37 {
38  PASPC_PASS_AS_HDL_IDX, /*!< \brief Alert status */
39  PASPC_PASS_AS_CCC_HDL_IDX, /*!< \brief Alert status CCC descriptor */
40  PASPC_PASS_RS_HDL_IDX, /*!< \brief Ringer setting */
41  PASPC_PASS_RS_CCC_HDL_IDX, /*!< \brief Ringer setting CCC descriptor */
42  PASPC_PASS_RCP_HDL_IDX, /*!< \brief Ringer control point */
43  PASPC_PASS_HDL_LIST_LEN /*!< \brief Handle list length */
44 };
45 
46 /**************************************************************************************************
47  Function Declarations
48 **************************************************************************************************/
49 
50 /*************************************************************************************************/
51 /*!
52  * \brief Perform service and characteristic discovery for Phone Alert Status service.
53  * Parameter pHdlList must point to an array of length \ref PASPC_PASS_HDL_LIST_LEN.
54  * If discovery is successful the handles of discovered characteristics and
55  * descriptors will be set in pHdlList.
56  *
57  * \param connId Connection identifier.
58  * \param pHdlList Characteristic handle list.
59  *
60  * \return None.
61  */
62 /*************************************************************************************************/
63 void PaspcPassDiscover(dmConnId_t connId, uint16_t *pHdlList);
64 
65 /*************************************************************************************************/
66 /*!
67  * \brief Send a command to the ringer control point.
68  *
69  * \param connId Connection identifier.
70  * \param handle Attribute handle.
71  * \param command Control point command.
72  *
73  * \return None.
74  */
75 /*************************************************************************************************/
76 void PaspcPassControl(dmConnId_t connId, uint16_t handle, uint8_t command);
77 
78 /*************************************************************************************************/
79 /*!
80  * \brief Process a value received in an ATT read response, notification, or indication
81  * message. Parameter pHdlList must point to an array of length \ref PASPC_PASS_HDL_LIST_LEN.
82  * If the attribute handle of the message matches a handle in the handle list the value
83  * is processed, otherwise it is ignored.
84  *
85  * \param pHdlList Characteristic handle list.
86  * \param pMsg ATT callback message.
87  *
88  * \return \ref ATT_SUCCESS if handle is found, \ref ATT_ERR_NOT_FOUND otherwise.
89  */
90 /*************************************************************************************************/
92 
93 /*! \} */ /* PHONE_ALERT_STATUS_PROFILE */
94 
95 #ifdef __cplusplus
96 };
97 #endif
98 
99 #endif /* PASPC_API_H */
Alert status.
Definition: paspc_api.h:38
uint8_t dmConnId_t
Connection identifier.
Definition: dm_api.h:501
ATT callback event.
Definition: att_api.h:154
void PaspcPassDiscover(dmConnId_t connId, uint16_t *pHdlList)
Perform service and characteristic discovery for Phone Alert Status service. Parameter pHdlList must ...
Alert status CCC descriptor.
Definition: paspc_api.h:39
uint8_t PaspcPassValueUpdate(uint16_t *pHdlList, attEvt_t *pMsg)
Process a value received in an ATT read response, notification, or indication message. Parameter pHdlList must point to an array of length PASPC_PASS_HDL_LIST_LEN. If the attribute handle of the message matches a handle in the handle list the value is processed, otherwise it is ignored.
Handle list length.
Definition: paspc_api.h:43
Ringer setting CCC descriptor.
Definition: paspc_api.h:41
void PaspcPassControl(dmConnId_t connId, uint16_t handle, uint8_t command)
Send a command to the ringer control point.
unsigned short uint16_t
Unsigned 16-bit value.
Definition: wsf_types.h:67
Ringer setting.
Definition: paspc_api.h:40
Attribute protocol client and server API.
Ringer control point.
Definition: paspc_api.h:42
unsigned char uint8_t
Unsigned 8-bit value.
Definition: wsf_types.h:63