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(void, OnConnectionUpdate, 33 (hci::ErrorCode hci_status, uint16_t connection_interval, uint16_t connection_latency, 34 uint16_t supervision_timeout), 35 (override)); 36 MOCK_METHOD(void, OnParameterUpdateRequest, 37 (uint16_t interval_min, uint16_t interval_max, uint16_t latency, 38 uint16_t supervision_timeout), 39 (override)); 40 MOCK_METHOD(void, OnDataLengthChange, 41 (uint16_t tx_octets, uint16_t tx_time, uint16_t rx_octets, uint16_t rx_time), 42 (override)); 43 MOCK_METHOD(void, OnDisconnection, (ErrorCode reason), (override)); 44 MOCK_METHOD(void, OnReadRemoteVersionInformationComplete, 45 (hci::ErrorCode hci_status, uint8_t lmp_version, uint16_t manufacturer_name, 46 uint16_t sub_version), 47 (override)); 48 MOCK_METHOD(void, OnLeReadRemoteFeaturesComplete, (hci::ErrorCode hci_status, uint64_t features), 49 (override)); 50 MOCK_METHOD(void, OnPhyUpdate, (hci::ErrorCode hci_status, uint8_t tx_phy, uint8_t rx_phy), 51 (override)); 52 MOCK_METHOD(void, OnLeSubrateChange, 53 (hci::ErrorCode hci_status, uint16_t subrate_factor, uint16_t peripheral_latency, 54 uint16_t continuation_number, uint16_t supervision_timeout), 55 (override)); 56 }; 57 58 } // namespace acl_manager 59 } // namespace hci 60 } // namespace bluetooth 61