Loading system/stack/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -259,6 +259,7 @@ cc_library_static { "btm/btm_sco_hfp_hal.cc", "btm/btm_sec.cc", "btm/btm_sec_cb.cc", "btm/btm_security_client_interface.cc", "btu/btu_event.cc", "btu/btu_hcif.cc", "eatt/eatt.cc", Loading Loading @@ -1531,6 +1532,7 @@ cc_test { "btm/btm_sco_hfp_hal.cc", "btm/btm_sec.cc", "btm/btm_sec_cb.cc", "btm/btm_security_client_interface.cc", "btm/hfp_lc3_decoder.cc", "btm/hfp_lc3_encoder.cc", "btm/hfp_msbc_decoder.cc", Loading system/stack/BUILD.gn +1 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ source_set("stack") { "btm/btm_sco_hfp_hal_linux.cc", "btm/btm_sec.cc", "btm/btm_sec_cb.cc", "btm/btm_security_client_interface.cc", "btm/hfp_lc3_encoder_linux.cc", "btm/hfp_lc3_decoder_linux.cc", "btm/hfp_msbc_encoder.cc", Loading system/stack/btm/btm_client_interface.cc +3 −30 Original line number Diff line number Diff line Loading @@ -16,14 +16,12 @@ #include "stack/include/btm_client_interface.h" #include "stack/btm/btm_dev.h" #include "stack/btm/btm_sec.h" #include "security_client_callbacks.h" #include "stack/btm/btm_ble_int.h" #include "stack/include/acl_api.h" #include "stack/include/btm_api.h" #include "stack/include/btm_ble_api.h" #include "stack/include/btm_ble_sec_api.h" #include "stack/include/btm_client_interface.h" #include "stack/include/btm_sec_api.h" struct btm_client_interface_t btm_client_interface = { .lifecycle = Loading Loading @@ -80,32 +78,7 @@ struct btm_client_interface_t btm_client_interface = { .BTM_ReadRSSI = BTM_ReadRSSI, }, .security = { .BTM_SecAddDevice = BTM_SecAddDevice, .BTM_SecAddRmtNameNotifyCallback = BTM_SecAddRmtNameNotifyCallback, .BTM_SecDeleteDevice = BTM_SecDeleteDevice, .BTM_SecRegister = BTM_SecRegister, .BTM_SecReadDevName = BTM_SecReadDevName, .BTM_SecBond = BTM_SecBond, .BTM_SecBondCancel = BTM_SecBondCancel, .BTM_SecAddBleKey = BTM_SecAddBleKey, .BTM_SecAddBleDevice = BTM_SecAddBleDevice, .BTM_SecClearSecurityFlags = BTM_SecClearSecurityFlags, .BTM_SecClrService = BTM_SecClrService, .BTM_SecClrServiceByPsm = BTM_SecClrServiceByPsm, .BTM_RemoteOobDataReply = BTM_RemoteOobDataReply, .BTM_PINCodeReply = BTM_PINCodeReply, .BTM_ConfirmReqReply = BTM_ConfirmReqReply, .BTM_SecDeleteRmtNameNotifyCallback = BTM_SecDeleteRmtNameNotifyCallback, .BTM_SetEncryption = BTM_SetEncryption, .BTM_IsEncrypted = BTM_IsEncrypted, .BTM_SecIsSecurityPending = BTM_SecIsSecurityPending, .BTM_IsLinkKeyKnown = BTM_IsLinkKeyKnown, .BTM_BleSirkConfirmDeviceReply = BTM_BleSirkConfirmDeviceReply, .BTM_GetSecurityMode = BTM_GetSecurityMode, }, .security = get_security_client_interface(), .ble = { Loading system/stack/btm/btm_security_client_interface.cc 0 → 100644 +51 −0 Original line number Diff line number Diff line /* * Copyright 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "stack/btm/btm_dev.h" #include "stack/btm/btm_sec.h" #include "stack/include/btm_ble_sec_api.h" #include "stack/include/btm_sec_api.h" #include "stack/include/security_client_callbacks.h" static SecurityClientInterface security = { .BTM_SecAddDevice = BTM_SecAddDevice, .BTM_SecAddRmtNameNotifyCallback = BTM_SecAddRmtNameNotifyCallback, .BTM_SecDeleteDevice = BTM_SecDeleteDevice, .BTM_SecRegister = BTM_SecRegister, .BTM_SecReadDevName = BTM_SecReadDevName, .BTM_SecBond = BTM_SecBond, .BTM_SecBondCancel = BTM_SecBondCancel, .BTM_SecAddBleKey = BTM_SecAddBleKey, .BTM_SecAddBleDevice = BTM_SecAddBleDevice, .BTM_SecClearSecurityFlags = BTM_SecClearSecurityFlags, .BTM_SecClrService = BTM_SecClrService, .BTM_SecClrServiceByPsm = BTM_SecClrServiceByPsm, .BTM_RemoteOobDataReply = BTM_RemoteOobDataReply, .BTM_PINCodeReply = BTM_PINCodeReply, .BTM_ConfirmReqReply = BTM_ConfirmReqReply, .BTM_SecDeleteRmtNameNotifyCallback = BTM_SecDeleteRmtNameNotifyCallback, .BTM_SetEncryption = BTM_SetEncryption, .BTM_IsEncrypted = BTM_IsEncrypted, .BTM_SecIsSecurityPending = BTM_SecIsSecurityPending, .BTM_IsLinkKeyKnown = BTM_IsLinkKeyKnown, .BTM_BleSirkConfirmDeviceReply = BTM_BleSirkConfirmDeviceReply, .BTM_GetSecurityMode = BTM_GetSecurityMode, }; const SecurityClientInterface& get_security_client_interface() { return security; } system/stack/include/btm_ble_sec_api.h +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include "btm_ble_api_types.h" #include "btm_ble_sec_api_types.h" #include "stack/include/bt_device_type.h" #include "types/raw_address.h" /******************************************************************************* Loading Loading
system/stack/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -259,6 +259,7 @@ cc_library_static { "btm/btm_sco_hfp_hal.cc", "btm/btm_sec.cc", "btm/btm_sec_cb.cc", "btm/btm_security_client_interface.cc", "btu/btu_event.cc", "btu/btu_hcif.cc", "eatt/eatt.cc", Loading Loading @@ -1531,6 +1532,7 @@ cc_test { "btm/btm_sco_hfp_hal.cc", "btm/btm_sec.cc", "btm/btm_sec_cb.cc", "btm/btm_security_client_interface.cc", "btm/hfp_lc3_decoder.cc", "btm/hfp_lc3_encoder.cc", "btm/hfp_msbc_decoder.cc", Loading
system/stack/BUILD.gn +1 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ source_set("stack") { "btm/btm_sco_hfp_hal_linux.cc", "btm/btm_sec.cc", "btm/btm_sec_cb.cc", "btm/btm_security_client_interface.cc", "btm/hfp_lc3_encoder_linux.cc", "btm/hfp_lc3_decoder_linux.cc", "btm/hfp_msbc_encoder.cc", Loading
system/stack/btm/btm_client_interface.cc +3 −30 Original line number Diff line number Diff line Loading @@ -16,14 +16,12 @@ #include "stack/include/btm_client_interface.h" #include "stack/btm/btm_dev.h" #include "stack/btm/btm_sec.h" #include "security_client_callbacks.h" #include "stack/btm/btm_ble_int.h" #include "stack/include/acl_api.h" #include "stack/include/btm_api.h" #include "stack/include/btm_ble_api.h" #include "stack/include/btm_ble_sec_api.h" #include "stack/include/btm_client_interface.h" #include "stack/include/btm_sec_api.h" struct btm_client_interface_t btm_client_interface = { .lifecycle = Loading Loading @@ -80,32 +78,7 @@ struct btm_client_interface_t btm_client_interface = { .BTM_ReadRSSI = BTM_ReadRSSI, }, .security = { .BTM_SecAddDevice = BTM_SecAddDevice, .BTM_SecAddRmtNameNotifyCallback = BTM_SecAddRmtNameNotifyCallback, .BTM_SecDeleteDevice = BTM_SecDeleteDevice, .BTM_SecRegister = BTM_SecRegister, .BTM_SecReadDevName = BTM_SecReadDevName, .BTM_SecBond = BTM_SecBond, .BTM_SecBondCancel = BTM_SecBondCancel, .BTM_SecAddBleKey = BTM_SecAddBleKey, .BTM_SecAddBleDevice = BTM_SecAddBleDevice, .BTM_SecClearSecurityFlags = BTM_SecClearSecurityFlags, .BTM_SecClrService = BTM_SecClrService, .BTM_SecClrServiceByPsm = BTM_SecClrServiceByPsm, .BTM_RemoteOobDataReply = BTM_RemoteOobDataReply, .BTM_PINCodeReply = BTM_PINCodeReply, .BTM_ConfirmReqReply = BTM_ConfirmReqReply, .BTM_SecDeleteRmtNameNotifyCallback = BTM_SecDeleteRmtNameNotifyCallback, .BTM_SetEncryption = BTM_SetEncryption, .BTM_IsEncrypted = BTM_IsEncrypted, .BTM_SecIsSecurityPending = BTM_SecIsSecurityPending, .BTM_IsLinkKeyKnown = BTM_IsLinkKeyKnown, .BTM_BleSirkConfirmDeviceReply = BTM_BleSirkConfirmDeviceReply, .BTM_GetSecurityMode = BTM_GetSecurityMode, }, .security = get_security_client_interface(), .ble = { Loading
system/stack/btm/btm_security_client_interface.cc 0 → 100644 +51 −0 Original line number Diff line number Diff line /* * Copyright 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "stack/btm/btm_dev.h" #include "stack/btm/btm_sec.h" #include "stack/include/btm_ble_sec_api.h" #include "stack/include/btm_sec_api.h" #include "stack/include/security_client_callbacks.h" static SecurityClientInterface security = { .BTM_SecAddDevice = BTM_SecAddDevice, .BTM_SecAddRmtNameNotifyCallback = BTM_SecAddRmtNameNotifyCallback, .BTM_SecDeleteDevice = BTM_SecDeleteDevice, .BTM_SecRegister = BTM_SecRegister, .BTM_SecReadDevName = BTM_SecReadDevName, .BTM_SecBond = BTM_SecBond, .BTM_SecBondCancel = BTM_SecBondCancel, .BTM_SecAddBleKey = BTM_SecAddBleKey, .BTM_SecAddBleDevice = BTM_SecAddBleDevice, .BTM_SecClearSecurityFlags = BTM_SecClearSecurityFlags, .BTM_SecClrService = BTM_SecClrService, .BTM_SecClrServiceByPsm = BTM_SecClrServiceByPsm, .BTM_RemoteOobDataReply = BTM_RemoteOobDataReply, .BTM_PINCodeReply = BTM_PINCodeReply, .BTM_ConfirmReqReply = BTM_ConfirmReqReply, .BTM_SecDeleteRmtNameNotifyCallback = BTM_SecDeleteRmtNameNotifyCallback, .BTM_SetEncryption = BTM_SetEncryption, .BTM_IsEncrypted = BTM_IsEncrypted, .BTM_SecIsSecurityPending = BTM_SecIsSecurityPending, .BTM_IsLinkKeyKnown = BTM_IsLinkKeyKnown, .BTM_BleSirkConfirmDeviceReply = BTM_BleSirkConfirmDeviceReply, .BTM_GetSecurityMode = BTM_GetSecurityMode, }; const SecurityClientInterface& get_security_client_interface() { return security; }
system/stack/include/btm_ble_sec_api.h +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include "btm_ble_api_types.h" #include "btm_ble_sec_api_types.h" #include "stack/include/bt_device_type.h" #include "types/raw_address.h" /******************************************************************************* Loading