• 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:1
20  *
21  *  mockcify.pl ver 0.2
22  */
23 
24 #include <map>
25 #include <string>
26 
27 #include "test/common/mock_functions.h"
28 
29 // Original included files, if any
30 // NOTE: Since this is a mock file with mock definitions some number of
31 //       include files may not be required.  The include-what-you-use
32 //       still applies, but crafting proper inclusion is out of scope
33 //       for this effort.  This compilation unit may compile as-is, or
34 //       may need attention to prune the inclusion set.
35 
36 #include "btcore/include/device_features.h"
37 
38 // Mocked compile conditionals, if any
39 #ifndef UNUSED_ATTR
40 #define UNUSED_ATTR
41 #endif
42 
43 namespace test {
44 namespace mock {
45 namespace device_controller {
46 
47 constexpr size_t HCI_SUPPORTED_COMMANDS_ARRAY_SIZE = 64;
48 constexpr size_t MAX_FEATURES_CLASSIC_PAGE_COUNT = 3;
49 constexpr size_t BLE_SUPPORTED_STATES_SIZE = 8;
50 constexpr size_t MAX_LOCAL_SUPPORTED_CODECS_SIZE = 8;
51 
52 // Shared state between mocked functions and tests
53 extern uint8_t supported_commands[HCI_SUPPORTED_COMMANDS_ARRAY_SIZE];
54 extern bt_device_features_t features_classic[MAX_FEATURES_CLASSIC_PAGE_COUNT];
55 extern uint8_t last_features_classic_page_index;
56 
57 extern uint16_t acl_data_size_classic;
58 extern uint16_t acl_data_size_ble;
59 extern uint16_t iso_data_size;
60 
61 extern uint16_t acl_buffer_count_classic;
62 extern uint8_t acl_buffer_count_ble;
63 extern uint8_t iso_buffer_count;
64 
65 extern uint8_t ble_acceptlist_size;
66 extern uint8_t ble_resolving_list_max_size;
67 extern uint8_t ble_supported_states[BLE_SUPPORTED_STATES_SIZE];
68 extern bt_device_features_t features_ble;
69 extern uint16_t ble_suggested_default_data_length;
70 extern uint16_t ble_supported_max_tx_octets;
71 extern uint16_t ble_supported_max_tx_time;
72 extern uint16_t ble_supported_max_rx_octets;
73 extern uint16_t ble_supported_max_rx_time;
74 
75 extern uint16_t ble_maxium_advertising_data_length;
76 extern uint8_t ble_number_of_supported_advertising_sets;
77 extern uint8_t ble_periodic_advertiser_list_size;
78 extern uint8_t local_supported_codecs[MAX_LOCAL_SUPPORTED_CODECS_SIZE];
79 extern uint8_t number_of_local_supported_codecs;
80 
81 extern bool readable;
82 extern bool ble_supported;
83 extern bool iso_supported;
84 extern bool simple_pairing_supported;
85 extern bool secure_connections_supported;
86 
87 }  // namespace device_controller
88 }  // namespace mock
89 }  // namespace test
90 
91 // END mockcify generation
92