1 /* 2 * Copyright 2020 HIMSA II K/S - www.himsa.com. 3 * Represented by EHIMA - www.ehima.com 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 #include "mock_gatt_layer.h" 19 20 static bluetooth::gatt::MockGattInterface* gatt_interface = nullptr; 21 SetMockGattInterface(MockGattInterface * mock_gatt_interface)22void bluetooth::gatt::SetMockGattInterface( 23 MockGattInterface* mock_gatt_interface) { 24 gatt_interface = mock_gatt_interface; 25 } 26 gatt_profile_get_eatt_support(const RawAddress & peer_bda)27bool gatt_profile_get_eatt_support(const RawAddress& peer_bda) { 28 return gatt_interface->GetEattSupport(peer_bda); 29 } 30 gatt_cl_init_sr_status(tGATT_TCB & tcb)31void gatt_cl_init_sr_status(tGATT_TCB& tcb) { 32 return gatt_interface->ClientInitServerStatus(tcb); 33 } 34 gatt_cl_read_sr_supp_feat_req(const RawAddress & peer_bda,base::OnceCallback<void (const RawAddress &,uint8_t)> cb)35bool gatt_cl_read_sr_supp_feat_req( 36 const RawAddress& peer_bda, 37 base::OnceCallback<void(const RawAddress&, uint8_t)> cb) { 38 return gatt_interface->ClientReadSupportedFeatures(peer_bda, std::move(cb)); 39 } 40