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( 26 std::unique_ptr<CommandView>& command_view, EventView packet, 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, ErrorCode status); 29 void log_link_layer_connection_command_complete(EventView event, std::unique_ptr<CommandView>& command_view); 30 void log_link_layer_connection_event_le_meta(LeMetaEventView le_meta_event_view); 31 void log_link_layer_connection_other_hci_event(EventView packet, storage::StorageModule* storage_module); 32 33 void log_classic_pairing_command_status(std::unique_ptr<CommandView>& command_view, ErrorCode status); 34 void log_classic_pairing_command_complete(EventView event, std::unique_ptr<CommandView>& command_view); 35 void log_classic_pairing_other_hci_event(EventView packet); 36 37 void log_remote_device_information( 38 const Address& address, 39 android::bluetooth::AddressTypeEnum address_type, 40 uint32_t connection_handle, 41 ErrorCode status, 42 storage::StorageModule* storage_module); 43 } // namespace hci 44 } // namespace bluetooth