2 EFI Bluetooth LE Config Protocol as defined in UEFI 2.7.
3 This protocol abstracts user interface configuration for BluetoothLe device.
5 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 @par Revision Reference:
15 This Protocol is introduced in UEFI Specification 2.7
19 #ifndef __EFI_BLUETOOTH_LE_CONFIG_H__
20 #define __EFI_BLUETOOTH_LE_CONFIG_H__
22 #include <Protocol/BluetoothConfig.h>
23 #include <Protocol/BluetoothAttribute.h>
25 #define EFI_BLUETOOTH_LE_CONFIG_PROTOCOL_GUID \
27 0x8f76da58, 0x1f99, 0x4275, { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 } \
30 typedef struct _EFI_BLUETOOTH_LE_CONFIG_PROTOCOL EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
;
33 Initialize BluetoothLE host controller and local device.
35 The Init() function initializes BluetoothLE host controller and local device.
37 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
39 @retval EFI_SUCCESS The BluetoothLE host controller and local device is initialized successfully.
40 @retval EFI_DEVICE_ERROR A hardware error occurred trying to initialize the BluetoothLE host controller
46 (EFIAPI
*EFI_BLUETOOTH_LE_CONFIG_INIT
)(
47 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
52 /// The version of the structure. A value of zero represents the EFI_BLUETOOTH_LE_CONFIG_SCAN_PARAMETER
53 /// structure as defined here. Future version of this specification may extend this data structure in a
54 /// backward compatible way and increase the value of Version.
58 /// Passive scanning or active scanning. See Bluetooth specification.
62 /// Recommended scan interval to be used while performing scan.
66 /// Recommended scan window to be used while performing a scan.
70 /// Recommended scanning filter policy to be used while performing a scan.
72 UINT8 ScanningFilterPolicy
;
74 /// This is one byte flag to serve as a filter to remove unneeded scan
75 /// result. For example, set BIT0 means scan in LE Limited Discoverable
76 /// Mode. Set BIT1 means scan in LE General Discoverable Mode.
78 UINT8 AdvertisementFlagFilter
;
79 } EFI_BLUETOOTH_LE_CONFIG_SCAN_PARAMETER
;
82 BLUETOOTH_LE_ADDRESS BDAddr
;
83 BLUETOOTH_LE_ADDRESS DirectAddress
;
84 UINT8 RemoteDeviceState
;
86 UINTN AdvertisementDataSize
;
87 VOID
*AdvertisementData
;
88 } EFI_BLUETOOTH_LE_SCAN_CALLBACK_INFORMATION
;
91 Callback function, it is called if a BluetoothLE device is found during scan process.
93 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
94 @param[in] Context Context passed from scan request.
95 @param[in] CallbackInfo Data related to scan result. NULL CallbackInfo means scan complete.
97 @retval EFI_SUCCESS The callback function complete successfully.
102 (EFIAPI
*EFI_BLUETOOTH_LE_CONFIG_SCAN_CALLBACK_FUNCTION
) (
103 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
105 IN EFI_BLUETOOTH_LE_SCAN_CALLBACK_INFORMATION
*CallbackInfo
109 Scan BluetoothLE device.
111 The Scan() function scans BluetoothLE device. When this function is returned, it just means scan
112 request is submitted. It does not mean scan process is started or finished. Whenever there is a
113 BluetoothLE device is found, the Callback function will be called. Callback function might be
114 called before this function returns or after this function returns
116 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
117 @param[in] ReScan If TRUE, a new scan request is submitted no matter there is scan result before.
118 If FALSE and there is scan result, the previous scan result is returned and no scan request
120 @param[in] Timeout Duration in milliseconds for which to scan.
121 @param[in] ScanParameter If it is not NULL, the ScanParameter is used to perform a scan by the BluetoothLE bus driver.
122 If it is NULL, the default parameter is used.
123 @param[in] Callback The callback function. This function is called if a BluetoothLE device is found during
125 @param[in] Context Data passed into Callback function. This is optional parameter and may be NULL.
127 @retval EFI_SUCCESS The Bluetooth scan request is submitted.
128 @retval EFI_DEVICE_ERROR A hardware error occurred trying to scan the BluetoothLE device.
133 (EFIAPI
*EFI_BLUETOOTH_LE_CONFIG_SCAN
)(
134 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
137 IN EFI_BLUETOOTH_LE_CONFIG_SCAN_PARAMETER
*ScanParameter
, OPTIONAL
138 IN EFI_BLUETOOTH_LE_CONFIG_SCAN_CALLBACK_FUNCTION Callback
,
144 /// The version of the structure. A value of zero represents the
145 /// EFI_BLUETOOTH_LE_CONFIG_CONNECT_PARAMETER
146 /// structure as defined here. Future version of this specification may
147 /// extend this data structure in a backward compatible way and
148 /// increase the value of Version.
152 /// Recommended scan interval to be used while performing scan before connect.
156 /// Recommended scan window to be used while performing a connection
160 /// Minimum allowed connection interval. Shall be less than or equal to ConnIntervalMax.
162 UINT16 ConnIntervalMin
;
164 /// Maximum allowed connection interval. Shall be greater than or equal to ConnIntervalMin.
166 UINT16 ConnIntervalMax
;
168 /// Slave latency for the connection in number of connection events.
172 /// Link supervision timeout for the connection.
174 UINT16 SupervisionTimeout
;
175 } EFI_BLUETOOTH_LE_CONFIG_CONNECT_PARAMETER
;
178 Connect a BluetoothLE device.
180 The Connect() function connects a Bluetooth device. When this function is returned successfully,
181 a new EFI_BLUETOOTH_IO_PROTOCOL is created.
183 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
184 @param[in] AutoReconnect If TRUE, the BluetoothLE host controller needs to do an auto
185 reconnect. If FALSE, the BluetoothLE host controller does not do
187 @param[in] DoBonding If TRUE, the BluetoothLE host controller needs to do a bonding.
188 If FALSE, the BluetoothLE host controller does not do a bonding.
189 @param[in] ConnectParameter If it is not NULL, the ConnectParameter is used to perform a
190 scan by the BluetoothLE bus driver. If it is NULL, the default
192 @param[in] BD_ADDR The address of the BluetoothLE device to be connected.
194 @retval EFI_SUCCESS The BluetoothLE device is connected successfully.
195 @retval EFI_ALREADY_STARTED The BluetoothLE device is already connected.
196 @retval EFI_NOT_FOUND The BluetoothLE device is not found.
197 @retval EFI_DEVICE_ERROR A hardware error occurred trying to connect the BluetoothLE device.
202 (EFIAPI
*EFI_BLUETOOTH_LE_CONFIG_CONNECT
)(
203 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
204 IN BOOLEAN AutoReconnect
,
205 IN BOOLEAN DoBonding
,
206 IN EFI_BLUETOOTH_LE_CONFIG_CONNECT_PARAMETER
*ConnectParameter
, OPTIONAL
207 IN BLUETOOTH_LE_ADDRESS
*BD_ADDR
211 Disconnect a BluetoothLE device.
213 The Disconnect() function disconnects a BluetoothLE device. When this function is returned
214 successfully, the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL associated with this device is
215 destroyed and all services associated are stopped.
217 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
218 @param[in] BD_ADDR The address of BluetoothLE device to be connected.
219 @param[in] Reason Bluetooth disconnect reason. See Bluetooth specification for detail.
221 @retval EFI_SUCCESS The BluetoothLE device is disconnected successfully.
222 @retval EFI_NOT_STARTED The BluetoothLE device is not connected.
223 @retval EFI_NOT_FOUND The BluetoothLE device is not found.
224 @retval EFI_DEVICE_ERROR A hardware error occurred trying to disconnect the BluetoothLE device.
229 (EFIAPI
*EFI_BLUETOOTH_LE_CONFIG_DISCONNECT
)(
230 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
231 IN BLUETOOTH_LE_ADDRESS
*BD_ADDR
,
236 Get BluetoothLE configuration data.
238 The GetData() function returns BluetoothLE configuration data. For remote BluetoothLE device
239 configuration data, please use GetRemoteData() function with valid BD_ADDR.
241 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
242 @param[in] DataType Configuration data type.
243 @param[in, out] DataSize On input, indicates the size, in bytes, of the data buffer specified by Data.
244 On output, indicates the amount of data actually returned.
245 @param[in, out] Data A pointer to the buffer of data that will be returned.
247 @retval EFI_SUCCESS The BluetoothLE configuration data is returned successfully.
248 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
252 @retval EFI_UNSUPPORTED The DataType is unsupported.
253 @retval EFI_NOT_FOUND The DataType is not found.
254 @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.
259 (EFIAPI
*EFI_BLUETOOTH_LE_CONFIG_GET_DATA
) (
260 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
261 IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType
,
262 IN OUT UINTN
*DataSize
,
263 IN OUT VOID
*Data OPTIONAL
267 Set BluetoothLE configuration data.
269 The SetData() function sets local BluetoothLE device configuration data. Not all DataType can be
272 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
273 @param[in] DataType Configuration data type.
274 @param[in] DataSize Indicates the size, in bytes, of the data buffer specified by Data.
275 @param[in] Data A pointer to the buffer of data that will be set.
277 @retval EFI_SUCCESS The BluetoothLE configuration data is set successfully.
278 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
281 @retval EFI_UNSUPPORTED The DataType is unsupported.
282 @retval EFI_WRITE_PROTECTED Cannot set configuration data.
287 (EFIAPI
*EFI_BLUETOOTH_LE_CONFIG_SET_DATA
) (
288 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
289 IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType
,
295 Get remove BluetoothLE device configuration data.
297 The GetRemoteData() function returns remote BluetoothLE device configuration data.
299 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
300 @param[in] DataType Configuration data type.
301 @param[in] BDAddr Remote BluetoothLE device address.
302 @param[in, out] DataSize On input, indicates the size, in bytes, of the data buffer specified by Data.
303 On output, indicates the amount of data actually returned.
304 @param[in, out] Data A pointer to the buffer of data that will be returned.
306 @retval EFI_SUCCESS The remote BluetoothLE device configuration data is returned successfully.
307 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
311 @retval EFI_UNSUPPORTED The DataType is unsupported.
312 @retval EFI_NOT_FOUND The DataType is not found.
313 @retval EFI_BUFFER_TOO_SMALL The buffer is too small to hold the buffer.
318 (EFIAPI
*EFI_BLUETOOTH_LE_CONFIG_GET_REMOTE_DATA
) (
319 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
320 IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType
,
321 IN BLUETOOTH_LE_ADDRESS
*BDAddr
,
322 IN OUT UINTN
*DataSize
,
328 /// It indicates an authorization request. No data is associated with the callback
329 /// input. In the output data, the application should return the authorization value.
330 /// The data structure is BOOLEAN. TRUE means YES. FALSE means NO.
332 EfiBluetoothSmpAuthorizationRequestEvent
,
334 /// It indicates that a passkey has been generated locally by the driver, and the same
335 /// passkey should be entered at the remote device. The callback input data is the
336 /// passkey of type UINT32, to be displayed by the application. No output data
337 /// should be returned.
339 EfiBluetoothSmpPasskeyReadyEvent
,
341 /// It indicates that the driver is requesting for the passkey has been generated at
342 /// the remote device. No data is associated with the callback input. The output data
343 /// is the passkey of type UINT32, to be entered by the user.
345 EfiBluetoothSmpPasskeyRequestEvent
,
347 /// It indicates that the driver is requesting for the passkey that has been pre-shared
348 /// out-of-band with the remote device. No data is associated with the callback
349 /// input. The output data is the stored OOB data of type UINT8[16].
351 EfiBluetoothSmpOOBDataRequestEvent
,
353 /// In indicates that a number have been generated locally by the bus driver, and
354 /// also at the remote device, and the bus driver wants to know if the two numbers
355 /// match. The callback input data is the number of type UINT32. The output data
356 /// is confirmation value of type BOOLEAN. TRUE means comparison pass. FALSE
357 /// means comparison fail.
359 EfiBluetoothSmpNumericComparisonEvent
,
360 } EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE
;
363 The callback function for SMP.
365 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
366 @param[in] Context Data passed into callback function. This is optional parameter
368 @param[in] BDAddr Remote BluetoothLE device address.
369 @param[in] EventDataType Event data type in EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE.
370 @param[in] DataSize Indicates the size, in bytes, of the data buffer specified by Data.
371 @param[in] Data A pointer to the buffer of data.
373 @retval EFI_SUCCESS The callback function complete successfully.
378 (EFIAPI
*EFI_BLUETOOTH_LE_SMP_CALLBACK
) (
379 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
381 IN BLUETOOTH_LE_ADDRESS
*BDAddr
,
382 IN EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE EventDataType
,
388 Register Security Manager Protocol callback function for user authentication/authorization.
390 The RegisterSmpAuthCallback() function register Security Manager Protocol callback
391 function for user authentication/authorization.
393 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
394 @param[in] Callback Callback function for user authentication/authorization.
395 @param[in] Context Data passed into Callback function. This is optional parameter and may be NULL.
397 @retval EFI_SUCCESS The SMP callback function is registered successfully.
398 @retval EFI_ALREADY_STARTED A callback function is already registered on the same attribute
399 opcode and attribute handle, when the Callback is not NULL.
400 @retval EFI_NOT_STARTED A callback function is not registered on the same attribute opcode
401 and attribute handle, when the Callback is NULL.
406 (EFIAPI
*EFI_BLUETOOTH_LE_REGISTER_SMP_AUTH_CALLBACK
) (
407 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
408 IN EFI_BLUETOOTH_LE_SMP_CALLBACK Callback
,
413 Send user authentication/authorization to remote device.
415 The SendSmpAuthData() function sends user authentication/authorization to remote device. It
416 should be used to send these information after the caller gets the request data from the callback
417 function by RegisterSmpAuthCallback().
419 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
420 @param[in] BDAddr Remote BluetoothLE device address.
421 @param[in] EventDataType Event data type in EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE.
422 @param[in] DataSize The size of Data in bytes, of the data buffer specified by Data.
423 @param[in] Data A pointer to the buffer of data that will be sent. The data format
424 depends on the type of SMP event data being responded to.
426 @retval EFI_SUCCESS The SMP authorization data is sent successfully.
427 @retval EFI_NOT_READY SMP is not in the correct state to receive the auth data.
432 (EFIAPI
*EFI_BLUETOOTH_LE_SEND_SMP_AUTH_DATA
) (
433 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
434 IN BLUETOOTH_LE_ADDRESS
*BDAddr
,
435 IN EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE EventDataType
,
441 // For local device only
442 EfiBluetoothSmpLocalIR
, /* If Key hierarchy is supported */
443 EfiBluetoothSmpLocalER
, /* If Key hierarchy is supported */
444 EfiBluetoothSmpLocalDHK
, /* If Key hierarchy is supported. OPTIONAL */
446 EfiBluetoothSmpKeysDistributed
= 0x1000,
447 EfiBluetoothSmpKeySize
,
448 EfiBluetoothSmpKeyType
,
449 EfiBluetoothSmpPeerLTK
,
450 EfiBluetoothSmpPeerIRK
,
451 EfiBluetoothSmpPeerCSRK
,
452 EfiBluetoothSmpPeerRand
,
453 EfiBluetoothSmpPeerEDIV
,
454 EfiBluetoothSmpPeerSignCounter
,
455 EfiBluetoothSmpLocalLTK
, /* If Key hierarchy not supported */
456 EfiBluetoothSmpLocalIRK
, /* If Key hierarchy not supported */
457 EfiBluetoothSmpLocalCSRK
, /* If Key hierarchy not supported */
458 EfiBluetoothSmpLocalSignCounter
,
459 EfiBluetoothSmpLocalDIV
,
460 } EFI_BLUETOOTH_LE_SMP_DATA_TYPE
;
463 The callback function to get SMP data.
465 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
466 @param[in] Context Data passed into callback function. This is optional parameter
468 @param[in] BDAddr Remote BluetoothLE device address. For Local device setting, it
470 @param[in] DataType Data type in EFI_BLUETOOTH_LE_SMP_DATA_TYPE.
471 @param[in, out] DataSize On input, indicates the size, in bytes, of the data buffer specified
472 by Data. On output, indicates the amount of data actually returned.
473 @param[out] Data A pointer to the buffer of data that will be returned.
475 @retval EFI_SUCCESS The callback function complete successfully.
480 (EFIAPI
* EFI_BLUETOOTH_LE_CONFIG_SMP_GET_DATA_CALLBACK
) (
481 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
483 IN BLUETOOTH_LE_ADDRESS
*BDAddr
,
484 IN EFI_BLUETOOTH_LE_SMP_DATA_TYPE DataType
,
485 IN OUT UINTN
*DataSize
,
490 Register a callback function to get SMP related data.
492 The RegisterSmpGetDataCallback() function registers a callback function to get SMP related data.
494 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
495 @param[in] Callback Callback function for SMP get data.
496 @param[in] Context Data passed into Callback function. This is optional parameter and may be NULL.
498 @retval EFI_SUCCESS The SMP get data callback function is registered successfully.
499 @retval EFI_ALREADY_STARTED A callback function is already registered on the same attribute
500 opcode and attribute handle, when the Callback is not NULL.
501 @retval EFI_NOT_STARTED A callback function is not registered on the same attribute opcode
502 and attribute handle, when the Callback is NULL
506 (EFIAPI
* EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_GET_DATA_CALLBACK
) (
507 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
508 IN EFI_BLUETOOTH_LE_CONFIG_SMP_GET_DATA_CALLBACK Callback
,
513 The callback function to set SMP data.
515 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
516 @param[in] Context Data passed into callback function. This is optional parameter
518 @param[in] BDAddr Remote BluetoothLE device address.
519 @param[in] DataType Data type in EFI_BLUETOOTH_LE_SMP_DATA_TYPE.
520 @param[in] DataSize Indicates the size, in bytes, of the data buffer specified by Data.
521 @param[in] Data A pointer to the buffer of data.
523 @retval EFI_SUCCESS The callback function complete successfully.
528 (EFIAPI
* EFI_BLUETOOTH_LE_CONFIG_SMP_SET_DATA_CALLBACK
) (
529 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
531 IN BLUETOOTH_LE_ADDRESS
*BDAddr
,
532 IN EFI_BLUETOOTH_LE_SMP_DATA_TYPE Type
,
538 Register a callback function to set SMP related data.
540 The RegisterSmpSetDataCallback() function registers a callback function to set SMP related data.
542 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
543 @param[in] Callback Callback function for SMP set data.
544 @param[in] Context Data passed into Callback function. This is optional parameter and may be NULL.
546 @retval EFI_SUCCESS The SMP set data callback function is registered successfully.
547 @retval EFI_ALREADY_STARTED A callback function is already registered on the same attribute
548 opcode and attribute handle, when the Callback is not NULL.
549 @retval EFI_NOT_STARTED A callback function is not registered on the same attribute opcode
550 and attribute handle, when the Callback is NULL
554 (EFIAPI
* EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_SET_DATA_CALLBACK
) (
555 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
556 IN EFI_BLUETOOTH_LE_CONFIG_SMP_SET_DATA_CALLBACK Callback
,
561 The callback function to hook connect complete event.
563 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
564 @param[in] Context Data passed into callback function. This is optional parameter
566 @param[in] CallbackType The value defined in EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE.
567 @param[in] BDAddr Remote BluetoothLE device address.
568 @param[in] InputBuffer A pointer to the buffer of data that is input from callback caller.
569 @param[in] InputBufferSize Indicates the size, in bytes, of the data buffer specified by InputBuffer.
571 @retval EFI_SUCCESS The callback function complete successfully.
576 (EFIAPI
*EFI_BLUETOOTH_LE_CONFIG_CONNECT_COMPLETE_CALLBACK
) (
577 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
579 IN EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE CallbackType
,
580 IN BLUETOOTH_LE_ADDRESS
*BDAddr
,
581 IN VOID
*InputBuffer
,
582 IN UINTN InputBufferSize
586 Register link connect complete callback function.
588 The RegisterLinkConnectCompleteCallback() function registers Bluetooth link connect
589 complete callback function. The Bluetooth Configuration driver may call
590 RegisterLinkConnectCompleteCallback() to register a callback function. During pairing,
591 Bluetooth bus driver must trigger this callback function to report device state, if it is registered.
592 Then Bluetooth Configuration driver will get information on device connection, according to
593 CallbackType defined by EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE
595 @param[in] This Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
596 @param[in] Callback The callback function. NULL means unregister.
597 @param[in] Context Data passed into Callback function. This is optional parameter and may be NULL.
599 @retval EFI_SUCCESS The link connect complete callback function is registered successfully.
600 @retval EFI_ALREADY_STARTED A callback function is already registered on the same attribute
601 opcode and attribute handle, when the Callback is not NULL.
602 @retval EFI_NOT_STARTED A callback function is not registered on the same attribute opcode
603 and attribute handle, when the Callback is NULL
607 (EFIAPI
*EFI_BLUETOOTH_LE_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK
) (
608 IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
*This
,
609 IN EFI_BLUETOOTH_LE_CONFIG_CONNECT_COMPLETE_CALLBACK Callback
,
614 /// This protocol abstracts user interface configuration for BluetoothLe device.
616 struct _EFI_BLUETOOTH_LE_CONFIG_PROTOCOL
{
617 EFI_BLUETOOTH_LE_CONFIG_INIT Init
;
618 EFI_BLUETOOTH_LE_CONFIG_SCAN Scan
;
619 EFI_BLUETOOTH_LE_CONFIG_CONNECT Connect
;
620 EFI_BLUETOOTH_LE_CONFIG_DISCONNECT Disconnect
;
621 EFI_BLUETOOTH_LE_CONFIG_GET_DATA GetData
;
622 EFI_BLUETOOTH_LE_CONFIG_SET_DATA SetData
;
623 EFI_BLUETOOTH_LE_CONFIG_GET_REMOTE_DATA GetRemoteData
;
624 EFI_BLUETOOTH_LE_REGISTER_SMP_AUTH_CALLBACK RegisterSmpAuthCallback
;
625 EFI_BLUETOOTH_LE_SEND_SMP_AUTH_DATA SendSmpAuthData
;
626 EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_GET_DATA_CALLBACK RegisterSmpGetDataCallback
;
627 EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_SET_DATA_CALLBACK RegisterSmpSetDataCallback
;
628 EFI_BLUETOOTH_LE_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK RegisterLinkConnectCompleteCallback
;
631 extern EFI_GUID gEfiBluetoothLeConfigProtocolGuid
;