xref: /aosp_15_r20/prebuilts/android-emulator/darwin-x86_64/lib/emulated_bluetooth_vhci.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.
14
15// Note that if you add/remove methods in this file you must update
16// the metrics sql as well ./android/scripts/gen-grpc-sql.py
17//
18// Please group deleted methods in a block including the date (MM/DD/YY)
19// it was removed. This enables us to easily keep metrics around after removal
20//
21// List of deleted methods
22// rpc iWasDeleted (03/12/12)
23// ...
24syntax = "proto3";
25
26option java_multiple_files = true;
27option java_package = "com.android.emulation.bluetooth";
28option csharp_namespace = "Android.Emulation.Bluetooth";
29option objc_class_prefix = "AEB";
30option cc_enable_arenas = true;
31
32import "emulated_bluetooth_packets.proto";
33package android.emulation.bluetooth;
34
35// This is a service which allows you to directly intercept the VHCI packets
36// that are coming and going to the device before they are delivered to
37// the rootcanal service described below.
38//
39// This service is usually not available on the emulator, and must be explictly
40// requested from the commandline.
41service VhciForwardingService {
42    // This attach directly to /dev/vhci inside the android guest if available
43    //
44    // - This will disable root canal.
45    // - You will have to provide your own virtual bluetooth chip.
46    //
47    // Some things to be aware of:
48    //  - Only one client can be active.
49    //  - Registering when bluetooth is active in android can result in
50    //  undefined behavior.
51    //  - If a client disconnects, rootcanal will be activated again
52    //
53    // Status codes:
54    //   -  FAILED_PRECONDITION (code 9) If another client is controlling /dev/vhci.
55    //
56    // This is an internal testing only interface, and is NOT publicly
57    // supported.
58    rpc attachVhci(stream HCIPacket) returns (stream HCIPacket);
59};
60