1 /* 2 * Copyright 2020 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 <cstdint> 20 21 #include "stack/include/btm_status.h" 22 #include "types/raw_address.h" 23 24 // Note: From include/btm_api_types.h 25 26 /***************************************************************************** 27 * ACL CHANNEL MANAGEMENT 28 ****************************************************************************/ 29 /****************** 30 * ACL Constants 31 ******************/ 32 /*************** 33 * ACL Types 34 ***************/ 35 36 /* Structure returned with read RSSI event (in tBTM_CMPL_CB callback function) 37 * in response to BTM_ReadRSSI call. 38 */ 39 typedef struct { 40 tBTM_STATUS status; 41 uint8_t hci_status; 42 RawAddress rem_bda; 43 int8_t rssi; 44 } tBTM_RSSI_RESULT; 45 46 /* Structure returned with read failed contact counter event 47 * (in tBTM_CMPL_CB callback function) in response to 48 * BTM_ReadFailedContactCounter call. 49 */ 50 typedef struct { 51 tBTM_STATUS status; 52 uint8_t hci_status; 53 RawAddress rem_bda; 54 uint16_t failed_contact_counter; 55 } tBTM_FAILED_CONTACT_COUNTER_RESULT; 56 57 /* Structure returned with read automatic flush timeout event 58 * (in tBTM_CMPL_CB callback function) in response to 59 * BTM_ReadAutomaticFlushTimeout call. 60 */ 61 typedef struct { 62 tBTM_STATUS status; 63 uint8_t hci_status; 64 RawAddress rem_bda; 65 uint16_t automatic_flush_timeout; 66 } tBTM_AUTOMATIC_FLUSH_TIMEOUT_RESULT; 67 68 /* Structure returned with read current TX power event (in tBTM_CMPL_CB callback 69 * function) in response to BTM_ReadTxPower call. 70 */ 71 typedef struct { 72 tBTM_STATUS status; 73 uint8_t hci_status; 74 RawAddress rem_bda; 75 int8_t tx_power; 76 } tBTM_TX_POWER_RESULT; 77 78 /* Structure returned with read link quality event (in tBTM_CMPL_CB callback 79 * function) in response to BTM_ReadLinkQuality call. 80 */ 81 typedef struct { 82 tBTM_STATUS status; 83 uint8_t hci_status; 84 RawAddress rem_bda; 85 uint8_t link_quality; 86 } tBTM_LINK_QUALITY_RESULT; 87 88 enum class tBTM_INQUIRY_STATE : uint8_t { 89 BTM_INQUIRY_STARTED = 1, 90 BTM_INQUIRY_CANCELLED = 2, 91 BTM_INQUIRY_COMPLETE = 3, 92 }; 93