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, 35 (bluetooth::hci::iso_manager::CigCallbacks * callbacks), (const)); 36 MOCK_METHOD((void), RegisterBigCallbacks, 37 (bluetooth::hci::iso_manager::BigCallbacks * callbacks), (const)); 38 MOCK_METHOD((void), RegisterOnIsoTrafficActiveCallbacks, 39 (void callbacks(bool)), (const)); 40 MOCK_METHOD( 41 (void), CreateCig, 42 (uint8_t cig_id, 43 struct bluetooth::hci::iso_manager::cig_create_params cig_params)); 44 MOCK_METHOD( 45 (void), ReconfigureCig, 46 (uint8_t cig_id, 47 struct bluetooth::hci::iso_manager::cig_create_params cig_params)); 48 MOCK_METHOD((void), RemoveCig, (uint8_t cig_id, bool force)); 49 MOCK_METHOD( 50 (void), EstablishCis, 51 (struct bluetooth::hci::iso_manager::cis_establish_params conn_params)); 52 MOCK_METHOD((void), DisconnectCis, (uint16_t cis_handle, uint8_t reason)); 53 MOCK_METHOD( 54 (void), SetupIsoDataPath, 55 (uint16_t iso_handle, 56 struct bluetooth::hci::iso_manager::iso_data_path_params path_params)); 57 MOCK_METHOD((void), RemoveIsoDataPath, 58 (uint16_t iso_handle, uint8_t data_path_dir)); 59 MOCK_METHOD((void), SendIsoData, 60 (uint16_t iso_handle, const uint8_t* data, uint16_t data_len)); 61 MOCK_METHOD((void), ReadIsoLinkQuality, (uint16_t iso_handle)); 62 MOCK_METHOD( 63 (void), CreateBig, 64 (uint8_t big_id, 65 struct bluetooth::hci::iso_manager::big_create_params big_params)); 66 MOCK_METHOD((void), TerminateBig, (uint8_t big_id, uint8_t reason)); 67 MOCK_METHOD((void), HandleIsoData, (void* p_msg)); 68 MOCK_METHOD((void), HandleDisconnect, (uint16_t handle, uint8_t reason)); 69 MOCK_METHOD((void), HandleNumComplDataPkts, 70 (uint16_t handle, uint16_t credits)); 71 MOCK_METHOD((void), HandleHciEvent, 72 (uint8_t sub_code, uint8_t* params, uint16_t length)); 73 74 MOCK_METHOD((void), Start, ()); 75 MOCK_METHOD((void), Stop, ()); 76 }; 77