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 "hci/hci_packets.h" 20 21 namespace bluetooth { 22 namespace hci { 23 namespace acl_manager { 24 25 class LeConnectionManagementCallbacks { 26 public: 27 virtual ~LeConnectionManagementCallbacks() = default; 28 virtual void OnConnectionUpdate( 29 hci::ErrorCode hci_status, 30 uint16_t connection_interval, 31 uint16_t connection_latency, 32 uint16_t supervision_timeout) = 0; 33 virtual void OnDataLengthChange(uint16_t tx_octets, uint16_t tx_time, uint16_t rx_octets, uint16_t rx_time) = 0; 34 virtual void OnDisconnection(hci::ErrorCode reason) = 0; 35 virtual void OnReadRemoteVersionInformationComplete( 36 hci::ErrorCode hci_status, uint8_t lmp_version, uint16_t manufacturer_name, uint16_t sub_version) = 0; 37 virtual void OnLeReadRemoteFeaturesComplete(hci::ErrorCode hci_status, uint64_t features) = 0; 38 virtual void OnPhyUpdate(hci::ErrorCode hci_status, uint8_t tx_phy, uint8_t rx_phy) = 0; 39 virtual void OnLeSubrateChange( 40 hci::ErrorCode hci_status, 41 uint16_t subrate_factor, 42 uint16_t peripheral_latency, 43 uint16_t continuation_number, 44 uint16_t supervision_timeout) = 0; 45 }; 46 47 } // namespace acl_manager 48 } // namespace hci 49 } // namespace bluetooth 50