1 /*
2  * Copyright 2019 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 "hci/acl_manager_mock.h"
18 #include "hci/controller_interface_mock.h"
19 #include "hci/distance_measurement_manager_mock.h"
20 #include "hci/hci_interface.h"
21 #include "hci/hci_layer_mock.h"
22 #include "hci/le_advertising_manager_mock.h"
23 #include "hci/le_scanning_manager_mock.h"
24 #include "main/shim/entry.h"
25 #include "os/handler.h"
26 #include "storage/storage_module.h"
27 
28 namespace bluetooth {
29 namespace hci {
30 namespace testing {
31 
32 MockAclManager* mock_acl_manager_{nullptr};
33 MockControllerInterface* mock_controller_{nullptr};
34 shim::Dumpsys* shim_dumpsys_ = {};
35 MockHciLayer* mock_hci_layer_{nullptr};
36 os::Handler* mock_gd_shim_handler_{nullptr};
37 MockLeAdvertisingManager* mock_le_advertising_manager_{nullptr};
38 MockLeScanningManager* mock_le_scanning_manager_{nullptr};
39 MockDistanceMeasurementManager* mock_distance_measurement_manager_{nullptr};
40 
41 }  // namespace testing
42 }  // namespace hci
43 
44 class Dumpsys;
45 
46 namespace shim {
47 
GetDumpsys()48 Dumpsys* GetDumpsys() { return hci::testing::shim_dumpsys_; }
GetAclManager()49 hci::AclManager* GetAclManager() { return hci::testing::mock_acl_manager_; }
GetController()50 hci::ControllerInterface* GetController() {
51   return hci::testing::mock_controller_;
52 }
GetHciLayer()53 hci::HciInterface* GetHciLayer() { return hci::testing::mock_hci_layer_; }
GetAdvertising()54 hci::LeAdvertisingManager* GetAdvertising() {
55   return hci::testing::mock_le_advertising_manager_;
56 }
GetScanning()57 hci::LeScanningManager* GetScanning() {
58   return hci::testing::mock_le_scanning_manager_;
59 }
GetDistanceMeasurementManager()60 hci::DistanceMeasurementManager* GetDistanceMeasurementManager() {
61   return hci::testing::mock_distance_measurement_manager_;
62 }
GetGdShimHandler()63 os::Handler* GetGdShimHandler() { return hci::testing::mock_gd_shim_handler_; }
GetSnoopLogger()64 hal::SnoopLogger* GetSnoopLogger() { return nullptr; }
GetStorage()65 storage::StorageModule* GetStorage() { return nullptr; }
GetCounterMetrics()66 metrics::CounterMetrics* GetCounterMetrics() { return nullptr; }
67 #if TARGET_FLOSS
GetMsftExtensionManager()68 hci::MsftExtensionManager* GetMsftExtensionManager() { return nullptr; }
69 #endif
GetRemoteNameRequest()70 hci::RemoteNameRequestModule* GetRemoteNameRequest() { return nullptr; }
71 
72 }  // namespace shim
73 }  // namespace bluetooth
74