xref: /aosp_15_r20/frameworks/proto_logging/stats/enums/bluetooth/rfcomm/enums.proto (revision 64c55175f22a2714b5ba1250098ad9bbc12ec7cd)
1/*
2 * Copyright 2018 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
17syntax = "proto2";
18package android.bluetooth.rfcomm;
19
20option java_outer_classname = "BluetoothRfcommProtoEnums";
21option java_multiple_files = true;
22
23enum RfcommConnectionResult {
24  RFCOMM_CONN_RESULT_FAILURE_UNKNOWN = 0;
25  RFCOMM_CONN_RESULT_SUCCESS = 1;
26  RFCOMM_CONN_RESULT_SOCKET_CONNECTION_FAILED = 2;
27  RFCOMM_CONN_RESULT_SOCKET_CONNECTION_CLOSED = 3;
28  RFCOMM_CONN_RESULT_UNABLE_TO_SEND_RPC = 4;
29  RFCOMM_CONN_RESULT_NULL_BLUETOOTH_DEVICE = 5;
30  RFCOMM_CONN_RESULT_GET_SOCKET_MANAGER_FAILED = 6;
31  RFCOMM_CONN_RESULT_NULL_FILE_DESCRIPTOR = 7;
32}
33
34enum SocketConnectionSecurity {
35  SOCKET_SECURITY_UNKNOWN = 0;
36  SOCKET_SECURITY_SECURE = 1;
37  SOCKET_SECURITY_INSECURE = 2;
38}
39
40enum PortResult {
41  PORT_RESULT_UNDEFINED = 0;
42  PORT_RESULT_SUCCESS = 1;
43  PORT_RESULT_UNKNOWN_ERROR = 2;
44  PORT_RESULT_ALREADY_OPENED = 3;
45  PORT_RESULT_CMD_PENDING = 4;
46  PORT_RESULT_APP_NOT_REGISTERED = 5;
47  PORT_RESULT_NO_MEM = 6;
48  PORT_RESULT_NO_RESOURCES = 7;
49  PORT_RESULT_BAD_BD_ADDR = 8;
50  PORT_RESULT_BAD_HANDLE = 9;
51  PORT_RESULT_NOT_OPENED = 10;
52  PORT_RESULT_LINE_ERR = 11;
53  PORT_RESULT_START_FAILED = 12;
54  PORT_RESULT_PAR_NEG_FAILED = 13;
55  PORT_RESULT_PORT_NEG_FAILED = 14;
56  PORT_RESULT_SEC_FAILED = 15;
57  PORT_RESULT_PEER_CONNECTION_FAILED = 16;
58  PORT_RESULT_PEER_FAILED = 17;
59  PORT_RESULT_PEER_TIMEOUT = 18;
60  PORT_RESULT_CLOSED = 19;
61  PORT_RESULT_TX_FULL = 20;
62  PORT_RESULT_LOCAL_CLOSED = 21;
63  PORT_RESULT_LOCAL_TIMEOUT = 22;
64  PORT_RESULT_TX_QUEUE_DISABLED = 23;
65  PORT_RESULT_PAGE_TIMEOUT = 24;
66  PORT_RESULT_INVALID_SCN = 25;
67  PORT_RESULT_ERR_MAX = 26;
68}
69
70enum RfcommPortState{
71  PORT_STATE_UNKNOWN = 0;
72  PORT_STATE_SABME_WAIT_UA = 1;
73  PORT_STATE_ORIG_WAIT_SEC_CHECK = 2;
74  PORT_STATE_TERM_WAIT_SEC_CHECK = 3;
75  PORT_STATE_OPENED = 4;
76  PORT_STATE_DISC_WAIT_UA = 5;
77  PORT_STATE_CLOSED = 6;
78}
79