summaryrefslogtreecommitdiff
path: root/system/stack/rfcomm/rfc_event.h
blob: 98d24000d309a964a0ce0b1aaab91c37c000ec3a (plain)
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
/*
 * Copyright 2021 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.
 */

#pragma once

#include <cstdint>

/*
 * Events that can be received by multiplexer as well as port state machines
 */
typedef uint8_t tRFC_EVENT;
#define RFC_EVENT_SABME 0
#define RFC_EVENT_UA 1
#define RFC_EVENT_DM 2
#define RFC_EVENT_DISC 3
#define RFC_EVENT_UIH 4
#define RFC_EVENT_TIMEOUT 5
#define RFC_EVENT_BAD_FRAME 50
/*
 * Multiplexer events
 */
typedef uint8_t tRFC_MX_EVENT;
#define RFC_MX_EVENT_SABME RFC_EVENT_SABME
#define RFC_MX_EVENT_UA RFC_EVENT_UA
#define RFC_MX_EVENT_DM RFC_EVENT_DM
#define RFC_MX_EVENT_DISC RFC_EVENT_DISC
#define RFC_MX_EVENT_UIH RFC_EVENT_UIH
#define RFC_MX_EVENT_TIMEOUT RFC_EVENT_TIMEOUT
#define RFC_MX_EVENT_START_REQ 6
#define RFC_MX_EVENT_START_RSP 7
#define RFC_MX_EVENT_CLOSE_REQ 8
#define RFC_MX_EVENT_CONN_CNF 9
#define RFC_MX_EVENT_CONN_IND 10
#define RFC_MX_EVENT_CONF_CNF 11
#define RFC_MX_EVENT_CONF_IND 12
#define RFC_MX_EVENT_QOS_VIOLATION_IND 13
#define RFC_MX_EVENT_DISC_IND 14

/*
 * Port events
 */
typedef uint8_t tRFC_PORT_EVENT;
#define RFC_PORT_EVENT_SABME RFC_EVENT_SABME
#define RFC_PORT_EVENT_UA RFC_EVENT_UA
#define RFC_PORT_EVENT_DM RFC_EVENT_DM
#define RFC_PORT_EVENT_DISC RFC_EVENT_DISC
#define RFC_PORT_EVENT_UIH RFC_EVENT_UIH
#define RFC_PORT_EVENT_TIMEOUT RFC_EVENT_TIMEOUT
#define RFC_PORT_EVENT_OPEN 9
#define RFC_PORT_EVENT_ESTABLISH_RSP 11
#define RFC_PORT_EVENT_CLOSE 12
#define RFC_PORT_EVENT_CLEAR 13
#define RFC_PORT_EVENT_DATA 14
#define RFC_PORT_EVENT_SEC_COMPLETE 15