1 /* 2 * Copyright 2020 HIMSA II K/S - www.himsa.com. 3 * Represented by EHIMA - www.ehima.com 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 #pragma once 19 20 #include <gmock/gmock.h> 21 22 #include "stack/include/btm_iso_api.h" 23 24 struct MockIsoManager { 25 public: 26 static MockIsoManager* GetInstance(); 27 28 MockIsoManager() = default; 29 MockIsoManager(const MockIsoManager&) = delete; 30 MockIsoManager& operator=(const MockIsoManager&) = delete; 31 32 virtual ~MockIsoManager() = default; 33 34 MOCK_METHOD((void), RegisterCigCallbacks, (bluetooth::hci::iso_manager::CigCallbacks * callbacks), 35 (const)); 36 MOCK_METHOD((void), RegisterBigCallbacks, (bluetooth::hci::iso_manager::BigCallbacks * callbacks), 37 (const)); 38 MOCK_METHOD((void), RegisterOnIsoTrafficActiveCallbacks, (void callbacks(bool)), (const)); 39 MOCK_METHOD((void), CreateCig, 40 (uint8_t cig_id, struct bluetooth::hci::iso_manager::cig_create_params cig_params)); 41 MOCK_METHOD((void), ReconfigureCig, 42 (uint8_t cig_id, struct bluetooth::hci::iso_manager::cig_create_params cig_params)); 43 MOCK_METHOD((void), RemoveCig, (uint8_t cig_id, bool force)); 44 MOCK_METHOD((void), EstablishCis, 45 (struct bluetooth::hci::iso_manager::cis_establish_params conn_params)); 46 MOCK_METHOD((void), DisconnectCis, (uint16_t cis_handle, uint8_t reason)); 47 MOCK_METHOD((int), GetNumberOfActiveIso, ()); 48 MOCK_METHOD((void), SetupIsoDataPath, 49 (uint16_t iso_handle, 50 struct bluetooth::hci::iso_manager::iso_data_path_params path_params)); 51 MOCK_METHOD((void), RemoveIsoDataPath, (uint16_t iso_handle, uint8_t data_path_dir)); 52 MOCK_METHOD((void), SendIsoData, (uint16_t iso_handle, const uint8_t* data, uint16_t data_len)); 53 MOCK_METHOD((void), ReadIsoLinkQuality, (uint16_t iso_handle)); 54 MOCK_METHOD((void), CreateBig, 55 (uint8_t big_id, struct bluetooth::hci::iso_manager::big_create_params big_params)); 56 MOCK_METHOD((void), TerminateBig, (uint8_t big_id, uint8_t reason)); 57 MOCK_METHOD((void), HandleIsoData, (void* p_msg)); 58 MOCK_METHOD((void), HandleDisconnect, (uint16_t handle, uint8_t reason)); 59 MOCK_METHOD((void), HandleNumComplDataPkts, (uint16_t handle, uint16_t credits)); 60 MOCK_METHOD((void), HandleHciEvent, (uint8_t sub_code, uint8_t* params, uint16_t length)); 61 62 MOCK_METHOD((void), Start, ()); 63 MOCK_METHOD((void), Stop, ()); 64 }; 65