1 /****************************************************************************** 2 * 3 * Copyright 2018 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 #include "mock_btm_layer.h" 20 21 static bluetooth::manager::MockBtmSecurityInternalInterface* 22 btm_security_internal_interface = nullptr; 23 24 void bluetooth::manager::SetMockSecurityInternalInterface( 25 MockBtmSecurityInternalInterface* mock_btm_security_internal_interface) { 26 btm_security_internal_interface = mock_btm_security_internal_interface; 27 } 28 29 void btm_sec_abort_access_req(const RawAddress& bd_addr) { 30 btm_security_internal_interface->AbortAccessRequest(bd_addr); 31 } 32 33 tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr, uint16_t psm, 34 bool is_originator, uint32_t mx_proto_id, 35 uint32_t mx_chan_id, 36 tBTM_SEC_CALLBACK* p_callback, 37 void* p_ref_data) { 38 return btm_security_internal_interface->MultiplexingProtocolAccessRequest( 39 bd_addr, psm, is_originator, mx_proto_id, mx_chan_id, p_callback, 40 p_ref_data); 41 } 42 43 uint16_t btm_get_max_packet_size(const RawAddress& addr) { 44 return RFCOMM_DEFAULT_MTU; 45 }