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 #pragma once 18 19 /** 20 * Entrypoints called into Gabeldorsche from legacy stack 21 * 22 * Any marshalling/unmarshalling, data transformation of APIs to 23 * or from the Gabeldorsche stack may be placed here. 24 * 25 * The idea is to effectively provide a binary interface to prevent cross 26 * contamination of data structures and the like between the stacks. 27 * 28 * **ABSOLUTELY** No reference to Gabeldorsche stack other than well defined 29 * interfaces may be made here 30 */ 31 32 namespace bluetooth { 33 namespace os { 34 class Handler; 35 } 36 namespace hal { 37 class SnoopLogger; 38 } 39 40 namespace hci { 41 class ControllerInterface; 42 class HciInterface; 43 class AclManager; 44 class RemoteNameRequestModule; 45 class DistanceMeasurementManager; 46 class LeAdvertisingManager; 47 class LeScanningManager; 48 #if TARGET_FLOSS 49 class MsftExtensionManager; 50 #endif 51 } 52 53 namespace metrics { 54 class CounterMetrics; 55 } 56 57 namespace storage { 58 class StorageModule; 59 } 60 61 namespace shim { 62 class Dumpsys; 63 64 /* This returns a handler that might be used in shim to receive callbacks from 65 * within the stack. */ 66 os::Handler* GetGdShimHandler(); 67 hci::LeAdvertisingManager* GetAdvertising(); 68 bluetooth::hci::ControllerInterface* GetController(); 69 Dumpsys* GetDumpsys(); 70 hci::HciInterface* GetHciLayer(); 71 hci::RemoteNameRequestModule* GetRemoteNameRequest(); 72 hci::DistanceMeasurementManager* GetDistanceMeasurementManager(); 73 hci::LeScanningManager* GetScanning(); 74 hal::SnoopLogger* GetSnoopLogger(); 75 storage::StorageModule* GetStorage(); 76 hci::AclManager* GetAclManager(); 77 metrics::CounterMetrics* GetCounterMetrics(); 78 #if TARGET_FLOSS 79 hci::MsftExtensionManager* GetMsftExtensionManager(); 80 #endif 81 82 } // namespace shim 83 } // namespace bluetooth 84