1 /*
2 * Copyright 2021 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 /*
18 * Generated mock file from original source file
19 * Functions generated:12
20 */
21
22 #include <map>
23 #include <string>
24
25 extern std::map<std::string, int> mock_function_count_map;
26
27 #include <map>
28 #include <vector>
29
30 #include "bta/vc/devices.h"
31
32 using namespace bluetooth::vc::internal;
33
34 #ifndef UNUSED_ATTR
35 #define UNUSED_ATTR
36 #endif
37
EnableEncryption()38 void VolumeControlDevice::EnableEncryption() {
39 mock_function_count_map[__func__]++;
40 }
EnqueueInitialRequests(tGATT_IF gatt_if,GATT_READ_OP_CB chrc_read_cb,GATT_WRITE_OP_CB cccd_write_cb)41 bool VolumeControlDevice::EnqueueInitialRequests(
42 tGATT_IF gatt_if, GATT_READ_OP_CB chrc_read_cb,
43 GATT_WRITE_OP_CB cccd_write_cb) {
44 mock_function_count_map[__func__]++;
45 return false;
46 }
IsEncryptionEnabled()47 bool VolumeControlDevice::IsEncryptionEnabled() {
48 mock_function_count_map[__func__]++;
49 return false;
50 }
UpdateHandles(void)51 bool VolumeControlDevice::UpdateHandles(void) {
52 mock_function_count_map[__func__]++;
53 return false;
54 }
VerifyReady(uint16_t handle)55 bool VolumeControlDevice::VerifyReady(uint16_t handle) {
56 mock_function_count_map[__func__]++;
57 return false;
58 }
set_volume_control_service_handles(const gatt::Service & service)59 bool VolumeControlDevice::set_volume_control_service_handles(
60 const gatt::Service& service) {
61 mock_function_count_map[__func__]++;
62 return false;
63 }
set_volume_offset_control_service_handles(const gatt::Service & service)64 void VolumeControlDevice::set_volume_offset_control_service_handles(
65 const gatt::Service& service) {
66 mock_function_count_map[__func__]++;
67 }
subscribe_for_notifications(tGATT_IF gatt_if,uint16_t handle,uint16_t ccc_handle,GATT_WRITE_OP_CB cb)68 bool VolumeControlDevice::subscribe_for_notifications(tGATT_IF gatt_if,
69 uint16_t handle,
70 uint16_t ccc_handle,
71 GATT_WRITE_OP_CB cb) {
72 mock_function_count_map[__func__]++;
73 return false;
74 }
find_ccc_handle(uint16_t chrc_handle)75 uint16_t VolumeControlDevice::find_ccc_handle(uint16_t chrc_handle) {
76 mock_function_count_map[__func__]++;
77 return 0;
78 }
ControlPointOperation(uint8_t opcode,const std::vector<uint8_t> * arg,GATT_WRITE_OP_CB cb,void * cb_data)79 void VolumeControlDevice::ControlPointOperation(uint8_t opcode,
80 const std::vector<uint8_t>* arg,
81 GATT_WRITE_OP_CB cb,
82 void* cb_data) {
83 mock_function_count_map[__func__]++;
84 }
Disconnect(tGATT_IF gatt_if)85 void VolumeControlDevice::Disconnect(tGATT_IF gatt_if) {
86 mock_function_count_map[__func__]++;
87 }
EnqueueRemainingRequests(tGATT_IF gatt_if,GATT_READ_OP_CB chrc_read_cb,GATT_WRITE_OP_CB cccd_write_cb)88 void VolumeControlDevice::EnqueueRemainingRequests(
89 tGATT_IF gatt_if, GATT_READ_OP_CB chrc_read_cb,
90 GATT_WRITE_OP_CB cccd_write_cb) {
91 mock_function_count_map[__func__]++;
92 }
ResetHandles(void)93 void VolumeControlDevice::ResetHandles(void) {
94 mock_function_count_map[__func__]++;
95 }
96