1 | /** @file
|
---|
2 | EFI Bluetooth Configuration Protocol as defined in UEFI 2.7.
|
---|
3 | This protocol abstracts user interface configuration for Bluetooth device.
|
---|
4 |
|
---|
5 | Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 |
|
---|
8 | @par Revision Reference:
|
---|
9 | This Protocol is introduced in UEFI Specification 2.7
|
---|
10 |
|
---|
11 | **/
|
---|
12 |
|
---|
13 | #ifndef __EFI_BLUETOOTH_CONFIG_PROTOCOL_H__
|
---|
14 | #define __EFI_BLUETOOTH_CONFIG_PROTOCOL_H__
|
---|
15 |
|
---|
16 | #include <IndustryStandard/Bluetooth.h>
|
---|
17 |
|
---|
18 | #define EFI_BLUETOOTH_CONFIG_PROTOCOL_GUID \
|
---|
19 | { \
|
---|
20 | 0x62960cf3, 0x40ff, 0x4263, { 0xa7, 0x7c, 0xdf, 0xde, 0xbd, 0x19, 0x1b, 0x4b } \
|
---|
21 | }
|
---|
22 |
|
---|
23 | typedef struct _EFI_BLUETOOTH_CONFIG_PROTOCOL EFI_BLUETOOTH_CONFIG_PROTOCOL;
|
---|
24 |
|
---|
25 | typedef UINT32 EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_TYPE;
|
---|
26 | #define EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_CONNECTED 0x1
|
---|
27 | #define EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_PAIRED 0x2
|
---|
28 |
|
---|
29 | ///
|
---|
30 | /// EFI_BLUETOOTH_SCAN_CALLBACK_INFORMATION
|
---|
31 | ///
|
---|
32 | typedef struct {
|
---|
33 | ///
|
---|
34 | /// 48bit Bluetooth device address.
|
---|
35 | ///
|
---|
36 | BLUETOOTH_ADDRESS BDAddr;
|
---|
37 | ///
|
---|
38 | /// State of the remote deive
|
---|
39 | ///
|
---|
40 | UINT8 RemoteDeviceState;
|
---|
41 | ///
|
---|
42 | /// Bluetooth ClassOfDevice. See Bluetooth specification for detail.
|
---|
43 | ///
|
---|
44 | BLUETOOTH_CLASS_OF_DEVICE ClassOfDevice;
|
---|
45 | ///
|
---|
46 | /// Remote device name
|
---|
47 | ///
|
---|
48 | UINT8 RemoteDeviceName[BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE];
|
---|
49 | } EFI_BLUETOOTH_SCAN_CALLBACK_INFORMATION;
|
---|
50 |
|
---|
51 | ///
|
---|
52 | /// EFI_BLUETOOTH_CONFIG_DATA_TYPE
|
---|
53 | ///
|
---|
54 | typedef enum {
|
---|
55 | ///
|
---|
56 | /// Local/Remote Bluetooth device name. Data structure is zero terminated CHAR8[].
|
---|
57 | ///
|
---|
58 | EfiBluetoothConfigDataTypeDeviceName,
|
---|
59 | ///
|
---|
60 | /// Local/Remote Bluetooth device ClassOfDevice. Data structure is BLUETOOTH_CLASS_OF_DEVICE.
|
---|
61 | ///
|
---|
62 | EfiBluetoothConfigDataTypeClassOfDevice,
|
---|
63 | ///
|
---|
64 | /// Remote Bluetooth device state. Data structure is EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_TYPE.
|
---|
65 | ///
|
---|
66 | EfiBluetoothConfigDataTypeRemoteDeviceState, /* Relevant for LE*/
|
---|
67 | ///
|
---|
68 | /// Local/Remote Bluetooth device SDP information. Data structure is UINT8[].
|
---|
69 | ///
|
---|
70 | EfiBluetoothConfigDataTypeSdpInfo,
|
---|
71 | ///
|
---|
72 | /// Local Bluetooth device address. Data structure is BLUETOOTH_ADDRESS.
|
---|
73 | ///
|
---|
74 | EfiBluetoothConfigDataTypeBDADDR, /* Relevant for LE*/
|
---|
75 | ///
|
---|
76 | /// Local Bluetooth discoverable state. Data structure is UINT8. (Page scan and/or Inquiry scan)
|
---|
77 | ///
|
---|
78 | EfiBluetoothConfigDataTypeDiscoverable, /* Relevant for LE*/
|
---|
79 | ///
|
---|
80 | /// Local Bluetooth controller stored paired device list. Data structure is BLUETOOTH_ADDRESS[].
|
---|
81 | ///
|
---|
82 | EfiBluetoothConfigDataTypeControllerStoredPairedDeviceList,
|
---|
83 | ///
|
---|
84 | /// Local available device list. Data structure is BLUETOOTH_ADDRESS[].
|
---|
85 | ///
|
---|
86 | EfiBluetoothConfigDataTypeAvailableDeviceList,
|
---|
87 | EfiBluetoothConfigDataTypeRandomAddress, /* Relevant for LE*/
|
---|
88 | EfiBluetoothConfigDataTypeRSSI, /* Relevant for LE*/
|
---|
89 | ///
|
---|
90 | /// Advertisement report. Data structure is UNIT8[].
|
---|
91 | ///
|
---|
92 | EfiBluetoothConfigDataTypeAdvertisementData, /* Relevant for LE*/
|
---|
93 | EfiBluetoothConfigDataTypeIoCapability, /* Relevant for LE*/
|
---|
94 | EfiBluetoothConfigDataTypeOOBDataFlag, /* Relevant for LE*/
|
---|
95 | ///
|
---|
96 | /// KeyType of Authentication Requirements flag of local
|
---|
97 | /// device as UINT8, indicating requested security properties.
|
---|
98 | /// See Bluetooth specification 3.H.3.5.1. BIT0: MITM, BIT1:SC.
|
---|
99 | ///
|
---|
100 | EfiBluetoothConfigDataTypeKeyType, /* Relevant for LE*/
|
---|
101 | EfiBluetoothConfigDataTypeEncKeySize, /* Relevant for LE*/
|
---|
102 | EfiBluetoothConfigDataTypeMax,
|
---|
103 | } EFI_BLUETOOTH_CONFIG_DATA_TYPE;
|
---|
104 |
|
---|
105 | ///
|
---|
106 | /// EFI_BLUETOOTH_PIN_CALLBACK_TYPE.
|
---|
107 | ///
|
---|
108 | typedef enum {
|
---|
109 | ///
|
---|
110 | /// For SSP - passkey entry. Input buffer is Passkey (4 bytes). No output buffer.
|
---|
111 | /// See Bluetooth HCI command for detail.
|
---|
112 | ///
|
---|
113 | EfiBluetoothCallbackTypeUserPasskeyNotification,
|
---|
114 | ///
|
---|
115 | /// For SSP - just work and numeric comparison. Input buffer is numeric value (4 bytes).
|
---|
116 | /// Output buffer is BOOLEAN (1 byte). See Bluetooth HCI command for detail.
|
---|
117 | ///
|
---|
118 | EfiBluetoothCallbackTypeUserConfirmationRequest,
|
---|
119 | ///
|
---|
120 | /// For SSP - OOB. See Bluetooth HCI command for detail.
|
---|
121 | ///
|
---|
122 | EfiBluetoothCallbackTypeOOBDataRequest,
|
---|
123 | ///
|
---|
124 | /// For legacy paring. No input buffer. Output buffer is PIN code( <= 16 bytes).
|
---|
125 | /// See Bluetooth HCI command for detail.
|
---|
126 | ///
|
---|
127 | EfiBluetoothCallbackTypePinCodeRequest,
|
---|
128 | EfiBluetoothCallbackTypeMax
|
---|
129 | } EFI_BLUETOOTH_PIN_CALLBACK_TYPE;
|
---|
130 |
|
---|
131 | ///
|
---|
132 | /// EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE.
|
---|
133 | ///
|
---|
134 | typedef enum {
|
---|
135 | ///
|
---|
136 | /// This callback is called when Bluetooth receive Disconnection_Complete event. Input buffer is Event
|
---|
137 | /// Parameters of Disconnection_Complete Event defined in Bluetooth specification.
|
---|
138 | ///
|
---|
139 | EfiBluetoothConnCallbackTypeDisconnected,
|
---|
140 | ///
|
---|
141 | /// This callback is called when Bluetooth receive Connection_Complete event. Input buffer is Event
|
---|
142 | /// Parameters of Connection_Complete Event defined in Bluetooth specification.
|
---|
143 | ///
|
---|
144 | EfiBluetoothConnCallbackTypeConnected,
|
---|
145 | ///
|
---|
146 | /// This callback is called when Bluetooth receive Authentication_Complete event. Input buffer is Event
|
---|
147 | /// Parameters of Authentication_Complete Event defined in Bluetooth specification.
|
---|
148 | ///
|
---|
149 | EfiBluetoothConnCallbackTypeAuthenticated,
|
---|
150 | ///
|
---|
151 | /// This callback is called when Bluetooth receive Encryption_Change event. Input buffer is Event
|
---|
152 | /// Parameters of Encryption_Change Event defined in Bluetooth specification.
|
---|
153 | ///
|
---|
154 | EfiBluetoothConnCallbackTypeEncrypted
|
---|
155 | } EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE;
|
---|
156 |
|
---|
157 | /**
|
---|
158 | Initialize Bluetooth host controller and local device.
|
---|
159 |
|
---|
160 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
161 |
|
---|
162 | @retval EFI_SUCCESS The Bluetooth host controller and local device is initialized successfully.
|
---|
163 | @retval EFI_DEVICE_ERROR A hardware error occurred trying to initialize the Bluetooth host controller
|
---|
164 | and local device.
|
---|
165 |
|
---|
166 | **/
|
---|
167 | typedef
|
---|
168 | EFI_STATUS
|
---|
169 | (EFIAPI *EFI_BLUETOOTH_CONFIG_INIT)(
|
---|
170 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This
|
---|
171 | );
|
---|
172 |
|
---|
173 | /**
|
---|
174 | Callback function, it is called if a Bluetooth device is found during scan process.
|
---|
175 |
|
---|
176 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
177 | @param Context Context passed from scan request.
|
---|
178 | @param CallbackInfo Data related to scan result. NULL CallbackInfo means scan complete.
|
---|
179 |
|
---|
180 | @retval EFI_SUCCESS The callback function complete successfully.
|
---|
181 |
|
---|
182 | **/
|
---|
183 | typedef
|
---|
184 | EFI_STATUS
|
---|
185 | (EFIAPI *EFI_BLUETOOTH_CONFIG_SCAN_CALLBACK_FUNCTION)(
|
---|
186 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
187 | IN VOID *Context,
|
---|
188 | IN EFI_BLUETOOTH_SCAN_CALLBACK_INFORMATION *CallbackInfo
|
---|
189 | );
|
---|
190 |
|
---|
191 | /**
|
---|
192 | Scan Bluetooth device.
|
---|
193 |
|
---|
194 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
195 | @param ReScan If TRUE, a new scan request is submitted no matter there is scan result before.
|
---|
196 | If FALSE and there is scan result, the previous scan result is returned and no scan request
|
---|
197 | is submitted.
|
---|
198 | @param ScanType Bluetooth scan type, Inquiry and/or Page. See Bluetooth specification for detail.
|
---|
199 | @param Callback The callback function. This function is called if a Bluetooth device is found during scan
|
---|
200 | process.
|
---|
201 | @param Context Data passed into Callback function. This is optional parameter and may be NULL.
|
---|
202 |
|
---|
203 | @retval EFI_SUCCESS The Bluetooth scan request is submitted.
|
---|
204 | @retval EFI_DEVICE_ERROR A hardware error occurred trying to scan the Bluetooth device.
|
---|
205 |
|
---|
206 | **/
|
---|
207 | typedef
|
---|
208 | EFI_STATUS
|
---|
209 | (EFIAPI *EFI_BLUETOOTH_CONFIG_SCAN)(
|
---|
210 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
211 | IN BOOLEAN ReScan,
|
---|
212 | IN UINT8 ScanType,
|
---|
213 | IN EFI_BLUETOOTH_CONFIG_SCAN_CALLBACK_FUNCTION Callback,
|
---|
214 | IN VOID *Context
|
---|
215 | );
|
---|
216 |
|
---|
217 | /**
|
---|
218 | Connect a Bluetooth device.
|
---|
219 |
|
---|
220 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
221 | @param BD_ADDR The address of Bluetooth device to be connected.
|
---|
222 |
|
---|
223 | @retval EFI_SUCCESS The Bluetooth device is connected successfully.
|
---|
224 | @retval EFI_ALREADY_STARTED The Bluetooth device is already connected.
|
---|
225 | @retval EFI_NOT_FOUND The Bluetooth device is not found.
|
---|
226 | @retval EFI_DEVICE_ERROR A hardware error occurred trying to connect the Bluetooth device.
|
---|
227 |
|
---|
228 | **/
|
---|
229 | typedef
|
---|
230 | EFI_STATUS
|
---|
231 | (EFIAPI *EFI_BLUETOOTH_CONFIG_CONNECT)(
|
---|
232 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
233 | IN BLUETOOTH_ADDRESS *BD_ADDR
|
---|
234 | );
|
---|
235 |
|
---|
236 | /**
|
---|
237 | Disconnect a Bluetooth device.
|
---|
238 |
|
---|
239 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
240 | @param BD_ADDR The address of Bluetooth device to be connected.
|
---|
241 | @param Reason Bluetooth disconnect reason. See Bluetooth specification for detail.
|
---|
242 |
|
---|
243 | @retval EFI_SUCCESS The Bluetooth device is disconnected successfully.
|
---|
244 | @retval EFI_NOT_STARTED The Bluetooth device is not connected.
|
---|
245 | @retval EFI_NOT_FOUND The Bluetooth device is not found.
|
---|
246 | @retval EFI_DEVICE_ERROR A hardware error occurred trying to disconnect the Bluetooth device.
|
---|
247 |
|
---|
248 | **/
|
---|
249 | typedef
|
---|
250 | EFI_STATUS
|
---|
251 | (EFIAPI *EFI_BLUETOOTH_CONFIG_DISCONNECT)(
|
---|
252 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
253 | IN BLUETOOTH_ADDRESS *BD_ADDR,
|
---|
254 | IN UINT8 Reason
|
---|
255 | );
|
---|
256 |
|
---|
257 | /**
|
---|
258 | Get Bluetooth configuration data.
|
---|
259 |
|
---|
260 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
261 | @param DataType Configuration data type.
|
---|
262 | @param DataSize On input, indicates the size, in bytes, of the data buffer specified by Data.
|
---|
263 | On output, indicates the amount of data actually returned.
|
---|
264 | @param Data A pointer to the buffer of data that will be returned.
|
---|
265 |
|
---|
266 | @retval EFI_SUCCESS The Bluetooth configuration data is returned successfully.
|
---|
267 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
---|
268 | - DataSize is NULL.
|
---|
269 | - *DataSize is not 0 and Data is NULL.
|
---|
270 | @retval EFI_UNSUPPORTED The DataType is unsupported.
|
---|
271 | @retval EFI_NOT_FOUND The DataType is not found.
|
---|
272 | @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.
|
---|
273 | *DataSize has been updated with the size needed to complete the request.
|
---|
274 |
|
---|
275 | **/
|
---|
276 | typedef
|
---|
277 | EFI_STATUS
|
---|
278 | (EFIAPI *EFI_BLUETOOTH_CONFIG_GET_DATA)(
|
---|
279 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
280 | IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType,
|
---|
281 | IN OUT UINTN *DataSize,
|
---|
282 | IN OUT VOID *Data
|
---|
283 | );
|
---|
284 |
|
---|
285 | /**
|
---|
286 | Set Bluetooth configuration data.
|
---|
287 |
|
---|
288 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
289 | @param DataType Configuration data type.
|
---|
290 | @param DataSize Indicates the size, in bytes, of the data buffer specified by Data.
|
---|
291 | @param Data A pointer to the buffer of data that will be set.
|
---|
292 |
|
---|
293 | @retval EFI_SUCCESS The Bluetooth configuration data is set successfully.
|
---|
294 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
---|
295 | - DataSize is 0.
|
---|
296 | - Data is NULL.
|
---|
297 | @retval EFI_UNSUPPORTED The DataType is unsupported.
|
---|
298 | @retval EFI_BUFFER_TOO_SMALL Cannot set configuration data.
|
---|
299 |
|
---|
300 | **/
|
---|
301 | typedef
|
---|
302 | EFI_STATUS
|
---|
303 | (EFIAPI *EFI_BLUETOOTH_CONFIG_SET_DATA)(
|
---|
304 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
305 | IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType,
|
---|
306 | IN UINTN DataSize,
|
---|
307 | IN VOID *Data
|
---|
308 | );
|
---|
309 |
|
---|
310 | /**
|
---|
311 | Get remove Bluetooth device configuration data.
|
---|
312 |
|
---|
313 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
314 | @param DataType Configuration data type.
|
---|
315 | @param BDAddr Remote Bluetooth device address.
|
---|
316 | @param DataSize On input, indicates the size, in bytes, of the data buffer specified by Data.
|
---|
317 | On output, indicates the amount of data actually returned.
|
---|
318 | @param Data A pointer to the buffer of data that will be returned.
|
---|
319 |
|
---|
320 | @retval EFI_SUCCESS The remote Bluetooth device configuration data is returned successfully.
|
---|
321 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
---|
322 | - DataSize is NULL.
|
---|
323 | - *DataSize is not 0 and Data is NULL.
|
---|
324 | @retval EFI_UNSUPPORTED The DataType is unsupported.
|
---|
325 | @retval EFI_NOT_FOUND The DataType is not found.
|
---|
326 | @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.
|
---|
327 | *DataSize has been updated with the size needed to complete the request.
|
---|
328 |
|
---|
329 | **/
|
---|
330 | typedef
|
---|
331 | EFI_STATUS
|
---|
332 | (EFIAPI *EFI_BLUETOOTH_CONFIG_GET_REMOTE_DATA)(
|
---|
333 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
334 | IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType,
|
---|
335 | IN BLUETOOTH_ADDRESS *BDAddr,
|
---|
336 | IN OUT UINTN *DataSize,
|
---|
337 | IN OUT VOID *Data
|
---|
338 | );
|
---|
339 |
|
---|
340 | /**
|
---|
341 | The callback function for PIN code.
|
---|
342 |
|
---|
343 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
344 | @param Context Context passed from registration.
|
---|
345 | @param CallbackType Callback type in EFI_BLUETOOTH_PIN_CALLBACK_TYPE.
|
---|
346 | @param InputBuffer A pointer to the buffer of data that is input from callback caller.
|
---|
347 | @param InputBufferSize Indicates the size, in bytes, of the data buffer specified by InputBuffer.
|
---|
348 | @param OutputBuffer A pointer to the buffer of data that will be output from callback callee.
|
---|
349 | Callee allocates this buffer by using EFI Boot Service AllocatePool().
|
---|
350 | @param OutputBufferSize Indicates the size, in bytes, of the data buffer specified by OutputBuffer.
|
---|
351 |
|
---|
352 | @retval EFI_SUCCESS The callback function complete successfully.
|
---|
353 |
|
---|
354 | **/
|
---|
355 | typedef
|
---|
356 | EFI_STATUS
|
---|
357 | (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK_FUNCTION)(
|
---|
358 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
359 | IN VOID *Context,
|
---|
360 | IN EFI_BLUETOOTH_PIN_CALLBACK_TYPE CallbackType,
|
---|
361 | IN VOID *InputBuffer,
|
---|
362 | IN UINTN InputBufferSize,
|
---|
363 | OUT VOID **OutputBuffer,
|
---|
364 | OUT UINTN *OutputBufferSize
|
---|
365 | );
|
---|
366 |
|
---|
367 | /**
|
---|
368 | Register PIN callback function.
|
---|
369 |
|
---|
370 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
371 | @param Callback The callback function. NULL means unregister.
|
---|
372 | @param Context Data passed into Callback function. This is optional parameter and may be NULL.
|
---|
373 |
|
---|
374 | @retval EFI_SUCCESS The PIN callback function is registered successfully.
|
---|
375 |
|
---|
376 | **/
|
---|
377 | typedef
|
---|
378 | EFI_STATUS
|
---|
379 | (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK)(
|
---|
380 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
381 | IN EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK_FUNCTION Callback,
|
---|
382 | IN VOID *Context
|
---|
383 | );
|
---|
384 |
|
---|
385 | /**
|
---|
386 | The callback function to get link key.
|
---|
387 |
|
---|
388 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
389 | @param Context Context passed from registration.
|
---|
390 | @param BDAddr A pointer to Bluetooth device address.
|
---|
391 | @param LinkKey A pointer to the buffer of link key.
|
---|
392 |
|
---|
393 | @retval EFI_SUCCESS The callback function complete successfully.
|
---|
394 |
|
---|
395 | **/
|
---|
396 | typedef
|
---|
397 | EFI_STATUS
|
---|
398 | (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK_FUNCTION)(
|
---|
399 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
400 | IN VOID *Context,
|
---|
401 | IN BLUETOOTH_ADDRESS *BDAddr,
|
---|
402 | OUT UINT8 LinkKey[BLUETOOTH_HCI_LINK_KEY_SIZE]
|
---|
403 | );
|
---|
404 |
|
---|
405 | /**
|
---|
406 | Register get link key callback function.
|
---|
407 |
|
---|
408 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
409 | @param Callback The callback function. NULL means unregister.
|
---|
410 | @param Context Data passed into Callback function. This is optional parameter and may be NULL.
|
---|
411 |
|
---|
412 | @retval EFI_SUCCESS The link key callback function is registered successfully.
|
---|
413 |
|
---|
414 | **/
|
---|
415 | typedef
|
---|
416 | EFI_STATUS
|
---|
417 | (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK)(
|
---|
418 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
419 | IN EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK_FUNCTION Callback,
|
---|
420 | IN VOID *Context
|
---|
421 | );
|
---|
422 |
|
---|
423 | /**
|
---|
424 | The callback function to set link key.
|
---|
425 |
|
---|
426 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
427 | @param Context Context passed from registration.
|
---|
428 | @param BDAddr A pointer to Bluetooth device address.
|
---|
429 | @param LinkKey A pointer to the buffer of link key.
|
---|
430 |
|
---|
431 | @retval EFI_SUCCESS The callback function complete successfully.
|
---|
432 |
|
---|
433 | **/
|
---|
434 | typedef
|
---|
435 | EFI_STATUS
|
---|
436 | (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK_FUNCTION)(
|
---|
437 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
438 | IN VOID *Context,
|
---|
439 | IN BLUETOOTH_ADDRESS *BDAddr,
|
---|
440 | IN UINT8 LinkKey[BLUETOOTH_HCI_LINK_KEY_SIZE]
|
---|
441 | );
|
---|
442 |
|
---|
443 | /**
|
---|
444 | Register set link key callback function.
|
---|
445 |
|
---|
446 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
447 | @param Callback The callback function. NULL means unregister.
|
---|
448 | @param Context Data passed into Callback function. This is optional parameter and may be NULL.
|
---|
449 |
|
---|
450 | @retval EFI_SUCCESS The link key callback function is registered successfully.
|
---|
451 |
|
---|
452 | **/
|
---|
453 | typedef
|
---|
454 | EFI_STATUS
|
---|
455 | (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK)(
|
---|
456 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
457 | IN EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK_FUNCTION Callback,
|
---|
458 | IN VOID *Context
|
---|
459 | );
|
---|
460 |
|
---|
461 | /**
|
---|
462 | The callback function. It is called after connect completed.
|
---|
463 |
|
---|
464 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
465 | @param Context Context passed from registration.
|
---|
466 | @param CallbackType Callback type in EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE.
|
---|
467 | @param BDAddr A pointer to Bluetooth device address.
|
---|
468 | @param InputBuffer A pointer to the buffer of data that is input from callback caller.
|
---|
469 | @param InputBufferSize Indicates the size, in bytes, of the data buffer specified by InputBuffer.
|
---|
470 |
|
---|
471 | @retval EFI_SUCCESS The callback function complete successfully.
|
---|
472 |
|
---|
473 | **/
|
---|
474 | typedef
|
---|
475 | EFI_STATUS
|
---|
476 | (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK_FUNCTION)(
|
---|
477 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
478 | IN VOID *Context,
|
---|
479 | IN EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE CallbackType,
|
---|
480 | IN BLUETOOTH_ADDRESS *BDAddr,
|
---|
481 | IN VOID *InputBuffer,
|
---|
482 | IN UINTN InputBufferSize
|
---|
483 | );
|
---|
484 |
|
---|
485 | /**
|
---|
486 | Register link connect complete callback function.
|
---|
487 |
|
---|
488 | @param This Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
|
---|
489 | @param Callback The callback function. NULL means unregister.
|
---|
490 | @param Context Data passed into Callback function. This is optional parameter and may be NULL.
|
---|
491 |
|
---|
492 | @retval EFI_SUCCESS The link connect complete callback function is registered successfully.
|
---|
493 |
|
---|
494 | **/
|
---|
495 | typedef
|
---|
496 | EFI_STATUS
|
---|
497 | (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK)(
|
---|
498 | IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This,
|
---|
499 | IN EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK_FUNCTION Callback,
|
---|
500 | IN VOID *Context
|
---|
501 | );
|
---|
502 |
|
---|
503 | ///
|
---|
504 | /// This protocol abstracts user interface configuration for Bluetooth device.
|
---|
505 | ///
|
---|
506 | struct _EFI_BLUETOOTH_CONFIG_PROTOCOL {
|
---|
507 | EFI_BLUETOOTH_CONFIG_INIT Init;
|
---|
508 | EFI_BLUETOOTH_CONFIG_SCAN Scan;
|
---|
509 | EFI_BLUETOOTH_CONFIG_CONNECT Connect;
|
---|
510 | EFI_BLUETOOTH_CONFIG_DISCONNECT Disconnect;
|
---|
511 | EFI_BLUETOOTH_CONFIG_GET_DATA GetData;
|
---|
512 | EFI_BLUETOOTH_CONFIG_SET_DATA SetData;
|
---|
513 | EFI_BLUETOOTH_CONFIG_GET_REMOTE_DATA GetRemoteData;
|
---|
514 | EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK RegisterPinCallback;
|
---|
515 | EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK RegisterGetLinkKeyCallback;
|
---|
516 | EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK RegisterSetLinkKeyCallback;
|
---|
517 | EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK RegisterLinkConnectCompleteCallback;
|
---|
518 | };
|
---|
519 |
|
---|
520 | extern EFI_GUID gEfiBluetoothConfigProtocolGuid;
|
---|
521 |
|
---|
522 | #endif
|
---|