- merge audio headers
[reactos.git] / drivers / bluetooth / fbtusb / include / fbtHciEventStructs.h
1 #ifndef _FBT_HCI_EVENT_STRUCTS_H
2 #define _FBT_HCI_EVENT_STRUCTS_H
3
4 // Pack structures to single unsigned char boundries
5 #pragma pack(push, 1)
6
7 typedef struct
8 {
9 unsigned char EventCode;
10 unsigned char ParameterLength;
11
12 } FBT_HCI_EVENT_HEADER, *PFBT_HCI_EVENT_HEADER;
13
14 typedef struct
15 {
16 FBT_HCI_EVENT_HEADER EventHeader;
17 unsigned char Status;
18 unsigned char NumResponses;
19
20 } FBT_HCI_INQUIRY_COMPLETE, *PFBT_HCI_INQUIRY_COMPLETE;
21
22 typedef struct
23 {
24 FBT_HCI_EVENT_HEADER EventHeader;
25 unsigned char NumResponses;
26 unsigned char BD_ADDR[FBT_HCI_VARIABLE_SIZE][FBT_HCI_BDADDR_SIZE];
27 unsigned char PageScanRepetitionMode[FBT_HCI_VARIABLE_SIZE];
28 unsigned char PageScanPeriodMode[FBT_HCI_VARIABLE_SIZE];
29 unsigned char PageScanMode[FBT_HCI_VARIABLE_SIZE];
30 unsigned char ClassOfDevice[FBT_HCI_VARIABLE_SIZE][FBT_HCI_DEVICE_CLASS_SIZE];
31 unsigned short ClockOffset[FBT_HCI_VARIABLE_SIZE];
32
33 } FBT_HCI_INQUIRY_RESULT, *PFBT_HCI_INQUIRY_RESULT;
34
35 typedef struct
36 {
37 FBT_HCI_EVENT_HEADER EventHeader;
38 unsigned char Status;
39 unsigned short ConnectionHandle;
40 unsigned char BD_ADDR[FBT_HCI_BDADDR_SIZE];
41 unsigned char LinkType;
42 unsigned char EncryptionMode;
43
44 } FBT_HCI_CONNECTION_COMPLETE, *PFBT_HCI_CONNECTION_COMPLETE;
45
46 typedef struct
47 {
48 FBT_HCI_EVENT_HEADER EventHeader;
49 unsigned char BD_ADDR[FBT_HCI_BDADDR_SIZE];
50 unsigned long ClassOfDevice[FBT_HCI_DEVICE_CLASS_SIZE];
51 unsigned char LinkType;
52
53 } FBT_HCI_CONNECTION_REQUEST, *PFBT_HCI_CONNECTION_REQUEST;
54
55 typedef struct
56 {
57 FBT_HCI_EVENT_HEADER EventHeader;
58 unsigned char Status;
59 unsigned short ConnectionHandle;
60 unsigned char Reason;
61
62 } FBT_HCI_DISCONNECTION_COMPLETE, *PFBT_HCI_DISCONNECTION_COMPLETE;
63
64 typedef struct
65 {
66 FBT_HCI_EVENT_HEADER EventHeader;
67 unsigned char Status;
68 unsigned short ConnectionHandle;
69
70 } FBT_HCI_AUTHENTICATION_COMPLETE, *PFBT_HCI_AUTHENTICATION_COMPLETE;
71
72 typedef struct
73 {
74 FBT_HCI_EVENT_HEADER EventHeader;
75 unsigned char Status;
76 unsigned char BD_ADDR[FBT_HCI_BDADDR_SIZE];
77 unsigned char RemoteName[FBT_HCI_NAME_SIZE];
78
79 } FBT_HCI_REMOTE_NAME_REQUEST_COMPLETE, *PFBT_HCI_REMOTE_NAME_REQUEST_COMPLETE;
80
81 typedef struct
82 {
83 FBT_HCI_EVENT_HEADER EventHeader;
84 unsigned char Status;
85 unsigned short ConnectionHandle;
86 unsigned char EncryptionEnable;
87
88 } FBT_HCI_ENCRYPTION_CHANGE, *PFBT_HCI_ENCRYPTION_CHANGE;
89
90 typedef struct
91 {
92 FBT_HCI_EVENT_HEADER EventHeader;
93 unsigned char Status;
94 unsigned short ConnectionHandle;
95
96 } FBT_HCI_CHANGE_CONNECTION_LINK_KEY_COMPLETE, *PFBT_HCI_CHANGE_CONNECTION_LINK_KEY_COMPLETE;
97
98 typedef struct
99 {
100 FBT_HCI_EVENT_HEADER EventHeader;
101 unsigned char Status;
102 unsigned short ConnectionHandle;
103 unsigned char KeyFlag;
104
105 } FBT_HCI_MASTER_LINK_KEY_COMPLETE, *PFBT_HCI_MASTER_LINK_KEY_COMPLETE;
106
107 typedef struct
108 {
109 FBT_HCI_EVENT_HEADER EventHeader;
110 unsigned char Status;
111 unsigned short ConnectionHandle;
112 unsigned char LmpFeatures[8];
113
114 } FBT_HCI_READ_REMOTE_SUPPORTED_FEATURES_COMPLETE, *PFBT_HCI_READ_REMOTE_SUPPORTED_FEATURES_COMPLETE;
115
116 typedef struct
117 {
118 FBT_HCI_EVENT_HEADER EventHeader;
119 unsigned char Status;
120 unsigned short ConnectionHandle;
121 unsigned char LmpVersion;
122 unsigned short ManufacturerName;
123 unsigned short LmpSubversion;
124
125 } FBT_HCI_READ_REMOTE_VERSION_INFORMATION_COMPLETE, *PFBT_HCI_READ_REMOTE_VERSION_INFORMATION_COMPLETE;
126
127 typedef struct
128 {
129 FBT_HCI_EVENT_HEADER EventHeader;
130 unsigned char Status;
131 unsigned short ConnectionHandle;
132 unsigned char Flags;
133 unsigned char ServiceType;
134 unsigned long TokenRate;
135 unsigned long PeakBandwidth;
136 unsigned long Latency;
137 unsigned long DelayVariation;
138
139 } FBT_HCI_QOS_SETUP_COMPLETE, *PFBT_HCI_QOS_SETUP_COMPLETE;
140
141 typedef struct
142 {
143 FBT_HCI_EVENT_HEADER EventHeader;
144 unsigned char NumHCICommandPackets;
145 unsigned short OpCode;
146 unsigned char Parameters[FBT_HCI_VARIABLE_SIZE];
147
148 } FBT_HCI_COMMAND_COMPLETE, *PFBT_HCI_COMMAND_COMPLETE;
149
150 typedef struct
151 {
152 FBT_HCI_EVENT_HEADER EventHeader;
153 unsigned char Status;
154 unsigned char NumHCICommandPackets;
155 unsigned short OpCode;
156
157 } FBT_HCI_COMMAND_STATUS, *PFBT_HCI_COMMAND_STATUS;
158
159 typedef struct
160 {
161 FBT_HCI_EVENT_HEADER EventHeader;
162 unsigned char HardwareCode;
163
164 } FBT_HCI_HARDWARE_ERROR, *PFBT_HCI_HARDWARE_ERROR;
165
166 typedef struct
167 {
168 FBT_HCI_EVENT_HEADER EventHeader;
169 unsigned short ConnectionHandle;
170
171 } FBT_HCI_FLUSH_OCCURRED, *PFBT_HCI_FLUSH_OCCURRED;
172
173 typedef struct
174 {
175 FBT_HCI_EVENT_HEADER EventHeader;
176 unsigned char Status;
177 unsigned char BD_ADDR[FBT_HCI_BDADDR_SIZE];
178 unsigned char NewRole;
179
180 } FBT_HCI_ROLE_CHANGE, *PFBT_HCI_ROLE_CHANGE;
181
182 typedef struct
183 {
184 FBT_HCI_EVENT_HEADER EventHeader;
185 unsigned char NumberOfHandles;
186 unsigned short ConnectionHandle[FBT_HCI_VARIABLE_SIZE];
187 unsigned short NumberOfCompletedPackets[FBT_HCI_VARIABLE_SIZE];
188
189 } FBT_HCI_NUMBER_OF_COMPLETED_PACKETS, *PFBT_HCI_NUMBER_OF_COMPLETED_PACKETS;
190
191 typedef struct
192 {
193 FBT_HCI_EVENT_HEADER EventHeader;
194 unsigned char Status;
195 unsigned short ConnectionHandle;
196 unsigned char CurrentMode;
197 unsigned short Interval;
198
199 } FBT_HCI_MODE_CHANGE, *PFBT_HCI_MODE_CHANGE;
200
201 typedef struct
202 {
203 FBT_HCI_EVENT_HEADER EventHeader;
204 unsigned char NumKeys;
205 unsigned char BD_ADDR[FBT_HCI_VARIABLE_SIZE][FBT_HCI_BDADDR_SIZE];
206 unsigned char LinkKey[FBT_HCI_VARIABLE_SIZE][FBT_HCI_LINK_KEY_SIZE];
207
208 } FBT_HCI_RETURN_LINK_KEYS, *PFBT_HCI_RETURN_LINK_KEYS;
209
210 typedef struct
211 {
212 FBT_HCI_EVENT_HEADER EventHeader;
213 unsigned char BD_ADDR[FBT_HCI_BDADDR_SIZE];
214
215 } FBT_HCI_PIN_CODE_REQUEST, *PFBT_HCI_PIN_CODE_REQUEST;
216
217 typedef struct
218 {
219 FBT_HCI_EVENT_HEADER EventHeader;
220 unsigned char BD_ADDR[FBT_HCI_BDADDR_SIZE];
221
222 } FBT_HCI_LINK_KEY_REQUEST, *PFBT_HCI_LINK_KEY_REQUEST;
223
224 typedef struct
225 {
226 FBT_HCI_EVENT_HEADER EventHeader;
227 unsigned char BD_ADDR[FBT_HCI_BDADDR_SIZE];
228 unsigned char LinkKey[FBT_HCI_LINK_KEY_SIZE];
229
230 } FBT_HCI_LINK_KEY_NOTIFICATION, *PFBT_HCI_LINK_KEY_NOTIFICATION;
231
232 typedef struct
233 {
234 FBT_HCI_EVENT_HEADER EventHeader;
235 unsigned char HCICommandPacket[FBT_HCI_CMD_MAX_SIZE];
236
237 } FBT_HCI_LOOPBACK_COMMAND, *PFBT_HCI_LOOPBACK_COMMAND;
238
239 typedef struct
240 {
241 FBT_HCI_EVENT_HEADER EventHeader;
242 unsigned char LinkType;
243
244 } FBT_HCI_DATA_BUFFER_OVERFLOW, *PFBT_HCI_DATA_BUFFER_OVERFLOW;
245
246 typedef struct
247 {
248 FBT_HCI_EVENT_HEADER EventHeader;
249 unsigned short ConnectionHandle;
250 unsigned char LmpMaxSlots;
251
252 } FBT_HCI_MAX_SLOTS_CHANGE, *PFBT_HCI_MAX_SLOTS_CHANGE;
253
254 typedef struct
255 {
256 FBT_HCI_EVENT_HEADER EventHeader;
257 unsigned char Status;
258 unsigned short ConnectionHandle;
259 unsigned short ClockOffset;
260
261 } FBT_HCI_READ_CLOCK_OFFSET_COMPLETE, *PFBT_HCI_READ_CLOCK_OFFSET_COMPLETE;
262
263 typedef struct
264 {
265 FBT_HCI_EVENT_HEADER EventHeader;
266 unsigned char Status;
267 unsigned short ConnectionHandle;
268 unsigned short PacketType;
269
270 } FBT_HCI_CONNECTION_PACKET_TYPE_CHANGED, *PFBT_HCI_CONNECTION_PACKET_TYPE_CHANGED;
271
272 typedef struct
273 {
274 FBT_HCI_EVENT_HEADER EventHeader;
275 unsigned short ConnectionHandle;
276
277 } FBT_HCI_QOS_VIOLATION, *PFBT_HCI_QOS_VIOLATION;
278
279 typedef struct
280 {
281 FBT_HCI_EVENT_HEADER EventHeader;
282 unsigned char BD_ADDR[FBT_HCI_BDADDR_SIZE];
283 unsigned char PageScanMode;
284
285 } FBT_HCI_PAGE_SCAN_MODE_CHANGE, *PFBT_HCI_PAGE_SCAN_MODE_CHANGE;
286
287 typedef struct
288 {
289 FBT_HCI_EVENT_HEADER EventHeader;
290 unsigned char BD_ADDR[FBT_HCI_BDADDR_SIZE];
291 unsigned char PageScanRepetitionMode;
292
293 } FBT_HCI_PAGE_SCAN_REPETITION_MODE_CHANGE, *PFBT_HCI_PAGE_SCAN_REPETITION_MODE_CHANGE;
294
295 typedef struct
296 {
297 unsigned char Status;
298 unsigned char HCIVersion;
299 unsigned short HCIRevision;
300 unsigned char LMPVersion;
301 unsigned short Manufacturer;
302 unsigned short LMPSubVersion;
303
304 } FBT_HCI_READ_LOCAL_VERSION_INFORMATION_COMPLETE;
305
306 // Data Packet Structure
307 typedef struct
308 {
309 unsigned short ConnectionHandle: 12;
310 unsigned short PacketBoundary: 2;
311 unsigned short Broadcast: 2;
312 unsigned short DataLength;
313 unsigned char Data[1];
314
315 } FBT_HCI_DATA_PACKET, *PFBT_HCI_DATA_PACKET;
316
317 #pragma pack(pop)
318
319 #endif // _FBT_HCI_EVENT_STRUCTS_H