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 #include <vector> 20 21 #include "base/functional/callback.h" 22 #include "stack/include/btm_status.h" 23 #include "types/raw_address.h" 24 25 namespace bluetooth { 26 namespace shim { 27 28 /******************************************************************************* 29 * 30 * Function BTM_ClearEventFilter 31 * 32 * Description Clears the event filter in the controller 33 * 34 * Returns Return btm status 35 * 36 ******************************************************************************/ 37 tBTM_STATUS BTM_ClearEventFilter(void); 38 39 /******************************************************************************* 40 * 41 * Function BTM_ClearEventMask 42 * 43 * Description Clears the event mask in the controller 44 * 45 * Returns Return btm status 46 * 47 ******************************************************************************/ 48 tBTM_STATUS BTM_ClearEventMask(void); 49 50 /******************************************************************************* 51 * 52 * Function BTM_ClearFilterAcceptList 53 * 54 * Description Clears the connect list in the controller 55 * 56 * Returns Return btm status 57 * 58 ******************************************************************************/ 59 tBTM_STATUS BTM_ClearFilterAcceptList(void); 60 61 /******************************************************************************* 62 * 63 * Function BTM_DisconnectAllAcls 64 * 65 * Description Disconnects all of the ACL connections 66 * 67 * Returns Return btm status 68 * 69 ******************************************************************************/ 70 tBTM_STATUS BTM_DisconnectAllAcls(void); 71 72 /******************************************************************************* 73 * 74 * Function BTM_SetEventFilterConnectionSetupAllDevices 75 * 76 * Description Tell the controller to allow all devices 77 * 78 * Parameters 79 * 80 *******************************************************************************/ 81 tBTM_STATUS BTM_SetEventFilterConnectionSetupAllDevices(void); 82 83 /******************************************************************************* 84 * 85 * Function BTM_AllowWakeByHid 86 * 87 * Description Allow the device to be woken by HID devices 88 * 89 * Parameters std::vector of RawAddress 90 * 91 *******************************************************************************/ 92 tBTM_STATUS BTM_AllowWakeByHid(std::vector<RawAddress> classic_hid_devices, 93 std::vector<std::pair<RawAddress, uint8_t>> le_hid_devices); 94 95 /******************************************************************************* 96 * 97 * Function BTM_RestoreFilterAcceptList 98 * 99 * Description Floss: Restore the state of the for the filter accept list 100 * 101 * Parameters 102 * 103 *******************************************************************************/ 104 tBTM_STATUS BTM_RestoreFilterAcceptList(std::vector<std::pair<RawAddress, uint8_t>> le_devices); 105 106 /******************************************************************************* 107 * 108 * Function BTM_SetDefaultEventMaskExcept 109 * 110 * Description Floss: Set the default event mask for Classic and LE except 111 * the given values (they will be disabled in the final set 112 * mask). 113 * 114 * Parameters Bits set for event mask and le event mask that should be 115 * disabled in the final value. 116 * 117 *******************************************************************************/ 118 tBTM_STATUS BTM_SetDefaultEventMaskExcept(uint64_t mask, uint64_t le_mask); 119 120 /******************************************************************************* 121 * 122 * Function BTM_SetEventFilterInquiryResultAllDevices 123 * 124 * Description Floss: Set the event filter to inquiry result device all 125 * 126 * Parameters 127 * 128 *******************************************************************************/ 129 tBTM_STATUS BTM_SetEventFilterInquiryResultAllDevices(void); 130 131 /******************************************************************************* 132 * 133 * Function BTM_BleResetId 134 * 135 * Description Resets the local BLE keys 136 * 137 *******************************************************************************/ 138 tBTM_STATUS BTM_BleResetId(void); 139 140 /******************************************************************************* 141 * 142 * Function BTM_BleGetNumberOfAdvertisingInstancesInUse 143 * 144 * Description Obtains the number of BLE advertising instances in use 145 * 146 * Returns Return the number of BLE advertising instances in use 147 *******************************************************************************/ 148 size_t BTM_BleGetNumberOfAdvertisingInstancesInUse(void); 149 150 } // namespace shim 151 } // namespace bluetooth 152