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