1 /* 2 * Copyright 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include <map> 18 #include <string> 19 20 extern std::map<std::string, int> mock_function_count_map; 21 22 #include <base/bind.h> 23 #include <base/location.h> 24 #include <base/logging.h> 25 #include <base/memory/weak_ptr.h> 26 #include <base/strings/string_number_conversions.h> 27 #include <base/time/time.h> 28 #include <string.h> 29 30 #include <queue> 31 #include <vector> 32 33 #include "bind_helpers.h" 34 #include "ble_scanner.h" 35 #include "bt_target.h" 36 #include "device/include/controller.h" 37 #include "osi/include/alarm.h" 38 #include "stack/btm/ble_scanner_hci_interface.h" 39 #include "stack/btm/btm_ble_int.h" 40 #include "stack/btm/btm_int_types.h" 41 42 #ifndef UNUSED_ATTR 43 #define UNUSED_ATTR 44 #endif 45 CleanUp()46void BleScanningManager::CleanUp() { mock_function_count_map[__func__]++; } btm_ble_scanner_init()47void btm_ble_scanner_init() { mock_function_count_map[__func__]++; } Get()48base::WeakPtr<BleScanningManager> BleScanningManager::Get() { 49 mock_function_count_map[__func__]++; 50 return nullptr; 51 } IsInitialized()52bool BleScanningManager::IsInitialized() { 53 mock_function_count_map[__func__]++; 54 return false; 55 } Initialize(BleScannerHciInterface * interface)56void BleScanningManager::Initialize(BleScannerHciInterface* interface) { 57 mock_function_count_map[__func__]++; 58 } btm_ble_scanner_cleanup(void)59void btm_ble_scanner_cleanup(void) { mock_function_count_map[__func__]++; }