Loading system/main/shim/acl_legacy_interface.cc +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ const acl_interface_t GetAclInterface() { .connection.le.on_failed = acl_ble_connection_fail, .connection.le.on_disconnected = btm_acl_disconnected, .connection.sco.on_esco_connect_request = btm_sco_on_esco_connect_request, .connection.sco.on_sco_connect_request = btm_sco_on_sco_connect_request, .connection.sco.on_disconnected = btm_sco_on_disconnected, .link.classic.on_authentication_complete = btm_sec_auth_complete, Loading system/main/shim/acl_legacy_interface.h +3 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include "stack/include/hci_error_code.h" #include "stack/include/hcidefs.h" #include "types/ble_address_with_type.h" #include "types/class_of_device.h" #include "types/hci_role.h" #include "types/raw_address.h" Loading Loading @@ -49,6 +50,8 @@ typedef struct { } acl_le_connection_interface_t; typedef struct { void (*on_esco_connect_request)(const RawAddress, const types::ClassOfDevice); void (*on_sco_connect_request)(const RawAddress, const types::ClassOfDevice); void (*on_disconnected)(uint16_t handle, tHCI_REASON reason); } acl_sco_connection_interface_t; Loading system/main/test/common/mock_stack_btm_sco.cc +9 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ extern std::map<std::string, int> mock_function_count_map; #include "stack/include/btm_api_types.h" #include "stack/include/btm_status.h" #include "stack/include/hci_error_code.h" #include "types/class_of_device.h" #include "types/raw_address.h" #ifndef UNUSED_ATTR Loading Loading @@ -111,6 +112,14 @@ void btm_sco_connected(tHCI_STATUS hci_status, const RawAddress& bda, void btm_sco_disc_chk_pend_for_modechange(uint16_t hci_handle) { mock_function_count_map[__func__]++; } void btm_sco_on_esco_connect_request( const RawAddress bda, const bluetooth::types::ClassOfDevice cod) { mock_function_count_map[__func__]++; } void btm_sco_on_sco_connect_request(const RawAddress bda, const bluetooth::types::ClassOfDevice cod) { mock_function_count_map[__func__]++; } void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) { mock_function_count_map[__func__]++; } system/stack/btm/btm_sco.cc +14 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ #include "stack/include/btm_api_types.h" #include "stack/include/hci_error_code.h" #include "stack/include/hcimsgs.h" #include "types/class_of_device.h" #include "types/raw_address.h" extern tBTM_CB btm_cb; Loading Loading @@ -874,6 +876,18 @@ bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason) { return false; } void btm_sco_on_esco_connect_request( const RawAddress bda, const bluetooth::types::ClassOfDevice cod) { LOG_ERROR("Remote ESCO connect request unimplemented remote:%s", PRIVATE_ADDRESS(bda)); } void btm_sco_on_sco_connect_request(const RawAddress bda, const bluetooth::types::ClassOfDevice cod) { LOG_ERROR("Remote SCO connect request unimplemented remote:%s", PRIVATE_ADDRESS(bda)); } void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) { tSCO_CONN* p_sco = btm_cb.sco_cb.get_sco_connection_from_handle(hci_handle); if (p_sco == nullptr) { Loading system/stack/include/sco_hci_link_interface.h +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <cstdint> #include "stack/include/hci_error_code.h" #include "types/class_of_device.h" #include "types/raw_address.h" struct tBTM_ESCO_DATA; Loading @@ -37,3 +38,7 @@ extern void btm_sco_connected(tHCI_STATUS hci_status, const RawAddress& bda, extern bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason); void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason); void btm_sco_on_esco_connect_request(const RawAddress, const bluetooth::types::ClassOfDevice); void btm_sco_on_sco_connect_request(const RawAddress, const bluetooth::types::ClassOfDevice); Loading
system/main/shim/acl_legacy_interface.cc +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ const acl_interface_t GetAclInterface() { .connection.le.on_failed = acl_ble_connection_fail, .connection.le.on_disconnected = btm_acl_disconnected, .connection.sco.on_esco_connect_request = btm_sco_on_esco_connect_request, .connection.sco.on_sco_connect_request = btm_sco_on_sco_connect_request, .connection.sco.on_disconnected = btm_sco_on_disconnected, .link.classic.on_authentication_complete = btm_sec_auth_complete, Loading
system/main/shim/acl_legacy_interface.h +3 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include "stack/include/hci_error_code.h" #include "stack/include/hcidefs.h" #include "types/ble_address_with_type.h" #include "types/class_of_device.h" #include "types/hci_role.h" #include "types/raw_address.h" Loading Loading @@ -49,6 +50,8 @@ typedef struct { } acl_le_connection_interface_t; typedef struct { void (*on_esco_connect_request)(const RawAddress, const types::ClassOfDevice); void (*on_sco_connect_request)(const RawAddress, const types::ClassOfDevice); void (*on_disconnected)(uint16_t handle, tHCI_REASON reason); } acl_sco_connection_interface_t; Loading
system/main/test/common/mock_stack_btm_sco.cc +9 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ extern std::map<std::string, int> mock_function_count_map; #include "stack/include/btm_api_types.h" #include "stack/include/btm_status.h" #include "stack/include/hci_error_code.h" #include "types/class_of_device.h" #include "types/raw_address.h" #ifndef UNUSED_ATTR Loading Loading @@ -111,6 +112,14 @@ void btm_sco_connected(tHCI_STATUS hci_status, const RawAddress& bda, void btm_sco_disc_chk_pend_for_modechange(uint16_t hci_handle) { mock_function_count_map[__func__]++; } void btm_sco_on_esco_connect_request( const RawAddress bda, const bluetooth::types::ClassOfDevice cod) { mock_function_count_map[__func__]++; } void btm_sco_on_sco_connect_request(const RawAddress bda, const bluetooth::types::ClassOfDevice cod) { mock_function_count_map[__func__]++; } void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) { mock_function_count_map[__func__]++; }
system/stack/btm/btm_sco.cc +14 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ #include "stack/include/btm_api_types.h" #include "stack/include/hci_error_code.h" #include "stack/include/hcimsgs.h" #include "types/class_of_device.h" #include "types/raw_address.h" extern tBTM_CB btm_cb; Loading Loading @@ -874,6 +876,18 @@ bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason) { return false; } void btm_sco_on_esco_connect_request( const RawAddress bda, const bluetooth::types::ClassOfDevice cod) { LOG_ERROR("Remote ESCO connect request unimplemented remote:%s", PRIVATE_ADDRESS(bda)); } void btm_sco_on_sco_connect_request(const RawAddress bda, const bluetooth::types::ClassOfDevice cod) { LOG_ERROR("Remote SCO connect request unimplemented remote:%s", PRIVATE_ADDRESS(bda)); } void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) { tSCO_CONN* p_sco = btm_cb.sco_cb.get_sco_connection_from_handle(hci_handle); if (p_sco == nullptr) { Loading
system/stack/include/sco_hci_link_interface.h +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <cstdint> #include "stack/include/hci_error_code.h" #include "types/class_of_device.h" #include "types/raw_address.h" struct tBTM_ESCO_DATA; Loading @@ -37,3 +38,7 @@ extern void btm_sco_connected(tHCI_STATUS hci_status, const RawAddress& bda, extern bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason); void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason); void btm_sco_on_esco_connect_request(const RawAddress, const bluetooth::types::ClassOfDevice); void btm_sco_on_sco_connect_request(const RawAddress, const bluetooth::types::ClassOfDevice);