xref: /aosp_15_r20/prebuilts/android-emulator/darwin-x86_64/lib/emulated_bluetooth_packets.proto (revision d870e0501505f2fc9999364ffe386a6b6151adc1)
1// Copyright (C) 2021 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14syntax = "proto3";
15
16option java_multiple_files = true;
17option java_package = "com.android.emulation.bluetooth";
18option csharp_namespace = "Android.Emulation.Bluetooth";
19option objc_class_prefix = "AEB";
20option cc_enable_arenas = true;
21
22package android.emulation.bluetooth;
23
24// A packet that is exchanged between the bluetooth chip and higher layers.
25message HCIPacket {
26    enum PacketType {
27        // The packet is unspecified, and contains raw bytes.
28        // This is mainly here to protect against compatibility issues that can
29        // arise if new enum fields are ever introduced.
30        // See: https://developers.google.com/protocol-buffers/docs/style#enums
31        PACKET_TYPE_UNSPECIFIED = 0;
32
33        // HCI Command Packets: commands are issued by the HCI Driver to the
34        // Host Controller:
35        PACKET_TYPE_HCI_COMMAND = 1;
36
37        // ACL (asynchronous connectionless) packet.
38        PACKET_TYPE_ACL = 2;
39
40        // SCO (synchronous connection orientated) packet.
41        PACKET_TYPE_SCO = 3;
42
43        // HCI Event Packets.
44        PACKET_TYPE_EVENT = 4;
45
46        // Isochronous Channel, a data transmissions that are time-sensitive
47        // and synchronized rendering of these data streams across multiple
48        // receivers. See
49        // https://www.novelbits.io/bluetooth-version-5-2-le-audio/ for an
50        // overview of ISO channels.
51        PACKET_TYPE_ISO = 5;
52    }
53
54    // Indicates the type of packet contained in the packet bytes.
55    PacketType type = 1;
56
57    // The actual data that was transferred.
58    bytes packet = 2;
59}
60