• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:30
20  */
21 
22 #include <base/functional/bind.h>
23 #include <base/functional/callback.h>
24 
25 #include "bta/gatt/bta_gattc_int.h"
26 #include "bta/gatt/database.h"
27 #include "bta/include/bta_gatt_api.h"
28 #include "stack/include/gatt_api.h"
29 #include "test/common/mock_functions.h"
30 #include "types/bluetooth/uuid.h"
31 #include "types/bt_transport.h"
32 #include "types/raw_address.h"
33 
BTA_GATTC_Disable(void)34 void BTA_GATTC_Disable(void) { inc_func_call_count(__func__); }
BTA_GATTC_GetCharacteristic(uint16_t,uint16_t)35 const gatt::Characteristic* BTA_GATTC_GetCharacteristic(uint16_t /* conn_id */,
36                                                         uint16_t /* handle */) {
37   inc_func_call_count(__func__);
38   return nullptr;
39 }
BTA_GATTC_GetOwningCharacteristic(uint16_t,uint16_t)40 const gatt::Characteristic* BTA_GATTC_GetOwningCharacteristic(uint16_t /* conn_id */,
41                                                               uint16_t /* handle */) {
42   inc_func_call_count(__func__);
43   return nullptr;
44 }
BTA_GATTC_GetDescriptor(uint16_t,uint16_t)45 const gatt::Descriptor* BTA_GATTC_GetDescriptor(uint16_t /* conn_id */, uint16_t /* handle */) {
46   inc_func_call_count(__func__);
47   return nullptr;
48 }
BTA_GATTC_GetOwningService(uint16_t,uint16_t)49 const gatt::Service* BTA_GATTC_GetOwningService(uint16_t /* conn_id */, uint16_t /* handle */) {
50   inc_func_call_count(__func__);
51   return nullptr;
52 }
BTA_GATTC_GetServices(uint16_t)53 const std::list<gatt::Service>* BTA_GATTC_GetServices(uint16_t /* conn_id */) {
54   inc_func_call_count(__func__);
55   return nullptr;
56 }
BTA_GATTC_DeregisterForNotifications(tGATT_IF,const RawAddress &,uint16_t)57 tGATT_STATUS BTA_GATTC_DeregisterForNotifications(tGATT_IF /* client_if */,
58                                                   const RawAddress& /* bda */,
59                                                   uint16_t /* handle */) {
60   inc_func_call_count(__func__);
61   return GATT_SUCCESS;
62 }
BTA_GATTC_RegisterForNotifications(tGATT_IF,const RawAddress &,uint16_t)63 tGATT_STATUS BTA_GATTC_RegisterForNotifications(tGATT_IF /* client_if */,
64                                                 const RawAddress& /* bda */,
65                                                 uint16_t /* handle */) {
66   inc_func_call_count(__func__);
67   return GATT_SUCCESS;
68 }
BTA_GATTC_AppDeregister(tGATT_IF)69 void BTA_GATTC_AppDeregister(tGATT_IF /* client_if */) { inc_func_call_count(__func__); }
BTA_GATTC_AppRegister(const std::string &,tBTA_GATTC_CBACK *,BtaAppRegisterCallback,bool)70 void BTA_GATTC_AppRegister(const std::string& /* name */, tBTA_GATTC_CBACK* /* p_client_cb */,
71                            BtaAppRegisterCallback /* cb */, bool /* eatt_support */) {
72   inc_func_call_count(__func__);
73 }
BTA_GATTC_CancelOpen(tGATT_IF,const RawAddress &,bool)74 void BTA_GATTC_CancelOpen(tGATT_IF /* client_if */, const RawAddress& /* remote_bda */,
75                           bool /* is_direct */) {
76   inc_func_call_count(__func__);
77 }
BTA_GATTC_Close(uint16_t)78 void BTA_GATTC_Close(uint16_t /* conn_id */) { inc_func_call_count(__func__); }
BTA_GATTC_ConfigureMTU(uint16_t,uint16_t)79 void BTA_GATTC_ConfigureMTU(uint16_t /* conn_id */, uint16_t /* mtu */) {
80   inc_func_call_count(__func__);
81 }
BTA_GATTC_ConfigureMTU(uint16_t,uint16_t,GATT_CONFIGURE_MTU_OP_CB,void *)82 void BTA_GATTC_ConfigureMTU(uint16_t /* conn_id */, uint16_t /* mtu */,
83                             GATT_CONFIGURE_MTU_OP_CB /* callback */, void* /* cb_data */) {
84   inc_func_call_count(__func__);
85 }
BTA_GATTC_DiscoverServiceByUuid(uint16_t,const bluetooth::Uuid &)86 void BTA_GATTC_DiscoverServiceByUuid(uint16_t /* conn_id */,
87                                      const bluetooth::Uuid& /* srvc_uuid */) {
88   inc_func_call_count(__func__);
89 }
BTA_GATTC_ExecuteWrite(uint16_t,bool)90 void BTA_GATTC_ExecuteWrite(uint16_t /* conn_id */, bool /* is_execute */) {
91   inc_func_call_count(__func__);
92 }
BTA_GATTC_GetGattDb(uint16_t,uint16_t,uint16_t,btgatt_db_element_t **,int *)93 void BTA_GATTC_GetGattDb(uint16_t /* conn_id */, uint16_t /* start_handle */,
94                          uint16_t /* end_handle */, btgatt_db_element_t** /* db */,
95                          int* /* count */) {
96   inc_func_call_count(__func__);
97 }
BTA_GATTC_Open(tGATT_IF,const RawAddress &,tBTM_BLE_CONN_TYPE,bool)98 void BTA_GATTC_Open(tGATT_IF /* client_if */, const RawAddress& /* remote_bda */,
99                     tBTM_BLE_CONN_TYPE /* connection_type */, bool /* opportunistic */) {
100   inc_func_call_count(__func__);
101 }
BTA_GATTC_Open(tGATT_IF,const RawAddress &,tBLE_ADDR_TYPE,tBTM_BLE_CONN_TYPE,tBT_TRANSPORT,bool,uint8_t,uint16_t)102 void BTA_GATTC_Open(tGATT_IF /* client_if */, const RawAddress& /* remote_bda */,
103                     tBLE_ADDR_TYPE /* addr_type */, tBTM_BLE_CONN_TYPE /* connection_type */,
104                     tBT_TRANSPORT /* transport */, bool /* opportunistic */,
105                     uint8_t /* initiating_phys */, uint16_t /* preferred_mtu */) {
106   inc_func_call_count(__func__);
107 }
BTA_GATTC_PrepareWrite(uint16_t,uint16_t,uint16_t,std::vector<uint8_t>,tGATT_AUTH_REQ,GATT_WRITE_OP_CB,void *)108 void BTA_GATTC_PrepareWrite(uint16_t /* conn_id */, uint16_t /* handle */, uint16_t /* offset */,
109                             std::vector<uint8_t> /* value */, tGATT_AUTH_REQ /* auth_req */,
110                             GATT_WRITE_OP_CB /* callback */, void* /* cb_data */) {
111   inc_func_call_count(__func__);
112 }
BTA_GATTC_ReadCharDescr(uint16_t,uint16_t,tGATT_AUTH_REQ,GATT_READ_OP_CB,void *)113 void BTA_GATTC_ReadCharDescr(uint16_t /* conn_id */, uint16_t /* handle */,
114                              tGATT_AUTH_REQ /* auth_req */, GATT_READ_OP_CB /* callback */,
115                              void* /* cb_data */) {
116   inc_func_call_count(__func__);
117 }
BTA_GATTC_ReadCharacteristic(uint16_t,uint16_t,tGATT_AUTH_REQ,GATT_READ_OP_CB,void *)118 void BTA_GATTC_ReadCharacteristic(uint16_t /* conn_id */, uint16_t /* handle */,
119                                   tGATT_AUTH_REQ /* auth_req */, GATT_READ_OP_CB /* callback */,
120                                   void* /* cb_data */) {
121   inc_func_call_count(__func__);
122 }
BTA_GATTC_ReadMultiple(uint16_t,tBTA_GATTC_MULTI &,bool,tGATT_AUTH_REQ,GATT_READ_MULTI_OP_CB,void *)123 void BTA_GATTC_ReadMultiple(uint16_t /* conn_id */, tBTA_GATTC_MULTI& /* handles */,
124                             bool /* variable_len */, tGATT_AUTH_REQ /* auth_req */,
125                             GATT_READ_MULTI_OP_CB /* callback */, void* /* cb_data */) {
126   inc_func_call_count(__func__);
127 }
BTA_GATTC_ReadUsingCharUuid(uint16_t,const bluetooth::Uuid &,uint16_t,uint16_t,tGATT_AUTH_REQ,GATT_READ_OP_CB,void *)128 void BTA_GATTC_ReadUsingCharUuid(uint16_t /* conn_id */, const bluetooth::Uuid& /* uuid */,
129                                  uint16_t /* s_handle */, uint16_t /* e_handle */,
130                                  tGATT_AUTH_REQ /* auth_req */, GATT_READ_OP_CB /* callback */,
131                                  void* /* cb_data */) {
132   inc_func_call_count(__func__);
133 }
BTA_GATTC_Refresh(const RawAddress &)134 void BTA_GATTC_Refresh(const RawAddress& /* remote_bda */) { inc_func_call_count(__func__); }
BTA_GATTC_SendIndConfirm(uint16_t,uint16_t)135 void BTA_GATTC_SendIndConfirm(uint16_t /* conn_id */, uint16_t /* cid */) {
136   inc_func_call_count(__func__);
137 }
BTA_GATTC_ServiceSearchAllRequest(uint16_t)138 void BTA_GATTC_ServiceSearchAllRequest(uint16_t /* conn_id */) { inc_func_call_count(__func__); }
BTA_GATTC_ServiceSearchRequest(uint16_t,bluetooth::Uuid)139 void BTA_GATTC_ServiceSearchRequest(uint16_t /* conn_id */, bluetooth::Uuid /* p_srvc_uuid */) {
140   inc_func_call_count(__func__);
141 }
BTA_GATTC_WriteCharDescr(uint16_t,uint16_t,std::vector<uint8_t>,tGATT_AUTH_REQ,GATT_WRITE_OP_CB,void *)142 void BTA_GATTC_WriteCharDescr(uint16_t /* conn_id */, uint16_t /* handle */,
143                               std::vector<uint8_t> /* value */, tGATT_AUTH_REQ /* auth_req */,
144                               GATT_WRITE_OP_CB /* callback */, void* /* cb_data */) {
145   inc_func_call_count(__func__);
146 }
BTA_GATTC_WriteCharValue(uint16_t,uint16_t,tGATT_WRITE_TYPE,std::vector<uint8_t>,tGATT_AUTH_REQ,GATT_WRITE_OP_CB,void *)147 void BTA_GATTC_WriteCharValue(uint16_t /* conn_id */, uint16_t /* handle */,
148                               tGATT_WRITE_TYPE /* write_type */, std::vector<uint8_t> /* value */,
149                               tGATT_AUTH_REQ /* auth_req */, GATT_WRITE_OP_CB /* callback */,
150                               void* /* cb_data */) {
151   inc_func_call_count(__func__);
152 }
bta_gattc_continue_discovery_if_needed(const RawAddress &,uint16_t)153 void bta_gattc_continue_discovery_if_needed(const RawAddress& /* bd_addr */,
154                                             uint16_t /* acl_handle */) {
155   inc_func_call_count(__func__);
156 }
bta_gatt_client_dump(int)157 void bta_gatt_client_dump(int /* fd */) { inc_func_call_count(__func__); }
158