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:13
20 */
21
22 #include <map>
23 #include <string>
24
25 extern std::map<std::string, int> mock_function_count_map;
26
27 #include <base/bind.h>
28 #include <base/location.h>
29 #include <cstdint>
30 #include <memory>
31 #include <vector>
32 #include "bt_target.h"
33 #include "bta/gatt/bta_gatts_int.h"
34 #include "osi/include/allocator.h"
35 #include "stack/include/btu.h"
36 #include "types/bluetooth/uuid.h"
37 #include "types/bt_transport.h"
38 #include "types/raw_address.h"
39
40 #ifndef UNUSED_ATTR
41 #define UNUSED_ATTR
42 #endif
43
BTA_GATTS_Disable(void)44 void BTA_GATTS_Disable(void) { mock_function_count_map[__func__]++; }
BTA_GATTS_AppDeregister(tGATT_IF server_if)45 void BTA_GATTS_AppDeregister(tGATT_IF server_if) {
46 mock_function_count_map[__func__]++;
47 }
BTA_GATTS_AppRegister(const bluetooth::Uuid & app_uuid,tBTA_GATTS_CBACK * p_cback,bool eatt_support)48 void BTA_GATTS_AppRegister(const bluetooth::Uuid& app_uuid,
49 tBTA_GATTS_CBACK* p_cback, bool eatt_support) {
50 mock_function_count_map[__func__]++;
51 }
BTA_GATTS_CancelOpen(tGATT_IF server_if,const RawAddress & remote_bda,bool is_direct)52 void BTA_GATTS_CancelOpen(tGATT_IF server_if, const RawAddress& remote_bda,
53 bool is_direct) {
54 mock_function_count_map[__func__]++;
55 }
BTA_GATTS_Close(uint16_t conn_id)56 void BTA_GATTS_Close(uint16_t conn_id) { mock_function_count_map[__func__]++; }
BTA_GATTS_AddService(tGATT_IF server_if,std::vector<btgatt_db_element_t> service,BTA_GATTS_AddServiceCb cb)57 void BTA_GATTS_AddService(tGATT_IF server_if,
58 std::vector<btgatt_db_element_t> service,
59 BTA_GATTS_AddServiceCb cb) {
60 mock_function_count_map[__func__]++;
61 }
BTA_GATTS_DeleteService(uint16_t service_id)62 void BTA_GATTS_DeleteService(uint16_t service_id) {
63 mock_function_count_map[__func__]++;
64 }
BTA_GATTS_HandleValueIndication(uint16_t conn_id,uint16_t attr_id,std::vector<uint8_t> value,bool need_confirm)65 void BTA_GATTS_HandleValueIndication(uint16_t conn_id, uint16_t attr_id,
66 std::vector<uint8_t> value,
67 bool need_confirm) {
68 mock_function_count_map[__func__]++;
69 }
BTA_GATTS_Open(tGATT_IF server_if,const RawAddress & remote_bda,bool is_direct,tBT_TRANSPORT transport)70 void BTA_GATTS_Open(tGATT_IF server_if, const RawAddress& remote_bda,
71 bool is_direct, tBT_TRANSPORT transport) {
72 mock_function_count_map[__func__]++;
73 }
BTA_GATTS_SendRsp(uint16_t conn_id,uint32_t trans_id,tGATT_STATUS status,tGATTS_RSP * p_msg)74 void BTA_GATTS_SendRsp(uint16_t conn_id, uint32_t trans_id, tGATT_STATUS status,
75 tGATTS_RSP* p_msg) {
76 mock_function_count_map[__func__]++;
77 }
BTA_GATTS_StopService(uint16_t service_id)78 void BTA_GATTS_StopService(uint16_t service_id) {
79 mock_function_count_map[__func__]++;
80 }
bta_gatts_add_service_impl(tGATT_IF server_if,std::vector<btgatt_db_element_t> service,BTA_GATTS_AddServiceCb cb)81 void bta_gatts_add_service_impl(tGATT_IF server_if,
82 std::vector<btgatt_db_element_t> service,
83 BTA_GATTS_AddServiceCb cb) {
84 mock_function_count_map[__func__]++;
85 }
86