1 2// Copyright (C) 2022 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// 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"; 25option java_multiple_files = true; 26option java_package = "com.android.emulator.bluetooth"; 27package android.emulation.bluetooth; 28import "emulated_bluetooth_device.proto"; 29// An Emulated Bluetooth Service exposes a method to register an emulated 30// bluetooth device. 31service EmulatedBluetoothService { 32 // Registers an emulated bluetooth device. The emulator will reach out to 33 // the emulated device to read/write and subscribe to properties. 34 // 35 // The following gRPC error codes can be returned: 36 // - FAILED_PRECONDITION (code 9): 37 // - root canal is not available on this device 38 // - unable to reach the endpoint for the GattDevice 39 // - INTERNAL (code 13) if there was an internal emulator failure. 40 // 41 // The device will not be discoverable in case of an error. 42 rpc registerGattDevice(GattDevice) returns (RegistrationStatus); 43}; 44message RegistrationStatus { 45 // The identity of the registered device. The emulator will provide this 46 // when executing a request for a CharacteristicValueRequest 47 CallbackIdentifier callback_device_id = 1; 48} 49