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 #pragma once
18 #include <frameworks/proto_logging/stats/enums/bluetooth/enums.pb.h>
19 
20 #include "hci/hci_packets.h"
21 #include "storage/storage_module.h"
22 
23 namespace bluetooth {
24 namespace hci {
25 void log_hci_event(std::unique_ptr<CommandView>& command_view, EventView packet,
26                    storage::StorageModule* storage_module);
27 void log_link_layer_connection_command(std::unique_ptr<CommandView>& command_view);
28 void log_link_layer_connection_command_status(std::unique_ptr<CommandView>& command_view,
29                                               ErrorCode status);
30 void log_link_layer_connection_command_complete(EventView event,
31                                                 std::unique_ptr<CommandView>& command_view);
32 void log_link_layer_connection_event_le_meta(LeMetaEventView le_meta_event_view);
33 void log_link_layer_connection_other_hci_event(EventView packet,
34                                                storage::StorageModule* storage_module);
35 
36 void log_classic_pairing_command_status(std::unique_ptr<CommandView>& command_view,
37                                         ErrorCode status);
38 void log_classic_pairing_command_complete(EventView event,
39                                           std::unique_ptr<CommandView>& command_view);
40 void log_classic_pairing_other_hci_event(EventView packet);
41 
42 void log_remote_device_information(const Address& address,
43                                    android::bluetooth::AddressTypeEnum address_type,
44                                    uint32_t connection_handle, ErrorCode status,
45                                    storage::StorageModule* storage_module);
46 }  // namespace hci
47 }  // namespace bluetooth
48