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(hci::ErrorCode hci_status, uint16_t connection_interval, 29 uint16_t connection_latency, uint16_t supervision_timeout) = 0; 30 virtual void OnParameterUpdateRequest(uint16_t interval_min, uint16_t interval_max, 31 uint16_t latency, uint16_t supervision_timeout) = 0; 32 virtual void OnDataLengthChange(uint16_t tx_octets, uint16_t tx_time, uint16_t rx_octets, 33 uint16_t rx_time) = 0; 34 virtual void OnDisconnection(hci::ErrorCode reason) = 0; 35 virtual void OnReadRemoteVersionInformationComplete(hci::ErrorCode hci_status, 36 uint8_t lmp_version, 37 uint16_t manufacturer_name, 38 uint16_t sub_version) = 0; 39 virtual void OnLeReadRemoteFeaturesComplete(hci::ErrorCode hci_status, uint64_t features) = 0; 40 virtual void OnPhyUpdate(hci::ErrorCode hci_status, uint8_t tx_phy, uint8_t rx_phy) = 0; 41 virtual void OnLeSubrateChange(hci::ErrorCode hci_status, uint16_t subrate_factor, 42 uint16_t peripheral_latency, uint16_t continuation_number, 43 uint16_t supervision_timeout) = 0; 44 }; 45 46 } // namespace acl_manager 47 } // namespace hci 48 } // namespace bluetooth 49