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 "main/shim/entry.h" 18 19 #include "hal/snoop_logger.h" 20 #include "hci/acl_manager.h" 21 #include "hci/controller.h" 22 #include "hci/controller_interface.h" 23 #include "hci/distance_measurement_manager.h" 24 #include "hci/hci_layer.h" 25 #include "hci/le_advertising_manager.h" 26 #include "hci/le_scanning_manager.h" 27 #include "hci/msft.h" 28 #include "hci/remote_name_request.h" 29 #include "lpp/lpp_offload_manager.h" 30 #include "main/shim/stack.h" 31 #include "metrics/counter_metrics.h" 32 #include "os/handler.h" 33 #include "shim/dumpsys.h" 34 #include "storage/storage_module.h" 35 36 namespace bluetooth { 37 namespace shim { 38 GetGdShimHandler()39os::Handler* GetGdShimHandler() { return Stack::GetInstance()->GetHandler(); } 40 GetAdvertising()41hci::LeAdvertisingManager* GetAdvertising() { 42 return Stack::GetInstance()->GetStackManager()->GetInstance<hci::LeAdvertisingManager>(); 43 } 44 GetController()45hci::ControllerInterface* GetController() { 46 return Stack::GetInstance()->GetStackManager()->GetInstance<hci::Controller>(); 47 } 48 GetDumpsys()49Dumpsys* GetDumpsys() { return Stack::GetInstance()->GetStackManager()->GetInstance<Dumpsys>(); } 50 GetHciLayer()51hci::HciInterface* GetHciLayer() { 52 return Stack::GetInstance()->GetStackManager()->GetInstance<hci::HciLayer>(); 53 } 54 GetRemoteNameRequest()55hci::RemoteNameRequestModule* GetRemoteNameRequest() { 56 return Stack::GetInstance()->GetStackManager()->GetInstance<hci::RemoteNameRequestModule>(); 57 } 58 GetScanning()59hci::LeScanningManager* GetScanning() { 60 return Stack::GetInstance()->GetStackManager()->GetInstance<hci::LeScanningManager>(); 61 } 62 GetDistanceMeasurementManager()63hci::DistanceMeasurementManager* GetDistanceMeasurementManager() { 64 return Stack::GetInstance()->GetStackManager()->GetInstance<hci::DistanceMeasurementManager>(); 65 } 66 GetSnoopLogger()67hal::SnoopLogger* GetSnoopLogger() { 68 return Stack::GetInstance()->GetStackManager()->GetInstance<hal::SnoopLogger>(); 69 } 70 GetLppOffloadManager()71lpp::LppOffloadInterface* GetLppOffloadManager() { 72 return Stack::GetInstance()->GetStackManager()->GetInstance<lpp::LppOffloadManager>(); 73 } 74 GetStorage()75storage::StorageModule* GetStorage() { 76 return Stack::GetInstance()->GetStackManager()->GetInstance<storage::StorageModule>(); 77 } 78 GetAclManager()79hci::AclManager* GetAclManager() { 80 return Stack::GetInstance()->GetStackManager()->GetInstance<hci::AclManager>(); 81 } 82 GetCounterMetrics()83metrics::CounterMetrics* GetCounterMetrics() { 84 return Stack::GetInstance()->GetStackManager()->GetInstance<metrics::CounterMetrics>(); 85 } 86 GetMsftExtensionManager()87hci::MsftExtensionManager* GetMsftExtensionManager() { 88 return Stack::GetInstance()->GetStackManager()->GetInstance<hci::MsftExtensionManager>(); 89 } 90 91 } // namespace shim 92 } // namespace bluetooth 93