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