Loading system/main/shim/btm_api.h +0 −564 File changed.Preview size limit exceeded, changes collapsed. Show changes system/test/mock/mock_main_shim_btm_api.cc +12 −142 Original line number Diff line number Diff line Loading @@ -33,34 +33,11 @@ Octet16 octet16; bool bluetooth::shim::BTM_BleDataSignature(const RawAddress& bd_addr, uint8_t* p_text, uint16_t len, BLE_SIGNATURE signature) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_BleLocalPrivacyEnabled(void) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_BleSecurityProcedureIsRunning( const RawAddress& bd_addr) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_BleVerifySignature(const RawAddress& bd_addr, uint8_t* p_orig, uint16_t len, uint32_t counter, uint8_t* p_comp) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_GetLeSecurityState(const RawAddress& bd_addr, uint8_t* p_le_dev_sec_flags, uint8_t* p_le_key_size) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_HasEirService(const uint32_t* p_eir_uuid, uint16_t uuid16) { inc_func_call_count(__func__); Loading @@ -77,48 +54,12 @@ bool bluetooth::shim::BTM_ReadRemoteConnectionAddr( inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_SecAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class, const BD_NAME& bd_name, uint8_t* features, LinkKey* link_key, uint8_t key_type, uint8_t pin_length) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_SecAddRmtNameNotifyCallback( tBTM_RMT_NAME_CALLBACK* p_callback) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_SecDeleteDevice(const RawAddress& bd_addr) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_SecDeleteRmtNameNotifyCallback( tBTM_RMT_NAME_CALLBACK* p_callback) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_SecRegister(const tBTM_APPL_INFO* bta_callbacks) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_UseLeLink(const RawAddress& raw_address) { inc_func_call_count(__func__); return false; } const Octet16& bluetooth::shim::BTM_GetDeviceEncRoot() { inc_func_call_count(__func__); return octet16; } const Octet16& bluetooth::shim::BTM_GetDeviceDHK() { inc_func_call_count(__func__); return octet16; } const Octet16& bluetooth::shim::BTM_GetDeviceIDRoot() { inc_func_call_count(__func__); return octet16; } tBTM_INQ_INFO* bluetooth::shim::BTM_InqDbFirst(void) { inc_func_call_count(__func__); return nullptr; Loading Loading @@ -159,17 +100,7 @@ tBTM_STATUS bluetooth::shim::BTM_ReadRemoteDeviceName( inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::BTM_SecBond(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type, tBT_TRANSPORT transport, tBT_DEVICE_TYPE device_type) { inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::BTM_SecBondCancel(const RawAddress& bd_addr) { inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::BTM_SetConnectability(uint16_t page_mode, uint16_t window, uint16_t interval) { Loading @@ -186,14 +117,7 @@ tBTM_STATUS bluetooth::shim::BTM_SetDiscoverability(uint16_t discoverable_mode, inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::BTM_SetEncryption(const RawAddress& bd_addr, tBT_TRANSPORT transport, tBTM_SEC_CALLBACK* p_callback, void* p_ref_data, tBTM_BLE_SEC_ACT sec_act) { inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::BTM_SetInquiryMode(uint8_t inquiry_mode) { inc_func_call_count(__func__); return BTM_SUCCESS; Loading @@ -203,13 +127,7 @@ tBTM_STATUS bluetooth::shim::BTM_StartInquiry(tBTM_INQ_RESULTS_CB* p_results_cb, inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::btm_sec_mx_access_request( const RawAddress& bd_addr, bool is_originator, uint16_t security_requirement, tBTM_SEC_CALLBACK* p_callback, void* p_ref_data) { inc_func_call_count(__func__); return BTM_SUCCESS; } uint16_t bluetooth::shim::BTM_GetHCIConnHandle(const RawAddress& remote_bda, tBT_TRANSPORT transport) { inc_func_call_count(__func__); Loading @@ -219,10 +137,7 @@ uint16_t bluetooth::shim::BTM_IsInquiryActive(void) { inc_func_call_count(__func__); return 0; } uint8_t bluetooth::shim::BTM_BleGetSupportedKeySize(const RawAddress& bd_addr) { inc_func_call_count(__func__); return 0; } uint8_t bluetooth::shim::BTM_BleMaxMultiAdvInstanceCount() { inc_func_call_count(__func__); return 0; Loading @@ -236,15 +151,7 @@ void bluetooth::shim::BTM_BleAdvFilterParamSetup( tBTM_BLE_PF_PARAM_CB cb) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_BleLoadLocalKeys(uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_BleOobDataReply(const RawAddress& bd_addr, uint8_t res, uint8_t len, uint8_t* p_data) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_BleReadPhy( const RawAddress& bd_addr, base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb) { Loading @@ -254,10 +161,7 @@ void bluetooth::shim::BTM_BleReceiverTest(uint8_t rx_freq, tBTM_CMPL_CB* p_cmd_cmpl_cback) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_BleSecureConnectionOobDataReply( const RawAddress& bd_addr, uint8_t* p_c, uint8_t* p_r) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_BleSetConnScanParams(uint32_t scan_interval, uint32_t scan_window) { inc_func_call_count(__func__); Loading @@ -283,55 +187,21 @@ void bluetooth::shim::BTM_BleTransmitterTest(uint8_t tx_freq, inc_func_call_count(__func__); } void bluetooth::shim::BTM_CancelInquiry(void) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_ConfirmReqReply(tBTM_STATUS res, const RawAddress& bd_addr) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_EnableInterlacedInquiryScan() { inc_func_call_count(__func__); } void bluetooth::shim::BTM_EnableInterlacedPageScan() { inc_func_call_count(__func__); } void bluetooth::shim::BTM_PINCodeReply(const RawAddress& bd_addr, tBTM_STATUS res, uint8_t pin_len, uint8_t* p_pin) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_ReadConnectionAddr(const RawAddress& remote_bda, RawAddress& local_conn_addr, tBLE_ADDR_TYPE* p_addr_type, bool ota_address) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_ReadDevInfo(const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type, tBLE_ADDR_TYPE* p_addr_type) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_RemoteOobDataReply(tBTM_STATUS res, const RawAddress& bd_addr, const Octet16& c, const Octet16& r) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_SecAddBleDevice(const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_SecAddBleKey(const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key, tBTM_LE_KEY_TYPE key_type) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_SecClearSecurityFlags(const RawAddress& bd_addr) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_SecurityGrant(const RawAddress& bd_addr, uint8_t res) { inc_func_call_count(__func__); } void bluetooth::shim::SendRemoteNameRequest(const RawAddress& raw_address) { inc_func_call_count(__func__); } Loading Loading
system/main/shim/btm_api.h +0 −564 File changed.Preview size limit exceeded, changes collapsed. Show changes
system/test/mock/mock_main_shim_btm_api.cc +12 −142 Original line number Diff line number Diff line Loading @@ -33,34 +33,11 @@ Octet16 octet16; bool bluetooth::shim::BTM_BleDataSignature(const RawAddress& bd_addr, uint8_t* p_text, uint16_t len, BLE_SIGNATURE signature) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_BleLocalPrivacyEnabled(void) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_BleSecurityProcedureIsRunning( const RawAddress& bd_addr) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_BleVerifySignature(const RawAddress& bd_addr, uint8_t* p_orig, uint16_t len, uint32_t counter, uint8_t* p_comp) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_GetLeSecurityState(const RawAddress& bd_addr, uint8_t* p_le_dev_sec_flags, uint8_t* p_le_key_size) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_HasEirService(const uint32_t* p_eir_uuid, uint16_t uuid16) { inc_func_call_count(__func__); Loading @@ -77,48 +54,12 @@ bool bluetooth::shim::BTM_ReadRemoteConnectionAddr( inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_SecAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class, const BD_NAME& bd_name, uint8_t* features, LinkKey* link_key, uint8_t key_type, uint8_t pin_length) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_SecAddRmtNameNotifyCallback( tBTM_RMT_NAME_CALLBACK* p_callback) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_SecDeleteDevice(const RawAddress& bd_addr) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_SecDeleteRmtNameNotifyCallback( tBTM_RMT_NAME_CALLBACK* p_callback) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_SecRegister(const tBTM_APPL_INFO* bta_callbacks) { inc_func_call_count(__func__); return false; } bool bluetooth::shim::BTM_UseLeLink(const RawAddress& raw_address) { inc_func_call_count(__func__); return false; } const Octet16& bluetooth::shim::BTM_GetDeviceEncRoot() { inc_func_call_count(__func__); return octet16; } const Octet16& bluetooth::shim::BTM_GetDeviceDHK() { inc_func_call_count(__func__); return octet16; } const Octet16& bluetooth::shim::BTM_GetDeviceIDRoot() { inc_func_call_count(__func__); return octet16; } tBTM_INQ_INFO* bluetooth::shim::BTM_InqDbFirst(void) { inc_func_call_count(__func__); return nullptr; Loading Loading @@ -159,17 +100,7 @@ tBTM_STATUS bluetooth::shim::BTM_ReadRemoteDeviceName( inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::BTM_SecBond(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type, tBT_TRANSPORT transport, tBT_DEVICE_TYPE device_type) { inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::BTM_SecBondCancel(const RawAddress& bd_addr) { inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::BTM_SetConnectability(uint16_t page_mode, uint16_t window, uint16_t interval) { Loading @@ -186,14 +117,7 @@ tBTM_STATUS bluetooth::shim::BTM_SetDiscoverability(uint16_t discoverable_mode, inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::BTM_SetEncryption(const RawAddress& bd_addr, tBT_TRANSPORT transport, tBTM_SEC_CALLBACK* p_callback, void* p_ref_data, tBTM_BLE_SEC_ACT sec_act) { inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::BTM_SetInquiryMode(uint8_t inquiry_mode) { inc_func_call_count(__func__); return BTM_SUCCESS; Loading @@ -203,13 +127,7 @@ tBTM_STATUS bluetooth::shim::BTM_StartInquiry(tBTM_INQ_RESULTS_CB* p_results_cb, inc_func_call_count(__func__); return BTM_SUCCESS; } tBTM_STATUS bluetooth::shim::btm_sec_mx_access_request( const RawAddress& bd_addr, bool is_originator, uint16_t security_requirement, tBTM_SEC_CALLBACK* p_callback, void* p_ref_data) { inc_func_call_count(__func__); return BTM_SUCCESS; } uint16_t bluetooth::shim::BTM_GetHCIConnHandle(const RawAddress& remote_bda, tBT_TRANSPORT transport) { inc_func_call_count(__func__); Loading @@ -219,10 +137,7 @@ uint16_t bluetooth::shim::BTM_IsInquiryActive(void) { inc_func_call_count(__func__); return 0; } uint8_t bluetooth::shim::BTM_BleGetSupportedKeySize(const RawAddress& bd_addr) { inc_func_call_count(__func__); return 0; } uint8_t bluetooth::shim::BTM_BleMaxMultiAdvInstanceCount() { inc_func_call_count(__func__); return 0; Loading @@ -236,15 +151,7 @@ void bluetooth::shim::BTM_BleAdvFilterParamSetup( tBTM_BLE_PF_PARAM_CB cb) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_BleLoadLocalKeys(uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_BleOobDataReply(const RawAddress& bd_addr, uint8_t res, uint8_t len, uint8_t* p_data) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_BleReadPhy( const RawAddress& bd_addr, base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb) { Loading @@ -254,10 +161,7 @@ void bluetooth::shim::BTM_BleReceiverTest(uint8_t rx_freq, tBTM_CMPL_CB* p_cmd_cmpl_cback) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_BleSecureConnectionOobDataReply( const RawAddress& bd_addr, uint8_t* p_c, uint8_t* p_r) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_BleSetConnScanParams(uint32_t scan_interval, uint32_t scan_window) { inc_func_call_count(__func__); Loading @@ -283,55 +187,21 @@ void bluetooth::shim::BTM_BleTransmitterTest(uint8_t tx_freq, inc_func_call_count(__func__); } void bluetooth::shim::BTM_CancelInquiry(void) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_ConfirmReqReply(tBTM_STATUS res, const RawAddress& bd_addr) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_EnableInterlacedInquiryScan() { inc_func_call_count(__func__); } void bluetooth::shim::BTM_EnableInterlacedPageScan() { inc_func_call_count(__func__); } void bluetooth::shim::BTM_PINCodeReply(const RawAddress& bd_addr, tBTM_STATUS res, uint8_t pin_len, uint8_t* p_pin) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_ReadConnectionAddr(const RawAddress& remote_bda, RawAddress& local_conn_addr, tBLE_ADDR_TYPE* p_addr_type, bool ota_address) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_ReadDevInfo(const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type, tBLE_ADDR_TYPE* p_addr_type) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_RemoteOobDataReply(tBTM_STATUS res, const RawAddress& bd_addr, const Octet16& c, const Octet16& r) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_SecAddBleDevice(const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_SecAddBleKey(const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key, tBTM_LE_KEY_TYPE key_type) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_SecClearSecurityFlags(const RawAddress& bd_addr) { inc_func_call_count(__func__); } void bluetooth::shim::BTM_SecurityGrant(const RawAddress& bd_addr, uint8_t res) { inc_func_call_count(__func__); } void bluetooth::shim::SendRemoteNameRequest(const RawAddress& raw_address) { inc_func_call_count(__func__); } Loading