• 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 #include <cstdint>
18 
19 #include "btif/include/stack_manager_t.h"
20 #include "hardware/bluetooth.h"
21 #include "stack/include/bt_octets.h"
22 #include "types/raw_address.h"
23 
invoke_adapter_state_changed_cb(bt_state_t)24 void invoke_adapter_state_changed_cb(bt_state_t /* state */) {}
invoke_adapter_properties_cb(bt_status_t,int,bt_property_t *)25 void invoke_adapter_properties_cb(bt_status_t /* status */,
26                                   int /* num_properties */,
27                                   bt_property_t* /* properties */) {}
invoke_remote_device_properties_cb(bt_status_t,RawAddress,int,bt_property_t *)28 void invoke_remote_device_properties_cb(bt_status_t /* status */,
29                                         RawAddress /* bd_addr */,
30                                         int /* num_properties */,
31                                         bt_property_t* /* properties */) {}
invoke_device_found_cb(int,bt_property_t *)32 void invoke_device_found_cb(int /* num_properties */,
33                             bt_property_t* /* properties */) {}
invoke_discovery_state_changed_cb(bt_discovery_state_t)34 void invoke_discovery_state_changed_cb(bt_discovery_state_t /* state */) {}
invoke_pin_request_cb(RawAddress,bt_bdname_t,uint32_t,bool)35 void invoke_pin_request_cb(RawAddress /* bd_addr */, bt_bdname_t /* bd_name */,
36                            uint32_t /* cod */, bool /* min_16_digit */) {}
invoke_ssp_request_cb(RawAddress,bt_ssp_variant_t,uint32_t)37 void invoke_ssp_request_cb(RawAddress /* bd_addr */,
38                            bt_ssp_variant_t /* pairing_variant */,
39                            uint32_t /* pass_key */) {}
invoke_oob_data_request_cb(tBT_TRANSPORT,bool,Octet16,Octet16,RawAddress,uint8_t)40 void invoke_oob_data_request_cb(tBT_TRANSPORT /* t */, bool /* valid */,
41                                 Octet16 /* c */, Octet16 /* r */,
42                                 RawAddress /* raw_address */,
43                                 uint8_t /* address_type */) {}
invoke_bond_state_changed_cb(bt_status_t,RawAddress,bt_bond_state_t,int)44 void invoke_bond_state_changed_cb(bt_status_t /* status */,
45                                   RawAddress /* bd_addr */,
46                                   bt_bond_state_t /* state */,
47                                   int /* fail_reason */) {}
invoke_address_consolidate_cb(RawAddress,RawAddress)48 void invoke_address_consolidate_cb(RawAddress /* main_bd_addr */,
49                                    RawAddress /* secondary_bd_addr */) {}
invoke_le_address_associate_cb(RawAddress,RawAddress)50 void invoke_le_address_associate_cb(RawAddress /* main_bd_addr */,
51                                     RawAddress /* secondary_bd_addr */) {}
invoke_acl_state_changed_cb(bt_status_t,RawAddress,bt_acl_state_t,int,bt_hci_error_code_t,bt_conn_direction_t,uint16_t)52 void invoke_acl_state_changed_cb(bt_status_t /* status */,
53                                  RawAddress /* bd_addr */,
54                                  bt_acl_state_t /* state */,
55                                  int /* transport_link_type */,
56                                  bt_hci_error_code_t /* hci_reason */,
57                                  bt_conn_direction_t /* direction */,
58                                  uint16_t /* acl_handle */) {}
invoke_thread_evt_cb(bt_cb_thread_evt)59 void invoke_thread_evt_cb(bt_cb_thread_evt /* event */) {}
60 
invoke_le_test_mode_cb(bt_status_t,uint16_t)61 void invoke_le_test_mode_cb(bt_status_t /* status */, uint16_t /* count */) {}
62 
invoke_energy_info_cb(bt_activity_energy_info,bt_uid_traffic_t *)63 void invoke_energy_info_cb(bt_activity_energy_info /* energy_info */,
64                            bt_uid_traffic_t* /* uid_data */) {}
invoke_link_quality_report_cb(uint64_t,int,int,int,int,int,int)65 void invoke_link_quality_report_cb(uint64_t /* timestamp */,
66                                    int /* report_id */, int /* rssi */,
67                                    int /* snr */,
68                                    int /* retransmission_count */,
69                                    int /* packets_not_receive_count */,
70                                    int /* negative_acknowledgement_count */) {}
invoke_key_missing_cb(const RawAddress)71 void invoke_key_missing_cb(const RawAddress /* bd_addr */) {}
72 
init_stack(bluetooth::core::CoreInterface *)73 static void init_stack(bluetooth::core::CoreInterface* /* interface */) {}
74 
start_up_stack_async(bluetooth::core::CoreInterface *,ProfileStartCallback,ProfileStopCallback)75 static void start_up_stack_async(
76     bluetooth::core::CoreInterface* /* interface */,
77     ProfileStartCallback /* startProfiles */,
78     ProfileStopCallback /* stopProfiles */) {}
79 
shut_down_stack_async(ProfileStopCallback)80 static void shut_down_stack_async(ProfileStopCallback /* stopProfiles */) {}
81 
clean_up_stack(ProfileStopCallback)82 static void clean_up_stack(ProfileStopCallback /* stopProfiles */) {}
83 
get_stack_is_running()84 static bool get_stack_is_running() { return true; }
85 
86 static const stack_manager_t interface = {init_stack, start_up_stack_async,
87                                           shut_down_stack_async, clean_up_stack,
88                                           get_stack_is_running};
89 
stack_manager_get_interface()90 const stack_manager_t* stack_manager_get_interface() { return &interface; }
91