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:7
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/logging.h>
29 #include <base/run_loop.h>
30 #include <base/threading/thread.h>
31 #include <pthread.h>
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include <string.h>
35 #include "bta/sys/bta_sys.h"
36 #include "btcore/include/module.h"
37 #include "bte.h"
38 #include "btif/include/btif_common.h"
39 #include "btm_iso_api.h"
40 #include "common/message_loop_thread.h"
41 #include "osi/include/log.h"
42 #include "osi/include/osi.h"
43 #include "stack/include/acl_hci_link_interface.h"
44 #include "stack/include/btu.h"
45
46 #ifndef UNUSED_ATTR
47 #define UNUSED_ATTR
48 #endif
49
get_main_thread()50 bluetooth::common::MessageLoopThread* get_main_thread() {
51 mock_function_count_map[__func__]++;
52 return nullptr;
53 }
do_in_main_thread(const base::Location & from_here,base::OnceClosure task)54 bt_status_t do_in_main_thread(const base::Location& from_here,
55 base::OnceClosure task) {
56 mock_function_count_map[__func__]++;
57 return BT_STATUS_SUCCESS;
58 }
do_in_main_thread_delayed(const base::Location & from_here,base::OnceClosure task,const base::TimeDelta & delay)59 bt_status_t do_in_main_thread_delayed(const base::Location& from_here,
60 base::OnceClosure task,
61 const base::TimeDelta& delay) {
62 mock_function_count_map[__func__]++;
63 return BT_STATUS_SUCCESS;
64 }
btu_hci_msg_process(BT_HDR * p_msg)65 void btu_hci_msg_process(BT_HDR* p_msg) { mock_function_count_map[__func__]++; }
main_thread_shut_down()66 void main_thread_shut_down() { mock_function_count_map[__func__]++; }
main_thread_start_up()67 void main_thread_start_up() { mock_function_count_map[__func__]++; }
post_on_bt_main(BtMainClosure closure)68 void post_on_bt_main(BtMainClosure closure) {
69 mock_function_count_map[__func__]++;
70 }
71