static void bta_dm_set_eir (char *local_name);
#endif /* BTM_EIR_SERVER_INCLUDED */
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
static void bta_dm_eir_search_services( tBTM_INQ_RESULTS *p_result,
tBTA_SERVICE_MASK *p_services_to_search,
tBTA_SERVICE_MASK *p_services_found);
-#endif /* BTM_EIR_CLIENT_INCLUDED */
static void bta_dm_rssi_cback (tBTM_RSSI_RESULTS *p_result);
static void bta_dm_signal_strength_timer_cback (TIMER_LIST_ENT *p_tle);
/* if searching did not initiate to create link */
if(!bta_dm_search_cb.wait_disc )
{
-#if ( BTM_EIR_CLIENT_INCLUDED == TRUE )
/* if service searching is done with EIR, don't search next device */
if( bta_dm_search_cb.p_btm_inq_info )
-#endif
bta_dm_discover_next_device();
}
else
#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
bta_dm_search_cb.uuid_to_search = bta_dm_search_cb.num_uuid;
#endif
-#if ( BTM_EIR_CLIENT_INCLUDED == TRUE )
if ((bta_dm_search_cb.p_btm_inq_info != NULL) &&
bta_dm_search_cb.services != BTA_USER_SERVICE_MASK
&&(bta_dm_search_cb.sdp_search == FALSE))
/* if seaching with EIR is not completed */
if(bta_dm_search_cb.services_to_search)
-#endif
{
/* check whether connection already exists to the device
if connection exists, we don't have to wait for ACL
}
#endif
-#if ( BTM_EIR_CLIENT_INCLUDED == TRUE )
/*******************************************************************************
**
** Function bta_dm_eir_search_services
APPL_TRACE_ERROR("BTA EIR search result, services_to_search=0x%08X, services_found=0x%08X",
*p_services_to_search, *p_services_found);
}
-#endif
#if ( BTM_EIR_SERVER_INCLUDED == TRUE )&&(BTA_EIR_CANNED_UUID_LIST != TRUE)
/*******************************************************************************
static const LAP general_inq_lap = {0x9e,0x8b,0x33};
static const LAP limited_inq_lap = {0x9e,0x8b,0x00};
-#if (( BTM_EIR_CLIENT_INCLUDED == TRUE )||( BTM_EIR_SERVER_INCLUDED == TRUE ))
#ifndef BTM_EIR_UUID_LKUP_TBL
const UINT16 BTM_EIR_UUID_LKUP_TBL[BTM_EIR_MAX_SERVICES] =
{
UUID_SERVCLASS_HDP_SOURCE,
UUID_SERVCLASS_HDP_SINK
};
-#else
+#else // BTM_EIR_UUID_LKUP_TBL
/*
If customized UUID look-up table needs to be used,
the followings should be defined in bdroid_buildcfg.h.
*/
#if (BTM_EIR_MAX_SERVICES == 0)
const UINT16 BTM_EIR_UUID_LKUP_TBL[];
-#else
+#else // BTM_EIR_MAX_SERVICES
extern UINT16 BTM_EIR_UUID_LKUP_TBL[BTM_EIR_MAX_SERVICES];
-#endif
-#endif
-#endif /* BTM_EIR_UUID_LKUP_TBL*/
+#endif // BTM_EIR_MAX_SERVICES
+#endif // BTM_EIR_UUID_LKUP_TBL
/********************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
static tBTM_STATUS btm_set_inq_event_filter (UINT8 filter_cond_type, tBTM_INQ_FILT_COND *p_filt_cond);
static void btm_clr_inq_result_flt (void);
-#if ((BTM_EIR_SERVER_INCLUDED == TRUE)||(BTM_EIR_CLIENT_INCLUDED == TRUE))
static UINT8 btm_convert_uuid_to_eir_service( UINT16 uuid16 );
-#endif
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
static void btm_set_eir_uuid( UINT8 *p_eir, tBTM_INQ_RESULTS *p_results );
static UINT8 *btm_eir_get_uuid_list( UINT8 *p_eir, UINT8 uuid_size,
UINT8 *p_num_uuid, UINT8 *p_uuid_list_type );
static UINT16 btm_convert_uuid_to_uuid16( UINT8 *p_uuid, UINT8 uuid_size );
-#endif
/*******************************************************************************
**
if (!controller->supports_rssi_with_inquiry_results())
return (BTM_MODE_UNSUPPORTED);
}
-#if (( BTM_EIR_CLIENT_INCLUDED == TRUE )||( BTM_EIR_SERVER_INCLUDED == TRUE ))
else if (mode == BTM_INQ_RESULT_EXTENDED)
{
if (!controller->supports_extended_inquiry_response())
return (BTM_MODE_UNSUPPORTED);
}
-#endif
else
return (BTM_ILLEGAL_VALUE);
UINT8 rssi = 0;
DEV_CLASS dc;
UINT16 clock_offset;
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
UINT8 *p_eir_data = NULL;
-#endif
#if (BTM_INQ_DEBUG == TRUE)
BTM_TRACE_DEBUG ("btm_process_inq_results inq_active:0x%x state:%d inqfilt_active:%d",
if (is_new || update)
{
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
if( inq_res_mode == BTM_INQ_RESULT_EXTENDED )
{
memset( p_cur->eir_uuid, 0,
}
else
p_eir_data = NULL;
-#endif
/* If a callback is registered, call it with the results */
if (p_inq_results_cb)
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
(p_inq_results_cb)((tBTM_INQ_RESULTS *) p_cur, p_eir_data);
-#else
- (p_inq_results_cb)((tBTM_INQ_RESULTS *) p_cur, NULL);
-#endif
}
}
}
*******************************************************************************/
UINT8 *BTM_CheckEirData( UINT8 *p_eir, UINT8 type, UINT8 *p_length )
{
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
UINT8 *p = p_eir;
UINT8 length;
UINT8 eir_type;
*p_length = 0;
return NULL;
-#else
- return NULL;
-#endif
}
/*******************************************************************************
** BTM_EIR_MAX_SERVICES - if not found
**
*******************************************************************************/
-#if (( BTM_EIR_CLIENT_INCLUDED == TRUE )||( BTM_EIR_SERVER_INCLUDED == TRUE ))
static UINT8 btm_convert_uuid_to_eir_service( UINT16 uuid16 )
{
UINT8 xx;
}
return BTM_EIR_MAX_SERVICES;
}
-#endif
/*******************************************************************************
**
*******************************************************************************/
BOOLEAN BTM_HasEirService( UINT32 *p_eir_uuid, UINT16 uuid16 )
{
-#if ((BTM_EIR_SERVER_INCLUDED == TRUE)||(BTM_EIR_CLIENT_INCLUDED == TRUE))
UINT8 service_id;
service_id = btm_convert_uuid_to_eir_service(uuid16);
return( BTM_EIR_HAS_SERVICE( p_eir_uuid, service_id ));
else
return( FALSE );
-#else
- return( FALSE );
-#endif
}
/*******************************************************************************
*******************************************************************************/
tBTM_EIR_SEARCH_RESULT BTM_HasInquiryEirService( tBTM_INQ_RESULTS *p_results, UINT16 uuid16 )
{
-#if ((BTM_EIR_SERVER_INCLUDED == TRUE)||(BTM_EIR_CLIENT_INCLUDED == TRUE))
if( BTM_HasEirService( p_results->eir_uuid, uuid16 ))
{
return BTM_EIR_FOUND;
}
else
return BTM_EIR_UNKNOWN;
-#else
- return BTM_EIR_UNKNOWN;
-#endif
}
/*******************************************************************************
*******************************************************************************/
void BTM_AddEirService( UINT32 *p_eir_uuid, UINT16 uuid16 )
{
-#if ((BTM_EIR_SERVER_INCLUDED == TRUE)||(BTM_EIR_CLIENT_INCLUDED == TRUE))
UINT8 service_id;
service_id = btm_convert_uuid_to_eir_service(uuid16);
if( service_id < BTM_EIR_MAX_SERVICES )
BTM_EIR_SET_SERVICE( p_eir_uuid, service_id );
-#endif
}
/*******************************************************************************
UINT8 BTM_GetEirUuidList( UINT8 *p_eir, UINT8 uuid_size, UINT8 *p_num_uuid,
UINT8 *p_uuid_list, UINT8 max_num_uuid)
{
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
UINT8 *p_uuid_data;
UINT8 type;
UINT8 yy, xx;
}
return type;
-#else
- *p_num_uuid = 0;
- return 0x00;
-#endif
}
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
/*******************************************************************************
**
** Function btm_eir_get_uuid_list
}
}
}
-#endif
-
static void btu_hcif_inquiry_comp_evt (UINT8 *p);
static void btu_hcif_inquiry_result_evt (UINT8 *p);
static void btu_hcif_inquiry_rssi_result_evt (UINT8 *p);
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
static void btu_hcif_extended_inquiry_result_evt (UINT8 *p);
-#endif
static void btu_hcif_connection_comp_evt (UINT8 *p);
static void btu_hcif_connection_request_evt (UINT8 *p);
case HCI_INQUIRY_RSSI_RESULT_EVT:
btu_hcif_inquiry_rssi_result_evt (p);
break;
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
case HCI_EXTENDED_INQUIRY_RESULT_EVT:
btu_hcif_extended_inquiry_result_evt (p);
break;
-#endif
case HCI_CONNECTION_COMP_EVT:
btu_hcif_connection_comp_evt (p);
break;
** Returns void
**
*******************************************************************************/
-#if (BTM_EIR_CLIENT_INCLUDED == TRUE)
static void btu_hcif_extended_inquiry_result_evt (UINT8 *p)
{
/* Store results in the cache */
btm_process_inq_results (p, BTM_INQ_RESULT_EXTENDED);
}
-#endif
/*******************************************************************************
**