Use one type for UUID (1/5)
Currently, we have few different representations for UUID in stack:
tBT_UUID, tSDP_UUID, bt_uuid_t, bluetooth:UUID, or uint8_t*.
Additionally, tBT_UUID and bt_uuid_t are used to hold UUID as 128bit
as Little Endian or Big Endian, depending on which part of stack (GATT
or SDP) is using it.
This patch is creating one type, bluetooth::Uuid, that will replace all
other types.
Bug: 66912853
Test: all sl4a tests for GATT and RFCOMM
Merged-In: Ia42d3233146db0488728ed6f878f99b368fe8838
Change-Id: Ia42d3233146db0488728ed6f878f99b368fe8838
diff --git a/bta/include/bta_api.h b/bta/include/bta_api.h
index 814038c..c5f0512 100644
--- a/bta/include/bta_api.h
+++ b/bta/include/bta_api.h
@@ -143,7 +143,7 @@
typedef struct {
tBTA_SERVICE_MASK srvc_mask;
uint8_t num_uuid;
- tBT_UUID* p_uuid;
+ bluetooth::Uuid* p_uuid;
} tBTA_SERVICE_MASK_EXT;
/* Security Setting Mask */
@@ -762,7 +762,7 @@
uint32_t raw_data_size; /* size of raw data */
tBT_DEVICE_TYPE device_type; /* device type in case it is BLE device */
uint32_t num_uuids;
- uint8_t* p_uuid_list;
+ bluetooth::Uuid* p_uuid_list;
tBTA_STATUS result;
} tBTA_DM_DISC_RES;
@@ -770,7 +770,7 @@
typedef struct {
RawAddress bd_addr; /* BD address peer device. */
BD_NAME bd_name; /* Name of peer device. */
- tBT_UUID service; /* GATT based Services UUID found on peer device. */
+ bluetooth::Uuid service; /* GATT based Services UUID found on peer device. */
} tBTA_DM_DISC_BLE_RES;
/* Union of all search callback structures */
@@ -1172,7 +1172,8 @@
* Returns void
*
******************************************************************************/
-extern void BTA_DmDiscoverUUID(const RawAddress& bd_addr, tSDP_UUID* uuid,
+extern void BTA_DmDiscoverUUID(const RawAddress& bd_addr,
+ const bluetooth::Uuid& uuid,
tBTA_DM_SEARCH_CBACK* p_cback, bool sdp_search);
/*******************************************************************************