1 /*
2  * Copyright 2020 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:27
20  */
21 
22 #include <base/functional/bind.h>
23 
24 #include <cstdint>
25 
26 #include "btif/include/btif_common.h"
27 #include "include/hardware/bluetooth.h"
28 #include "test/common/jni_thread.h"
29 #include "test/common/mock_functions.h"
30 
31 // TODO(b/369381361) Enfore -Wmissing-prototypes
32 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
33 
is_on_jni_thread()34 bool is_on_jni_thread() {
35   inc_func_call_count(__func__);
36   return false;
37 }
btif_transfer_context(tBTIF_CBACK *,uint16_t,char *,int,tBTIF_COPY_CBACK *)38 bt_status_t btif_transfer_context(tBTIF_CBACK* /* p_cback */, uint16_t /* event */,
39                                   char* /* p_params */, int /* param_len */,
40                                   tBTIF_COPY_CBACK* /* p_copy_cback */) {
41   inc_func_call_count(__func__);
42   return BT_STATUS_SUCCESS;
43 }
do_in_jni_thread(base::OnceClosure task)44 bt_status_t do_in_jni_thread(base::OnceClosure task) {
45   inc_func_call_count(__func__);
46   do_in_jni_thread_task_queue.push(std::move(task));
47   return BT_STATUS_SUCCESS;
48 }
do_in_jni_thread(const base::Location &,base::OnceClosure task)49 bt_status_t do_in_jni_thread(const base::Location& /* from_here */, base::OnceClosure task) {
50   inc_func_call_count(__func__);
51   do_in_jni_thread_task_queue.push(std::move(task));
52   return BT_STATUS_SUCCESS;
53 }
54