Cordio Stack and Cordio Profiles  r2p3-02rel0
svc_wdxs.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Wireless Data Exchange service implementation.
6  *
7  * Copyright (c) 2013-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 
20 #ifndef SVC_WDXS_H
21 #define SVC_WDXS_H
22 
23 #include "util/bstream.h"
24 #include "att_api.h"
25 #include "wdx_defs.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*! \addtogroup WIRELESS_DATA_EXCHANGE_SERVICE
32  * \{ */
33 
34 /**************************************************************************************************
35  Handle Ranges
36 **************************************************************************************************/
37 
38 /** \name Arm Ltd. Proprietary Service Handles
39  *
40  */
41 /**@{*/
42 #define WDXS_START_HDL 0x240 /*!< \brief Start handle. */
43 #define WDXS_END_HDL (WDXS_MAX_HDL - 1) /*!< \brief End handle. */
44 
45 /**************************************************************************************************
46  Handles
47 **************************************************************************************************/
48 
49 /*! \brief Proprietary Service Handles */
50 enum
51 {
52  WDXS_SVC_HDL = WDXS_START_HDL, /*!< \brief Proprietary Service Declaration */
53  WDXS_DC_CH_HDL, /*!< \brief WDX Device Configuration Characteristic Declaration */
54  WDXS_DC_HDL, /*!< \brief WDX Device Configuration Characteristic Value */
55  WDXS_DC_CH_CCC_HDL, /*!< \brief WDX Device Configuration CCCD */
56  WDXS_FTC_CH_HDL, /*!< \brief WDX File Transfer Control Characteristic Declaration */
57  WDXS_FTC_HDL, /*!< \brief WDX File Transfer Control Characteristic Value */
58  WDXS_FTC_CH_CCC_HDL, /*!< \brief WDX File Transfer Control CCCD */
59  WDXS_FTD_CH_HDL, /*!< \brief WDX File Transfer Data Characteristic Declaration */
60  WDXS_FTD_HDL, /*!< \brief WDX File Transfer Data Characteristic Value */
61  WDXS_FTD_CH_CCC_HDL, /*!< \brief WDX File Transfer Data CCCD */
62  WDXS_AU_CH_HDL, /*!< \brief WDX Authentication Characteristic Declaration */
63  WDXS_AU_HDL, /*!< \brief WDX Authentication Characteristic Value */
64  WDXS_AU_CH_CCC_HDL, /*!< \brief WDX Authentication CCCD */
65  WDXS_MAX_HDL /*!< \brief Maximum handle. */
66 };
67 /**@}*/
68 
69 /**************************************************************************************************
70  Global Declarations
71 **************************************************************************************************/
72 
73 extern const uint8_t wdxsDcUuid[ATT_128_UUID_LEN]; /*!< \brief WDX Device Configuration Characteristic */
74 extern const uint8_t wdxsFtcUuid[ATT_128_UUID_LEN]; /*!< \brief WDX File Transfer Control Characteristic */
75 extern const uint8_t wdxsFtdUuid[ATT_128_UUID_LEN]; /*!< \brief WDX File Transfer Data Characteristic */
76 extern const uint8_t wdxsAuUuid[ATT_128_UUID_LEN]; /*!< \brief WDX Authentication Characteristic */
77 
78 /**************************************************************************************************
79  Function Declarations
80 **************************************************************************************************/
81 
82 /*************************************************************************************************/
83 /*!
84  * \brief Add the services from the attribute server.
85  *
86  * \return None.
87  */
88 /*************************************************************************************************/
89 void SvcWdxsAddGroup(void);
90 
91 /*************************************************************************************************/
92 /*!
93  * \brief Remove the services from the attribute server.
94  *
95  * \return None.
96  */
97 /*************************************************************************************************/
98 void SvcWdxsRemoveGroup(void);
99 
100 /*************************************************************************************************/
101 /*!
102  * \brief Register a write callback functions for the ATT Group.
103  *
104  * \param writeCback Write callback function.
105  *
106  * \return None.
107  */
108 /*************************************************************************************************/
109 void SvcWdxsRegister(attsWriteCback_t writeCback);
110 
111 /*! \} */ /* WIRELESS_DATA_EXCHANGE_SERVICE */
112 
113 #ifdef __cplusplus
114 }
115 #endif
116 
117 #endif /* SVC_WDXS_H */
void SvcWdxsAddGroup(void)
Add the services from the attribute server.
WDX File Transfer Data Characteristic Declaration.
Definition: svc_wdxs.h:59
uint8_t(* attsWriteCback_t)(dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, uint16_t len, uint8_t *pValue, attsAttr_t *pAttr)
Attribute group write callback.
Definition: att_api.h:237
const uint8_t wdxsDcUuid[ATT_128_UUID_LEN]
WDX Device Configuration Characteristic.
WDX File Transfer Data CCCD.
Definition: svc_wdxs.h:61
WDX File Transfer Control Characteristic Value.
Definition: svc_wdxs.h:57
const uint8_t wdxsFtdUuid[ATT_128_UUID_LEN]
WDX File Transfer Data Characteristic.
WDX Authentication Characteristic Value.
Definition: svc_wdxs.h:63
WDX File Transfer Control Characteristic Declaration.
Definition: svc_wdxs.h:56
WDX Authentication Characteristic Declaration.
Definition: svc_wdxs.h:62
Maximum handle.
Definition: svc_wdxs.h:65
WDX File Transfer Data Characteristic Value.
Definition: svc_wdxs.h:60
const uint8_t wdxsFtcUuid[ATT_128_UUID_LEN]
WDX File Transfer Control Characteristic.
WDX File Transfer Control CCCD.
Definition: svc_wdxs.h:58
Wireless Data Exchange Protocol Definitions.
void SvcWdxsRemoveGroup(void)
Remove the services from the attribute server.
WDX Authentication CCCD.
Definition: svc_wdxs.h:64
WDX Device Configuration Characteristic Value.
Definition: svc_wdxs.h:54
Byte stream to integer conversion macros.
void SvcWdxsRegister(attsWriteCback_t writeCback)
Register a write callback functions for the ATT Group.
WDX Device Configuration CCCD.
Definition: svc_wdxs.h:55
WDX Device Configuration Characteristic Declaration.
Definition: svc_wdxs.h:53
Attribute protocol client and server API.
#define ATT_128_UUID_LEN
Length in bytes of a 128 bit UUID.
Definition: att_defs.h:229
Proprietary Service Declaration.
Definition: svc_wdxs.h:52
const uint8_t wdxsAuUuid[ATT_128_UUID_LEN]
WDX Authentication Characteristic.
unsigned char uint8_t
Unsigned 8-bit value.
Definition: wsf_types.h:63
#define WDXS_START_HDL
Start handle.
Definition: svc_wdxs.h:42