1 /* 2 * Copyright 2023 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 <gmock/gmock.h> 20 21 #include <cstdint> 22 23 #include "hci/acl_manager/le_connection_management_callbacks.h" 24 #include "hci/hci_packets.h" 25 26 namespace bluetooth { 27 namespace hci { 28 namespace acl_manager { 29 30 class MockLeConnectionManagementCallbacks : public LeConnectionManagementCallbacks { 31 public: 32 MOCK_METHOD( 33 void, 34 OnConnectionUpdate, 35 (hci::ErrorCode hci_status, 36 uint16_t connection_interval, 37 uint16_t connection_latency, 38 uint16_t supervision_timeout), 39 (override)); 40 MOCK_METHOD( 41 void, 42 OnDataLengthChange, 43 (uint16_t tx_octets, uint16_t tx_time, uint16_t rx_octets, uint16_t rx_time), 44 (override)); 45 MOCK_METHOD(void, OnDisconnection, (ErrorCode reason), (override)); 46 MOCK_METHOD( 47 void, 48 OnReadRemoteVersionInformationComplete, 49 (hci::ErrorCode hci_status, 50 uint8_t lmp_version, 51 uint16_t manufacturer_name, 52 uint16_t sub_version), 53 (override)); 54 MOCK_METHOD( 55 void, 56 OnLeReadRemoteFeaturesComplete, 57 (hci::ErrorCode hci_status, uint64_t features), 58 (override)); 59 MOCK_METHOD( 60 void, OnPhyUpdate, (hci::ErrorCode hci_status, uint8_t tx_phy, uint8_t rx_phy), (override)); 61 MOCK_METHOD( 62 void, 63 OnLeSubrateChange, 64 (hci::ErrorCode hci_status, 65 uint16_t subrate_factor, 66 uint16_t peripheral_latency, 67 uint16_t continuation_number, 68 uint16_t supervision_timeout), 69 (override)); 70 }; 71 72 } // namespace acl_manager 73 } // namespace hci 74 } // namespace bluetooth 75