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 #include "osi/include/future.h" 33 34 namespace bluetooth { 35 namespace os { 36 class Handler; 37 } 38 namespace activity_attribution { 39 class ActivityAttribution; 40 } 41 namespace neighbor { 42 class ConnectabilityModule; 43 class DiscoverabilityModule; 44 class InquiryModule; 45 class NameModule; 46 class PageModule; 47 } 48 namespace hci { 49 class Controller; 50 class HciLayer; 51 class AclManager; 52 class LeAdvertisingManager; 53 class LeScanningManager; 54 class VendorSpecificEventManager; 55 } 56 57 namespace l2cap { 58 namespace classic { 59 class L2capClassicModule; 60 } // namespace classic 61 namespace le { 62 class L2capLeModule; 63 } // namespace le 64 } // namespace l2cap 65 66 namespace metrics { 67 class CounterMetrics; 68 } 69 70 namespace security { 71 class SecurityModule; 72 } 73 namespace storage { 74 class StorageModule; 75 } 76 77 namespace shim { 78 class Dumpsys; 79 80 /* This returns a handler that might be used in shim to receive callbacks from 81 * within the stack. */ 82 os::Handler* GetGdShimHandler(); 83 hci::LeAdvertisingManager* GetAdvertising(); 84 bluetooth::hci::Controller* GetController(); 85 neighbor::DiscoverabilityModule* GetDiscoverability(); 86 neighbor::ConnectabilityModule* GetConnectability(); 87 Dumpsys* GetDumpsys(); 88 neighbor::InquiryModule* GetInquiry(); 89 hci::HciLayer* GetHciLayer(); 90 l2cap::classic::L2capClassicModule* GetL2capClassicModule(); 91 l2cap::le::L2capLeModule* GetL2capLeModule(); 92 neighbor::NameModule* GetName(); 93 neighbor::PageModule* GetPage(); 94 hci::LeScanningManager* GetScanning(); 95 bluetooth::security::SecurityModule* GetSecurityModule(); 96 storage::StorageModule* GetStorage(); 97 hci::AclManager* GetAclManager(); 98 hci::VendorSpecificEventManager* GetVendorSpecificEventManager(); 99 activity_attribution::ActivityAttribution* GetActivityAttribution(); 100 metrics::CounterMetrics* GetCounterMetrics(); 101 102 } // namespace shim 103 } // namespace bluetooth 104