The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Copyright (C) 1999-2012 Broadcom Corporation |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at: |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | * |
| 17 | ******************************************************************************/ |
| 18 | #ifndef SDP_API_H |
| 19 | #define SDP_API_H |
| 20 | |
| 21 | #include "bt_target.h" |
| 22 | #include "sdpdefs.h" |
| 23 | |
| 24 | /***************************************************************************** |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 25 | * Constants |
| 26 | ****************************************************************************/ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 27 | |
| 28 | /* Success code and error codes */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 29 | #define SDP_SUCCESS 0x0000 |
| 30 | #define SDP_INVALID_VERSION 0x0001 |
| 31 | #define SDP_INVALID_SERV_REC_HDL 0x0002 |
| 32 | #define SDP_INVALID_REQ_SYNTAX 0x0003 |
| 33 | #define SDP_INVALID_PDU_SIZE 0x0004 |
| 34 | #define SDP_INVALID_CONT_STATE 0x0005 |
| 35 | #define SDP_NO_RESOURCES 0x0006 |
| 36 | #define SDP_DI_REG_FAILED 0x0007 |
| 37 | #define SDP_DI_DISC_FAILED 0x0008 |
| 38 | #define SDP_NO_DI_RECORD_FOUND 0x0009 |
| 39 | #define SDP_ERR_ATTR_NOT_PRESENT 0x000A |
| 40 | #define SDP_ILLEGAL_PARAMETER 0x000B |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 41 | |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 42 | #define SDP_NO_RECS_MATCH 0xFFF0 |
| 43 | #define SDP_CONN_FAILED 0xFFF1 |
| 44 | #define SDP_CFG_FAILED 0xFFF2 |
| 45 | #define SDP_GENERIC_ERROR 0xFFF3 |
| 46 | #define SDP_DB_FULL 0xFFF4 |
| 47 | #define SDP_INVALID_PDU 0xFFF5 |
| 48 | #define SDP_SECURITY_ERR 0xFFF6 |
| 49 | #define SDP_CONN_REJECTED 0xFFF7 |
| 50 | #define SDP_CANCEL 0xFFF8 |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 51 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 52 | /* Define the PSM that SDP uses */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 53 | #define SDP_PSM 0x0001 |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 54 | |
| 55 | /* Legacy #define to avoid code changes - SDP UUID is same as BT UUID */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 56 | #define tSDP_UUID tBT_UUID |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 57 | |
| 58 | /* Masks for attr_value field of tSDP_DISC_ATTR */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 59 | #define SDP_DISC_ATTR_LEN_MASK 0x0FFF |
| 60 | #define SDP_DISC_ATTR_TYPE(len_type) ((len_type) >> 12) |
| 61 | #define SDP_DISC_ATTR_LEN(len_type) ((len_type)&SDP_DISC_ATTR_LEN_MASK) |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 62 | |
| 63 | /* Maximum number of protocol list items (list_elem in tSDP_PROTOCOL_ELEM) */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 64 | #define SDP_MAX_LIST_ELEMS 3 |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 65 | |
| 66 | /***************************************************************************** |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 67 | * Type Definitions |
| 68 | ****************************************************************************/ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 69 | |
| 70 | /* Define a callback function for when discovery is complete. */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 71 | typedef void(tSDP_DISC_CMPL_CB)(uint16_t result); |
| 72 | typedef void(tSDP_DISC_CMPL_CB2)(uint16_t result, void* user_data); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 73 | |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 74 | typedef struct { |
Jakub Pawlowski | a484a88 | 2017-06-24 17:30:18 -0700 | [diff] [blame^] | 75 | RawAddress peer_addr; |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 76 | uint16_t peer_mtu; |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 77 | } tSDP_DR_OPEN; |
| 78 | |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 79 | typedef struct { |
| 80 | uint8_t* p_data; |
| 81 | uint16_t data_len; |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 82 | } tSDP_DR_DATA; |
| 83 | |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 84 | typedef union { |
| 85 | tSDP_DR_OPEN open; |
| 86 | tSDP_DR_DATA data; |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 87 | } tSDP_DATA; |
| 88 | |
| 89 | /* Define a callback function for when discovery result is received. */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 90 | typedef void(tSDP_DISC_RES_CB)(uint16_t event, tSDP_DATA* p_data); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 91 | |
| 92 | /* Define a structure to hold the discovered service information. */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 93 | typedef struct { |
| 94 | union { |
| 95 | uint8_t u8; /* 8-bit integer */ |
| 96 | uint16_t u16; /* 16-bit integer */ |
| 97 | uint32_t u32; /* 32-bit integer */ |
| 98 | uint8_t array[4]; /* Variable length field */ |
| 99 | struct t_sdp_disc_attr* p_sub_attr; /* Addr of first sub-attr (list)*/ |
| 100 | } v; |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 101 | |
| 102 | } tSDP_DISC_ATVAL; |
| 103 | |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 104 | typedef struct t_sdp_disc_attr { |
| 105 | struct t_sdp_disc_attr* p_next_attr; /* Addr of next linked attr */ |
| 106 | uint16_t attr_id; /* Attribute ID */ |
| 107 | uint16_t attr_len_type; /* Length and type fields */ |
| 108 | tSDP_DISC_ATVAL attr_value; /* Variable length entry data */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 109 | } tSDP_DISC_ATTR; |
| 110 | |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 111 | typedef struct t_sdp_disc_rec { |
| 112 | tSDP_DISC_ATTR* p_first_attr; /* First attribute of record */ |
| 113 | struct t_sdp_disc_rec* p_next_rec; /* Addr of next linked record */ |
| 114 | uint32_t time_read; /* The time the record was read */ |
Jakub Pawlowski | a484a88 | 2017-06-24 17:30:18 -0700 | [diff] [blame^] | 115 | RawAddress remote_bd_addr; /* Remote BD address */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 116 | } tSDP_DISC_REC; |
| 117 | |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 118 | typedef struct { |
| 119 | uint32_t mem_size; /* Memory size of the DB */ |
| 120 | uint32_t mem_free; /* Memory still available */ |
| 121 | tSDP_DISC_REC* p_first_rec; /* Addr of first record in DB */ |
| 122 | uint16_t num_uuid_filters; /* Number of UUIds to filter */ |
| 123 | tSDP_UUID uuid_filters[SDP_MAX_UUID_FILTERS]; /* UUIDs to filter */ |
| 124 | uint16_t num_attr_filters; /* Number of attribute filters */ |
| 125 | uint16_t attr_filters[SDP_MAX_ATTR_FILTERS]; /* Attributes to filter */ |
| 126 | uint8_t* p_free_mem; /* Pointer to free memory */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 127 | #if (SDP_RAW_DATA_INCLUDED == TRUE) |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 128 | uint8_t* |
| 129 | raw_data; /* Received record from server. allocated/released by client */ |
| 130 | uint32_t raw_size; /* size of raw_data */ |
| 131 | uint32_t raw_used; /* length of raw_data used */ |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 132 | #endif |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 133 | } tSDP_DISCOVERY_DB; |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 134 | |
| 135 | /* This structure is used to add protocol lists and find protocol elements */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 136 | typedef struct { |
| 137 | uint16_t protocol_uuid; |
| 138 | uint16_t num_params; |
| 139 | uint16_t params[SDP_MAX_PROTOCOL_PARAMS]; |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 140 | } tSDP_PROTOCOL_ELEM; |
| 141 | |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 142 | typedef struct { |
| 143 | uint16_t num_elems; |
| 144 | tSDP_PROTOCOL_ELEM list_elem[SDP_MAX_LIST_ELEMS]; |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 145 | } tSDP_PROTO_LIST_ELEM; |
| 146 | |
| 147 | /* Device Identification (DI) data structure |
| 148 | */ |
| 149 | /* Used to set the DI record */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 150 | typedef struct t_sdp_di_record { |
| 151 | uint16_t vendor; |
| 152 | uint16_t vendor_id_source; |
| 153 | uint16_t product; |
| 154 | uint16_t version; |
| 155 | bool primary_record; |
| 156 | char client_executable_url[SDP_MAX_ATTR_LEN]; /* optional */ |
| 157 | char service_description[SDP_MAX_ATTR_LEN]; /* optional */ |
| 158 | char documentation_url[SDP_MAX_ATTR_LEN]; /* optional */ |
| 159 | } tSDP_DI_RECORD; |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 160 | |
| 161 | /* Used to get the DI record */ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 162 | typedef struct t_sdp_di_get_record { |
| 163 | uint16_t spec_id; |
| 164 | tSDP_DI_RECORD rec; |
| 165 | } tSDP_DI_GET_RECORD; |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 166 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 167 | /* API into the SDP layer for service discovery. */ |
| 168 | |
| 169 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 170 | * |
| 171 | * Function SDP_InitDiscoveryDb |
| 172 | * |
| 173 | * Description This function is called to initialize a discovery database. |
| 174 | * |
| 175 | * Returns true if successful, false if one or more parameters are bad |
| 176 | * |
| 177 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 178 | bool SDP_InitDiscoveryDb(tSDP_DISCOVERY_DB* p_db, uint32_t len, |
| 179 | uint16_t num_uuid, tSDP_UUID* p_uuid_list, |
| 180 | uint16_t num_attr, uint16_t* p_attr_list); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 181 | |
| 182 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 183 | * |
| 184 | * Function SDP_CancelServiceSearch |
| 185 | * |
| 186 | * Description This function cancels an active query to an SDP server. |
| 187 | * |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 188 | * Returns true if discovery cancelled, false if a matching activity is |
| 189 | * not found. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 190 | * |
| 191 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 192 | bool SDP_CancelServiceSearch(tSDP_DISCOVERY_DB* p_db); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 193 | |
| 194 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 195 | * |
| 196 | * Function SDP_ServiceSearchRequest |
| 197 | * |
| 198 | * Description This function queries an SDP server for information. |
| 199 | * |
| 200 | * Returns true if discovery started, false if failed. |
| 201 | * |
| 202 | ******************************************************************************/ |
Jakub Pawlowski | a484a88 | 2017-06-24 17:30:18 -0700 | [diff] [blame^] | 203 | bool SDP_ServiceSearchRequest(const RawAddress& p_bd_addr, |
Jakub Pawlowski | 135b7f6 | 2017-06-16 10:00:46 -0700 | [diff] [blame] | 204 | tSDP_DISCOVERY_DB* p_db, tSDP_DISC_CMPL_CB* p_cb); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 205 | |
| 206 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 207 | * |
| 208 | * Function SDP_ServiceSearchAttributeRequest |
| 209 | * |
| 210 | * Description This function queries an SDP server for information. |
| 211 | * |
| 212 | * The difference between this API function and the function |
| 213 | * SDP_ServiceSearchRequest is that this one does a |
| 214 | * combined ServiceSearchAttributeRequest SDP function. |
| 215 | * |
| 216 | * Returns true if discovery started, false if failed. |
| 217 | * |
| 218 | ******************************************************************************/ |
Jakub Pawlowski | a484a88 | 2017-06-24 17:30:18 -0700 | [diff] [blame^] | 219 | bool SDP_ServiceSearchAttributeRequest(const RawAddress& p_bd_addr, |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 220 | tSDP_DISCOVERY_DB* p_db, |
| 221 | tSDP_DISC_CMPL_CB* p_cb); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 222 | |
| 223 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 224 | * |
| 225 | * Function SDP_ServiceSearchAttributeRequest2 |
| 226 | * |
| 227 | * Description This function queries an SDP server for information. |
| 228 | * |
| 229 | * The difference between this API function and the function |
| 230 | * SDP_ServiceSearchRequest is that this one does a |
| 231 | * combined ServiceSearchAttributeRequest SDP function with the |
| 232 | * user data piggyback |
| 233 | * |
| 234 | * Returns true if discovery started, false if failed. |
| 235 | * |
| 236 | ******************************************************************************/ |
Jakub Pawlowski | a484a88 | 2017-06-24 17:30:18 -0700 | [diff] [blame^] | 237 | bool SDP_ServiceSearchAttributeRequest2(const RawAddress& p_bd_addr, |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 238 | tSDP_DISCOVERY_DB* p_db, |
| 239 | tSDP_DISC_CMPL_CB2* p_cb, |
| 240 | void* user_data); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 241 | |
| 242 | /* API of utilities to find data in the local discovery database */ |
| 243 | |
| 244 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 245 | * |
| 246 | * Function SDP_FindAttributeInDb |
| 247 | * |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 248 | * Description This function queries an SDP database for a specific |
| 249 | * attribute. If the p_start_rec pointer is NULL, it looks from |
| 250 | * the beginning of the database, else it continues from the |
| 251 | * next record after p_start_rec. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 252 | * |
| 253 | * Returns Pointer to matching record, or NULL |
| 254 | * |
| 255 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 256 | tSDP_DISC_REC* SDP_FindAttributeInDb(tSDP_DISCOVERY_DB* p_db, uint16_t attr_id, |
| 257 | tSDP_DISC_REC* p_start_rec); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 258 | |
| 259 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 260 | * |
| 261 | * Function SDP_FindAttributeInRec |
| 262 | * |
| 263 | * Description This function searches an SDP discovery record for a |
| 264 | * specific attribute. |
| 265 | * |
| 266 | * Returns Pointer to matching attribute entry, or NULL |
| 267 | * |
| 268 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 269 | tSDP_DISC_ATTR* SDP_FindAttributeInRec(tSDP_DISC_REC* p_rec, uint16_t attr_id); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 270 | |
| 271 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 272 | * |
| 273 | * Function SDP_FindServiceInDb |
| 274 | * |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 275 | * Description This function queries an SDP database for a specific |
| 276 | * service. If the p_start_rec pointer is NULL, it looks from |
| 277 | * the beginning of the database, else it continues from the |
| 278 | * next record after p_start_rec. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 279 | * |
| 280 | * Returns Pointer to record containing service class, or NULL |
| 281 | * |
| 282 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 283 | tSDP_DISC_REC* SDP_FindServiceInDb(tSDP_DISCOVERY_DB* p_db, |
| 284 | uint16_t service_uuid, |
| 285 | tSDP_DISC_REC* p_start_rec); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 286 | |
| 287 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 288 | * |
| 289 | * Function SDP_FindServiceUUIDInDb |
| 290 | * |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 291 | * Description This function queries an SDP database for a specific |
| 292 | * service. If the p_start_rec pointer is NULL, it looks from |
| 293 | * the beginning of the database, else it continues from the |
| 294 | * next record after p_start_rec. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 295 | * |
| 296 | * NOTE the only difference between this function and the previous |
| 297 | * function "SDP_FindServiceInDb()" is that this function takes |
| 298 | * a tBT_UUID input. |
| 299 | * |
| 300 | * Returns Pointer to record containing service class, or NULL |
| 301 | * |
| 302 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 303 | tSDP_DISC_REC* SDP_FindServiceUUIDInDb(tSDP_DISCOVERY_DB* p_db, |
| 304 | tBT_UUID* p_uuid, |
| 305 | tSDP_DISC_REC* p_start_rec); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 306 | |
| 307 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 308 | * |
| 309 | * Function SDP_FindServiceUUIDInRec_128bit |
| 310 | * |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 311 | * Description Read the 128-bit service UUID within a record, |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 312 | * if there is any. |
| 313 | * |
| 314 | * Parameters: p_rec - pointer to a SDP record. |
| 315 | * p_uuid - output parameter to save the UUID found. |
| 316 | * |
| 317 | * Returns true if found, otherwise false. |
| 318 | * |
| 319 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 320 | bool SDP_FindServiceUUIDInRec_128bit(tSDP_DISC_REC* p_rec, tBT_UUID* p_uuid); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 321 | |
| 322 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 323 | * |
| 324 | * Function SDP_FindServiceInDb_128bit |
| 325 | * |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 326 | * Description Query an SDP database for a specific service. |
| 327 | * If the p_start_rec pointer is NULL, look from the beginning |
| 328 | * of the database, else continue from the next record after |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 329 | * p_start_rec. |
| 330 | * |
| 331 | * Returns Pointer to record containing service class, or NULL |
| 332 | * |
| 333 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 334 | tSDP_DISC_REC* SDP_FindServiceInDb_128bit(tSDP_DISCOVERY_DB* p_db, |
| 335 | tSDP_DISC_REC* p_start_rec); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 336 | |
| 337 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 338 | * |
| 339 | * Function SDP_FindProtocolListElemInRec |
| 340 | * |
| 341 | * Description This function looks at a specific discovery record for a |
| 342 | * protocol list element. |
| 343 | * |
| 344 | * Returns true if found, false if not |
| 345 | * If found, the passed protocol list element is filled in. |
| 346 | * |
| 347 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 348 | bool SDP_FindProtocolListElemInRec(tSDP_DISC_REC* p_rec, uint16_t layer_uuid, |
| 349 | tSDP_PROTOCOL_ELEM* p_elem); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 350 | |
| 351 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 352 | * |
| 353 | * Function SDP_FindAddProtoListsElemInRec |
| 354 | * |
| 355 | * Description This function looks at a specific discovery record for a |
| 356 | * protocol list element. |
| 357 | * |
| 358 | * Returns true if found, false if not |
| 359 | * If found, the passed protocol list element is filled in. |
| 360 | * |
| 361 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 362 | bool SDP_FindAddProtoListsElemInRec(tSDP_DISC_REC* p_rec, uint16_t layer_uuid, |
| 363 | tSDP_PROTOCOL_ELEM* p_elem); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 364 | |
| 365 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 366 | * |
| 367 | * Function SDP_FindProfileVersionInRec |
| 368 | * |
| 369 | * Description This function looks at a specific discovery record for the |
| 370 | * Profile list descriptor, and pulls out the version number. |
| 371 | * The version number consists of an 8-bit major version and |
| 372 | * an 8-bit minor version. |
| 373 | * |
| 374 | * Returns true if found, false if not |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 375 | * If found, the major and minor version numbers that were |
| 376 | * passed in are filled in. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 377 | * |
| 378 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 379 | bool SDP_FindProfileVersionInRec(tSDP_DISC_REC* p_rec, uint16_t profile_uuid, |
| 380 | uint16_t* p_version); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 381 | |
| 382 | /* API into SDP for local service database updates */ |
| 383 | |
| 384 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 385 | * |
| 386 | * Function SDP_CreateRecord |
| 387 | * |
| 388 | * Description This function is called to create a record in the database. |
| 389 | * This would be through the SDP database maintenance API. The |
| 390 | * record is created empty, teh application should then call |
| 391 | * "add_attribute" to add the record's attributes. |
| 392 | * |
| 393 | * Returns Record handle if OK, else 0. |
| 394 | * |
| 395 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 396 | uint32_t SDP_CreateRecord(void); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 397 | |
| 398 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 399 | * |
| 400 | * Function SDP_DeleteRecord |
| 401 | * |
| 402 | * Description This function is called to add a record (or all records) |
| 403 | * from the database. This would be through the SDP database |
| 404 | * maintenance API. |
| 405 | * |
| 406 | * If a record handle of 0 is passed, all records are deleted. |
| 407 | * |
| 408 | * Returns true if succeeded, else false |
| 409 | * |
| 410 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 411 | bool SDP_DeleteRecord(uint32_t handle); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 412 | |
| 413 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 414 | * |
| 415 | * Function SDP_ReadRecord |
| 416 | * |
| 417 | * Description This function is called to get the raw data of the record |
| 418 | * with the given handle from the database. |
| 419 | * |
| 420 | * Returns -1, if the record is not found. |
| 421 | * Otherwise, the offset (0 or 1) to start of data in p_data. |
| 422 | * |
| 423 | * The size of data copied into p_data is in *p_data_len. |
| 424 | * |
| 425 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 426 | int32_t SDP_ReadRecord(uint32_t handle, uint8_t* p_data, int32_t* p_data_len); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 427 | |
| 428 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 429 | * |
| 430 | * Function SDP_AddAttribute |
| 431 | * |
| 432 | * Description This function is called to add an attribute to a record. |
| 433 | * This would be through the SDP database maintenance API. |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 434 | * If the attribute already exists in the record, it is |
| 435 | * replaced with the new value. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 436 | * |
| 437 | * NOTE Attribute values must be passed as a Big Endian stream. |
| 438 | * |
| 439 | * Returns true if added OK, else false |
| 440 | * |
| 441 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 442 | bool SDP_AddAttribute(uint32_t handle, uint16_t attr_id, uint8_t attr_type, |
| 443 | uint32_t attr_len, uint8_t* p_val); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 444 | |
| 445 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 446 | * |
| 447 | * Function SDP_AddSequence |
| 448 | * |
| 449 | * Description This function is called to add a sequence to a record. |
| 450 | * This would be through the SDP database maintenance API. |
| 451 | * If the sequence already exists in the record, it is replaced |
| 452 | * with the new sequence. |
| 453 | * |
| 454 | * NOTE Element values must be passed as a Big Endian stream. |
| 455 | * |
| 456 | * Returns true if added OK, else false |
| 457 | * |
| 458 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 459 | bool SDP_AddSequence(uint32_t handle, uint16_t attr_id, uint16_t num_elem, |
| 460 | uint8_t type[], uint8_t len[], uint8_t* p_val[]); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 461 | |
| 462 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 463 | * |
| 464 | * Function SDP_AddUuidSequence |
| 465 | * |
| 466 | * Description This function is called to add a UUID sequence to a record. |
| 467 | * This would be through the SDP database maintenance API. |
| 468 | * If the sequence already exists in the record, it is replaced |
| 469 | * with the new sequence. |
| 470 | * |
| 471 | * Returns true if added OK, else false |
| 472 | * |
| 473 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 474 | bool SDP_AddUuidSequence(uint32_t handle, uint16_t attr_id, uint16_t num_uuids, |
| 475 | uint16_t* p_uuids); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 476 | |
| 477 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 478 | * |
| 479 | * Function SDP_AddProtocolList |
| 480 | * |
| 481 | * Description This function is called to add a protocol descriptor list to |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 482 | * a record. This would be through the SDP database |
| 483 | * maintenance API. If the protocol list already exists in the |
| 484 | * record, it is replaced with the new list. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 485 | * |
| 486 | * Returns true if added OK, else false |
| 487 | * |
| 488 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 489 | bool SDP_AddProtocolList(uint32_t handle, uint16_t num_elem, |
| 490 | tSDP_PROTOCOL_ELEM* p_elem_list); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 491 | |
| 492 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 493 | * |
| 494 | * Function SDP_AddAdditionProtoLists |
| 495 | * |
| 496 | * Description This function is called to add a protocol descriptor list to |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 497 | * a record. This would be through the SDP database maintenance |
| 498 | * API. If the protocol list already exists in the record, it |
| 499 | * is replaced with the new list. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 500 | * |
| 501 | * Returns true if added OK, else false |
| 502 | * |
| 503 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 504 | bool SDP_AddAdditionProtoLists(uint32_t handle, uint16_t num_elem, |
| 505 | tSDP_PROTO_LIST_ELEM* p_proto_list); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 506 | |
| 507 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 508 | * |
| 509 | * Function SDP_AddProfileDescriptorList |
| 510 | * |
| 511 | * Description This function is called to add a profile descriptor list to |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 512 | * a record. This would be through the SDP database maintenance |
| 513 | * API. If the version already exists in the record, it is |
| 514 | * replaced with the new one. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 515 | * |
| 516 | * Returns true if added OK, else false |
| 517 | * |
| 518 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 519 | bool SDP_AddProfileDescriptorList(uint32_t handle, uint16_t profile_uuid, |
| 520 | uint16_t version); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 521 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 522 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 523 | * |
| 524 | * Function SDP_AddLanguageBaseAttrIDList |
| 525 | * |
| 526 | * Description This function is called to add a language base attr list to |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 527 | * a record. This would be through the SDP database maintenance |
| 528 | * API. If the version already exists in the record, it is |
| 529 | * replaced with the new one. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 530 | * |
| 531 | * Returns true if added OK, else false |
| 532 | * |
| 533 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 534 | bool SDP_AddLanguageBaseAttrIDList(uint32_t handle, uint16_t lang, |
| 535 | uint16_t char_enc, uint16_t base_id); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 536 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 537 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 538 | * |
| 539 | * Function SDP_AddServiceClassIdList |
| 540 | * |
| 541 | * Description This function is called to add a service list to a record. |
| 542 | * This would be through the SDP database maintenance API. |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 543 | * If the service list already exists in the record, it is |
| 544 | * replaced with the new list. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 545 | * |
| 546 | * Returns true if added OK, else false |
| 547 | * |
| 548 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 549 | bool SDP_AddServiceClassIdList(uint32_t handle, uint16_t num_services, |
| 550 | uint16_t* p_service_uuids); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 551 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 552 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 553 | * |
| 554 | * Function SDP_DeleteAttribute |
| 555 | * |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 556 | * Description Delete an attribute from a record. |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 557 | * This would be through the SDP database maintenance API. |
| 558 | * |
| 559 | * Returns true if deleted OK, else false if not found |
| 560 | * |
| 561 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 562 | bool SDP_DeleteAttribute(uint32_t handle, uint16_t attr_id); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 563 | |
| 564 | /* Device Identification APIs */ |
| 565 | |
| 566 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 567 | * |
| 568 | * Function SDP_SetLocalDiRecord |
| 569 | * |
| 570 | * Description This function adds a DI record to the local SDP database. |
| 571 | * |
| 572 | * Returns Returns SDP_SUCCESS if record added successfully, else error |
| 573 | * |
| 574 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 575 | uint16_t SDP_SetLocalDiRecord(tSDP_DI_RECORD* device_info, uint32_t* p_handle); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 576 | |
| 577 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 578 | * |
| 579 | * Function SDP_DiDiscover |
| 580 | * |
| 581 | * Description This function queries a remote device for DI information. |
| 582 | * |
| 583 | * Returns SDP_SUCCESS if query started successfully, else error |
| 584 | * |
| 585 | ******************************************************************************/ |
Jakub Pawlowski | a484a88 | 2017-06-24 17:30:18 -0700 | [diff] [blame^] | 586 | uint16_t SDP_DiDiscover(const RawAddress& remote_device, |
Jakub Pawlowski | 135b7f6 | 2017-06-16 10:00:46 -0700 | [diff] [blame] | 587 | tSDP_DISCOVERY_DB* p_db, uint32_t len, |
| 588 | tSDP_DISC_CMPL_CB* p_cb); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 589 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 590 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 591 | * |
| 592 | * Function SDP_GetNumDiRecords |
| 593 | * |
| 594 | * Description Searches specified database for DI records |
| 595 | * |
| 596 | * Returns number of DI records found |
| 597 | * |
| 598 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 599 | uint8_t SDP_GetNumDiRecords(tSDP_DISCOVERY_DB* p_db); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 600 | |
| 601 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 602 | * |
| 603 | * Function SDP_GetDiRecord |
| 604 | * |
| 605 | * Description This function retrieves a remote device's DI record from |
| 606 | * the specified database. |
| 607 | * |
| 608 | * Returns SDP_SUCCESS if record retrieved, else error |
| 609 | * |
| 610 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 611 | uint16_t SDP_GetDiRecord(uint8_t getRecordIndex, |
| 612 | tSDP_DI_GET_RECORD* device_info, |
| 613 | tSDP_DISCOVERY_DB* p_db); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 614 | |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 615 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 616 | * |
| 617 | * Function SDP_SetTraceLevel |
| 618 | * |
| 619 | * Description This function sets the trace level for SDP. If called with |
| 620 | * a value of 0xFF, it simply reads the current trace level. |
| 621 | * |
| 622 | * Returns the new (current) trace level |
| 623 | * |
| 624 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 625 | uint8_t SDP_SetTraceLevel(uint8_t new_level); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 626 | |
| 627 | /******************************************************************************* |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 628 | * |
| 629 | * Function SDP_FindServiceUUIDInRec |
| 630 | * |
Myles Watson | 9ca0709 | 2016-11-28 16:41:53 -0800 | [diff] [blame] | 631 | * Description Read the service UUID within a record, |
Myles Watson | ee96a3c | 2016-11-23 14:49:54 -0800 | [diff] [blame] | 632 | * if there is any. |
| 633 | * |
| 634 | * Parameters: p_rec - pointer to a SDP record. |
| 635 | * |
| 636 | * Returns true if found, otherwise false. |
| 637 | * |
| 638 | ******************************************************************************/ |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 639 | bool SDP_FindServiceUUIDInRec(tSDP_DISC_REC* p_rec, tBT_UUID* p_uuid); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 640 | |
Pavlin Radoslavov | b2a292b | 2016-10-14 19:34:48 -0700 | [diff] [blame] | 641 | // Converts UUID-16 to UUID-128 by including the base UUID. |
| 642 | // |uuid16| is the 2-byte UUID to convert. |
| 643 | // The result with the expanded 128-bit UUID is stored in |p_uuid128|. |
| 644 | void sdpu_uuid16_to_uuid128(uint16_t uuid16, uint8_t* p_uuid128); |
| 645 | |
Myles Watson | 911d1ae | 2016-11-28 16:44:40 -0800 | [diff] [blame] | 646 | #endif /* SDP_API_H */ |