1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
/*
* Copyright 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto2";
package android.bluetooth;
option java_outer_classname = "BluetoothProtoEnums";
option java_multiple_files = true;
// Bluetooth connection states.
enum ConnectionStateEnum {
CONNECTION_STATE_DISCONNECTED = 0;
CONNECTION_STATE_CONNECTING = 1;
CONNECTION_STATE_CONNECTED = 2;
CONNECTION_STATE_DISCONNECTING = 3;
}
// Bluetooth Adapter Enable and Disable Reasons
enum EnableDisableReasonEnum {
ENABLE_DISABLE_REASON_UNSPECIFIED = 0;
ENABLE_DISABLE_REASON_APPLICATION_REQUEST = 1;
ENABLE_DISABLE_REASON_AIRPLANE_MODE = 2;
ENABLE_DISABLE_REASON_DISALLOWED = 3;
ENABLE_DISABLE_REASON_RESTARTED = 4;
ENABLE_DISABLE_REASON_START_ERROR = 5;
ENABLE_DISABLE_REASON_SYSTEM_BOOT = 6;
ENABLE_DISABLE_REASON_CRASH = 7;
ENABLE_DISABLE_REASON_USER_SWITCH = 8;
ENABLE_DISABLE_REASON_RESTORE_USER_SETTING = 9;
}
enum DirectionEnum {
DIRECTION_UNKNOWN = 0;
DIRECTION_OUTGOING = 1;
DIRECTION_INCOMING = 2;
}
// First item is the default value, other values follow Bluetooth spec definition
enum LinkTypeEnum {
// Link type is at most 1 byte (0xFF), thus 0xFFF must not be a valid value
LINK_TYPE_UNKNOWN = 0xFFF;
LINK_TYPE_SCO = 0x00;
LINK_TYPE_ACL = 0x01;
LINK_TYPE_ESCO = 0x02;
}
enum DeviceInfoSrcEnum {
DEVICE_INFO_SRC_UNKNOWN = 0;
// Within Android Bluetooth stack
DEVICE_INFO_INTERNAL = 1;
// Outside Android Bluetooth stack
DEVICE_INFO_EXTERNAL = 2;
}
enum DeviceTypeEnum {
DEVICE_TYPE_UNKNOWN = 0;
DEVICE_TYPE_CLASSIC = 1;
DEVICE_TYPE_LE = 2;
DEVICE_TYPE_DUAL = 3;
}
// Defined in frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
enum TransportTypeEnum {
TRANSPORT_TYPE_AUTO = 0;
TRANSPORT_TYPE_BREDR = 1;
TRANSPORT_TYPE_LE = 2;
}
// Bond state enum
// Defined in frameworks/base/core/java/android/bluetooth/BluetoothDevice.java
enum BondStateEnum {
BOND_STATE_UNKNOWN = 0;
BOND_STATE_NONE = 10;
BOND_STATE_BONDING = 11;
BOND_STATE_BONDED = 12;
}
// Sub states within the bonding general state
enum BondSubStateEnum {
BOND_SUB_STATE_UNKNOWN = 0;
BOND_SUB_STATE_LOCAL_OOB_DATA_PROVIDED = 1;
BOND_SUB_STATE_LOCAL_PIN_REQUESTED = 2;
BOND_SUB_STATE_LOCAL_PIN_REPLIED = 3;
BOND_SUB_STATE_LOCAL_SSP_REQUESTED = 4;
BOND_SUB_STATE_LOCAL_SSP_REPLIED = 5;
}
enum UnbondReasonEnum {
UNBOND_REASON_UNKNOWN = 0;
UNBOND_REASON_AUTH_FAILED = 1;
UNBOND_REASON_AUTH_REJECTED = 2;
UNBOND_REASON_AUTH_CANCELED = 3;
UNBOND_REASON_REMOTE_DEVICE_DOWN = 4;
UNBOND_REASON_DISCOVERY_IN_PROGRESS = 5;
UNBOND_REASON_AUTH_TIMEOUT = 6;
UNBOND_REASON_REPEATED_ATTEMPTS = 7;
UNBOND_REASON_REMOTE_AUTH_CANCELED = 8;
UNBOND_REASON_REMOVED = 9;
}
enum SocketTypeEnum {
SOCKET_TYPE_UNKNOWN = 0;
SOCKET_TYPE_RFCOMM = 1;
SOCKET_TYPE_SCO = 2;
SOCKET_TYPE_L2CAP_BREDR = 3;
SOCKET_TYPE_L2CAP_LE = 4;
}
enum SocketConnectionstateEnum {
SOCKET_CONNECTION_STATE_UNKNOWN = 0;
// Socket acts as a server waiting for connection
SOCKET_CONNECTION_STATE_LISTENING = 1;
// Socket acts as a client trying to connect
SOCKET_CONNECTION_STATE_CONNECTING = 2;
// Socket is connected
SOCKET_CONNECTION_STATE_CONNECTED = 3;
// Socket tries to disconnect from remote
SOCKET_CONNECTION_STATE_DISCONNECTING = 4;
// This socket is closed
SOCKET_CONNECTION_STATE_DISCONNECTED = 5;
}
enum SocketRoleEnum {
SOCKET_ROLE_UNKNOWN = 0;
SOCKET_ROLE_LISTEN = 1;
SOCKET_ROLE_CONNECTION = 2;
}
|