Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2023 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 | syntax = "proto3"; |
| 18 | |
| 19 | option java_package = "com.android.server.adb.protos"; |
| 20 | option java_outer_classname = "DevicesProto"; |
| 21 | |
| 22 | package adb.proto; |
| 23 | |
| 24 | // This mirrors adb.h's "enum ConnectionState" |
| 25 | enum ConnectionState { |
| 26 | ANY = 0; |
| 27 | CONNECTING = 1; |
| 28 | AUTHORIZING = 2; |
| 29 | UNAUTHORIZED = 3; |
| 30 | NOPERMISSION = 4; |
| 31 | DETACHED = 5; |
| 32 | OFFLINE = 6; |
| 33 | BOOTLOADER = 7; |
| 34 | DEVICE = 8; |
| 35 | HOST = 9; |
| 36 | RECOVERY = 10; |
| 37 | SIDELOAD = 11; |
| 38 | RESCUE = 12; |
| 39 | } |
| 40 | |
| 41 | enum ConnectionType { |
| 42 | UNKNOWN = 0; |
| 43 | USB = 1; |
| 44 | SOCKET = 2; |
| 45 | } |
| 46 | |
| 47 | message Device { |
| 48 | string serial = 1; |
| 49 | ConnectionState state = 2; |
| 50 | string bus_address = 3; |
| 51 | string product = 4; |
| 52 | string model = 5; |
| 53 | string device = 6; |
| 54 | ConnectionType connection_type = 7; |
| 55 | int64 negotiated_speed = 8; |
| 56 | int64 max_speed = 9; |
Fabien Sanglard | e8d239f | 2023-12-15 11:48:09 -0800 | [diff] [blame] | 57 | int64 transport_id = 10; |
Fabien Sanglard | 3d155b6 | 2023-11-30 14:52:40 -0800 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | message Devices { |
| 61 | repeated Device device = 1; |
| 62 | } |