• 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 #pragma once
18 
19 #include <frameworks/proto_logging/stats/enums/bluetooth/enums.pb.h>
20 #include <frameworks/proto_logging/stats/enums/bluetooth/hci/enums.pb.h>
21 
22 #include "types/raw_address.h"
23 
24 void log_classic_pairing_event(const RawAddress& address, uint16_t handle,
25                                uint32_t hci_cmd, uint16_t hci_event,
26                                uint16_t cmd_status, uint16_t reason_code,
27                                int64_t event_value);
28 
29 void log_link_layer_connection_event(
30     const RawAddress* address, uint32_t connection_handle,
31     android::bluetooth::DirectionEnum direction, uint16_t link_type,
32     uint32_t hci_cmd, uint16_t hci_event, uint16_t hci_ble_event,
33     uint16_t cmd_status, uint16_t reason_code);
34 
35 void log_smp_pairing_event(const RawAddress& address, uint8_t smp_cmd,
36                            android::bluetooth::DirectionEnum direction,
37                            uint8_t smp_fail_reason);
38 
39 void log_sdp_attribute(const RawAddress& address, uint16_t protocol_uuid,
40                        uint16_t attribute_id, size_t attribute_size,
41                        const char* attribute_value);
42 
43 void log_manufacturer_info(const RawAddress& address,
44                            android::bluetooth::DeviceInfoSrcEnum source_type,
45                            const std::string& source_name,
46                            const std::string& manufacturer,
47                            const std::string& model,
48                            const std::string& hardware_version,
49                            const std::string& software_version);