void bta_dm_add_device(std::unique_ptr<tBTA_DM_API_ADD_DEVICE> msg) {
uint8_t* p_dc = NULL;
LinkKey* p_lc = NULL;
- uint32_t trusted_services_mask[BTM_SEC_SERVICE_ARRAY_SIZE];
-
- memset(trusted_services_mask, 0, sizeof(trusted_services_mask));
/* If not all zeros, the device class has been specified */
if (msg->dc_known) p_dc = (uint8_t*)msg->dc;
/*******************************************************************************
*
- * Function btm_sec_are_all_trusted
- *
- * Description This function is called check if all services are trusted
- *
- * Returns true if all are trusted, otherwise false
- *
- ******************************************************************************/
-bool btm_sec_are_all_trusted(uint32_t p_mask[]) {
- uint32_t trusted_inx;
- for (trusted_inx = 0; trusted_inx < BTM_SEC_SERVICE_ARRAY_SIZE;
- trusted_inx++) {
- if (p_mask[trusted_inx] != BTM_SEC_TRUST_ALL) return (false);
- }
-
- return (true);
-}
-
-/*******************************************************************************
- *
* Function btm_sec_find_first_serv
*
* Description Look for the first record in the service database
* L O C A L F U N C T I O N P R O T O T Y P E S *
******************************************************************************/
tBTM_SEC_SERV_REC* btm_sec_find_first_serv(bool is_originator, uint16_t psm);
-bool btm_sec_are_all_trusted(uint32_t p_mask[]);
tBTM_SEC_DEV_REC* btm_sec_find_dev_by_sec_state(uint8_t state);
#define BTM_SEC_PROTO_HID 6 /* HID */
#define BTM_SEC_PROTO_AVDT 7
-/* Determine the number of uint32_t's necessary for security services */
-#define BTM_SEC_ARRAY_BITS 32 /* Number of bits in each array element */
-#define BTM_SEC_SERVICE_ARRAY_SIZE \
- (((uint32_t)BTM_SEC_MAX_SERVICES / BTM_SEC_ARRAY_BITS) + \
- (((uint32_t)BTM_SEC_MAX_SERVICES % BTM_SEC_ARRAY_BITS) ? 1 : 0))
-
/* Security service definitions (BTM_SetSecurityLevel)
* Used for Authorization APIs
*/
* trusted services
******************************************************************************/
-#define BTM_SEC_TRUST_ALL 0xFFFFFFFF /* for each array element */
-
/****************************************
* Security Manager Callback Functions
****************************************/