• 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:3
20  *
21  *  mockcify.pl ver 0.2
22  */
23 
24 #include <cstdint>
25 #include <functional>
26 #include <map>
27 #include <string>
28 
29 extern std::map<std::string, int> mock_function_count_map;
30 
31 // Original included files, if any
32 // NOTE: Since this is a mock file with mock definitions some number of
33 //       include files may not be required.  The include-what-you-use
34 //       still applies, but crafting proper inclusion is out of scope
35 //       for this effort.  This compilation unit may compile as-is, or
36 //       may need attention to prune the inclusion set.
37 #include <base/logging.h>
38 #include <hardware/bluetooth.h>
39 
40 #include "btcore/include/module.h"
41 #include "btif/include/btif_config.h"
42 #include "hci/include/hci_layer.h"
43 #include "main/shim/hci_layer.h"
44 #include "main/shim/shim.h"
45 #include "osi/include/log.h"
46 #include "osi/include/osi.h"
47 #include "stack/include/bt_hdr.h"
48 #include "stack_config.h"
49 
50 // Mocked compile conditionals, if any
51 #ifndef UNUSED_ATTR
52 #define UNUSED_ATTR
53 #endif
54 
55 namespace test {
56 namespace mock {
57 namespace main_bte {
58 
59 // Shared state between mocked functions and tests
60 // Name: bte_main_init
61 // Params: void
62 // Returns: void
63 struct bte_main_init {
64   std::function<void(void)> body{[](void) {}};
operatorbte_main_init65   void operator()(void) { body(); };
66 };
67 extern struct bte_main_init bte_main_init;
68 // Name: bte_main_hci_send
69 // Params: BT_HDR* p_msg, uint16_t event
70 // Returns: void
71 struct bte_main_hci_send {
72   std::function<void(BT_HDR* p_msg, uint16_t event)> body{
73       [](BT_HDR* p_msg, uint16_t event) {}};
operatorbte_main_hci_send74   void operator()(BT_HDR* p_msg, uint16_t event) { body(p_msg, event); };
75 };
76 extern struct bte_main_hci_send bte_main_hci_send;
77 
78 }  // namespace main_bte
79 }  // namespace mock
80 }  // namespace test
81 
82 // END mockcify generation
83