]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/BluetoothConfig.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Protocol / BluetoothConfig.h
index b1b3f551263e01ef937ab11f80f38a1577b52239..4f19a1ea31b9ba146a6b50fc601e1b27b21b17a5 100644 (file)
@@ -1,18 +1,18 @@
 /** @file\r
-  EFI Bluetooth Configuration Protocol as defined in UEFI 2.5.\r
+  EFI Bluetooth Configuration Protocol as defined in UEFI 2.7.\r
   This protocol abstracts user interface configuration for Bluetooth device.\r
 \r
-  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials are licensed and made available under \r
-  the terms and conditions of the BSD License that accompanies this distribution.  \r
+  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
   The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  http://opensource.org/licenses/bsd-license.php.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  @par Revision Reference:          \r
-  This Protocol is introduced in UEFI Specification 2.5\r
+  @par Revision Reference:\r
+  This Protocol is introduced in UEFI Specification 2.7\r
 \r
 **/\r
 \r
@@ -25,7 +25,7 @@
   { \\r
     0x62960cf3, 0x40ff, 0x4263, { 0xa7, 0x7c, 0xdf, 0xde, 0xbd, 0x19, 0x1b, 0x4b } \\r
   }\r
-  \r
+\r
 typedef struct _EFI_BLUETOOTH_CONFIG_PROTOCOL EFI_BLUETOOTH_CONFIG_PROTOCOL;\r
 \r
 typedef UINT32      EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_TYPE;\r
@@ -41,7 +41,7 @@ typedef struct {
   ///\r
   BLUETOOTH_ADDRESS         BDAddr;\r
   ///\r
-  /// State of the remote deive \r
+  /// State of the remote deive\r
   ///\r
   UINT8                     RemoteDeviceState;\r
   ///\r
@@ -69,7 +69,7 @@ typedef enum {
   ///\r
   /// Remote Bluetooth device state. Data structure is EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_TYPE.\r
   ///\r
-  EfiBluetoothConfigDataTypeRemoteDeviceState,\r
+  EfiBluetoothConfigDataTypeRemoteDeviceState, /* Relevant for LE*/\r
   ///\r
   /// Local/Remote Bluetooth device SDP information. Data structure is UINT8[].\r
   ///\r
@@ -77,11 +77,11 @@ typedef enum {
   ///\r
   /// Local Bluetooth device address. Data structure is BLUETOOTH_ADDRESS.\r
   ///\r
-  EfiBluetoothConfigDataTypeBDADDR,\r
+  EfiBluetoothConfigDataTypeBDADDR, /* Relevant for LE*/\r
   ///\r
   /// Local Bluetooth discoverable state. Data structure is UINT8. (Page scan and/or Inquiry scan)\r
   ///\r
-  EfiBluetoothConfigDataTypeDiscoverable,\r
+  EfiBluetoothConfigDataTypeDiscoverable, /* Relevant for LE*/\r
   ///\r
   /// Local Bluetooth controller stored paired device list. Data structure is BLUETOOTH_ADDRESS[].\r
   ///\r
@@ -90,6 +90,21 @@ typedef enum {
   /// Local available device list. Data structure is BLUETOOTH_ADDRESS[].\r
   ///\r
   EfiBluetoothConfigDataTypeAvailableDeviceList,\r
+  EfiBluetoothConfigDataTypeRandomAddress, /* Relevant for LE*/\r
+  EfiBluetoothConfigDataTypeRSSI, /* Relevant for LE*/\r
+  ///\r
+  /// Advertisement report. Data structure is UNIT8[].\r
+  ///\r
+  EfiBluetoothConfigDataTypeAdvertisementData, /* Relevant for LE*/\r
+  EfiBluetoothConfigDataTypeIoCapability, /* Relevant for LE*/\r
+  EfiBluetoothConfigDataTypeOOBDataFlag, /* Relevant for LE*/\r
+  ///\r
+  /// KeyType of Authentication Requirements flag of local\r
+  /// device as UINT8, indicating requested security properties.\r
+  /// See Bluetooth specification 3.H.3.5.1. BIT0: MITM, BIT1:SC.\r
+  ///\r
+  EfiBluetoothConfigDataTypeKeyType, /* Relevant for LE*/\r
+  EfiBluetoothConfigDataTypeEncKeySize, /* Relevant for LE*/\r
   EfiBluetoothConfigDataTypeMax,\r
 } EFI_BLUETOOTH_CONFIG_DATA_TYPE;\r
 \r
@@ -98,12 +113,12 @@ typedef enum {
 ///\r
 typedef enum {\r
   ///\r
-  /// For SSP - passkey entry. Input buffer is Passkey (4 bytes). No output buffer. \r
+  /// For SSP - passkey entry. Input buffer is Passkey (4 bytes). No output buffer.\r
   /// See Bluetooth HCI command for detail.\r
   ///\r
   EfiBluetoothCallbackTypeUserPasskeyNotification,\r
   ///\r
-  /// For SSP - just work and numeric comparison. Input buffer is numeric value (4 bytes). \r
+  /// For SSP - just work and numeric comparison. Input buffer is numeric value (4 bytes).\r
   /// Output buffer is BOOLEAN (1 byte). See Bluetooth HCI command for detail.\r
   ///\r
   EfiBluetoothCallbackTypeUserConfirmationRequest,\r
@@ -112,7 +127,7 @@ typedef enum {
   ///\r
   EfiBluetoothCallbackTypeOOBDataRequest,\r
   ///\r
-  /// For legacy paring. No input buffer. Output buffer is PIN code( <= 16 bytes). \r
+  /// For legacy paring. No input buffer. Output buffer is PIN code( <= 16 bytes).\r
   /// See Bluetooth HCI command for detail.\r
   ///\r
   EfiBluetoothCallbackTypePinCodeRequest,\r
@@ -124,44 +139,44 @@ typedef enum {
 ///\r
 typedef enum {\r
   ///\r
-  /// This callback is called when Bluetooth receive Disconnection_Complete event. Input buffer is Event \r
+  /// This callback is called when Bluetooth receive Disconnection_Complete event. Input buffer is Event\r
   /// Parameters of Disconnection_Complete Event defined in Bluetooth specification.\r
   ///\r
   EfiBluetoothConnCallbackTypeDisconnected,\r
   ///\r
-  /// This callback is called when Bluetooth receive Connection_Complete event. Input buffer is Event \r
+  /// This callback is called when Bluetooth receive Connection_Complete event. Input buffer is Event\r
   /// Parameters of Connection_Complete Event defined in Bluetooth specification.\r
   ///\r
   EfiBluetoothConnCallbackTypeConnected,\r
   ///\r
-  /// This callback is called when Bluetooth receive Authentication_Complete event. Input buffer is Event \r
+  /// This callback is called when Bluetooth receive Authentication_Complete event. Input buffer is Event\r
   /// Parameters of Authentication_Complete Event defined in Bluetooth specification.\r
   ///\r
   EfiBluetoothConnCallbackTypeAuthenticated,\r
   ///\r
-  /// This callback is called when Bluetooth receive Encryption_Change event. Input buffer is Event \r
+  /// This callback is called when Bluetooth receive Encryption_Change event. Input buffer is Event\r
   /// Parameters of Encryption_Change Event defined in Bluetooth specification.\r
   ///\r
   EfiBluetoothConnCallbackTypeEncrypted\r
 } EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE;\r
 \r
-  \r
+\r
 /**\r
   Initialize Bluetooth host controller and local device.\r
 \r
   @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
 \r
   @retval EFI_SUCCESS           The Bluetooth host controller and local device is initialized successfully.\r
-  @retval EFI_DEVICE_ERROR      A hardware error occurred trying to initialize the Bluetooth host controller \r
+  @retval EFI_DEVICE_ERROR      A hardware error occurred trying to initialize the Bluetooth host controller\r
                                 and local device.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_INIT)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL  *This\r
   );\r
-  \r
+\r
 /**\r
   Callback function, it is called if a Bluetooth device is found during scan process.\r
 \r
@@ -179,16 +194,16 @@ EFI_STATUS
   IN VOID                                     *Context,\r
   IN EFI_BLUETOOTH_SCAN_CALLBACK_INFORMATION  *CallbackInfo\r
   );\r
-  \r
+\r
 /**\r
   Scan Bluetooth device.\r
 \r
   @param  This          Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.\r
-  @param  ReScan        If TRUE, a new scan request is submitted no matter there is scan result before. \r
-                        If FALSE and there is scan result, the previous scan result is returned and no scan request \r
+  @param  ReScan        If TRUE, a new scan request is submitted no matter there is scan result before.\r
+                        If FALSE and there is scan result, the previous scan result is returned and no scan request\r
                         is submitted.\r
   @param  ScanType      Bluetooth scan type, Inquiry and/or Page. See Bluetooth specification for detail.\r
-  @param  Callback      The callback function. This function is called if a Bluetooth device is found during scan \r
+  @param  Callback      The callback function. This function is called if a Bluetooth device is found during scan\r
                         process.\r
   @param  Context       Data passed into Callback function. This is optional parameter and may be NULL.\r
 \r
@@ -196,7 +211,7 @@ EFI_STATUS
   @retval EFI_DEVICE_ERROR      A hardware error occurred trying to scan the Bluetooth device.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_SCAN)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
@@ -205,7 +220,7 @@ EFI_STATUS
   IN EFI_BLUETOOTH_CONFIG_SCAN_CALLBACK_FUNCTION    Callback,\r
   IN VOID                                           *Context\r
   );\r
-  \r
+\r
 /**\r
   Connect a Bluetooth device.\r
 \r
@@ -218,7 +233,7 @@ EFI_STATUS
   @retval EFI_DEVICE_ERROR      A hardware error occurred trying to connect the Bluetooth device.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_CONNECT)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
@@ -238,14 +253,14 @@ EFI_STATUS
   @retval EFI_DEVICE_ERROR      A hardware error occurred trying to disconnect the Bluetooth device.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_DISCONNECT)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
   IN BLUETOOTH_ADDRESS                              *BD_ADDR,\r
   IN UINT8                                          Reason\r
   );\r
-  \r
+\r
 /**\r
   Get Bluetooth configuration data.\r
 \r
@@ -258,14 +273,14 @@ EFI_STATUS
   @retval EFI_SUCCESS           The Bluetooth configuration data is returned successfully.\r
   @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
                                 - DataSize is NULL.\r
-                                - *DataSize is 0.\r
-                                - Data is NULL.\r
+                                - *DataSize is not 0 and Data is NULL.\r
   @retval EFI_UNSUPPORTED       The DataType is unsupported.\r
   @retval EFI_NOT_FOUND         The DataType is not found.\r
   @retval EFI_BUFFER_TOO_SMALL  The buffer is too small to hold the buffer.\r
+                                *DataSize has been updated with the size needed to complete the request.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_GET_DATA)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
@@ -273,7 +288,7 @@ EFI_STATUS
   IN OUT UINTN                                      *DataSize,\r
   IN OUT VOID                                       *Data\r
   );\r
-  \r
+\r
 /**\r
   Set Bluetooth configuration data.\r
 \r
@@ -290,7 +305,7 @@ EFI_STATUS
   @retval EFI_BUFFER_TOO_SMALL  Cannot set configuration data.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_SET_DATA)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
@@ -298,7 +313,7 @@ EFI_STATUS
   IN UINTN                                          DataSize,\r
   IN VOID                                           *Data\r
   );\r
-  \r
+\r
 /**\r
   Get remove Bluetooth device configuration data.\r
 \r
@@ -312,23 +327,23 @@ EFI_STATUS
   @retval EFI_SUCCESS           The remote Bluetooth device configuration data is returned successfully.\r
   @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
                                 - DataSize is NULL.\r
-                                - *DataSize is 0.\r
-                                - Data is NULL.\r
+                                - *DataSize is not 0 and Data is NULL.\r
   @retval EFI_UNSUPPORTED       The DataType is unsupported.\r
   @retval EFI_NOT_FOUND         The DataType is not found.\r
   @retval EFI_BUFFER_TOO_SMALL  The buffer is too small to hold the buffer.\r
+                                *DataSize has been updated with the size needed to complete the request.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_GET_REMOTE_DATA)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
   IN EFI_BLUETOOTH_CONFIG_DATA_TYPE                 DataType,\r
-  IN BLUETOOTH_ADDRESS                              BDAddr,\r
+  IN BLUETOOTH_ADDRESS                              *BDAddr,\r
   IN OUT UINTN                                      *DataSize,\r
   IN OUT VOID                                       *Data\r
   );\r
-  \r
+\r
 /**\r
   The callback function for PIN code.\r
 \r
@@ -337,14 +352,14 @@ EFI_STATUS
   @param  CallbackType        Callback type in EFI_BLUETOOTH_PIN_CALLBACK_TYPE.\r
   @param  InputBuffer         A pointer to the buffer of data that is input from callback caller.\r
   @param  InputBufferSize     Indicates the size, in bytes, of the data buffer specified by InputBuffer.\r
-  @param  OutputBuffer        A pointer to the buffer of data that will be output from callback callee. \r
+  @param  OutputBuffer        A pointer to the buffer of data that will be output from callback callee.\r
                               Callee allocates this buffer by using EFI Boot Service AllocatePool().\r
   @param  OutputBufferSize    Indicates the size, in bytes, of the data buffer specified by OutputBuffer.\r
 \r
   @retval EFI_SUCCESS   The callback function complete successfully.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK_FUNCTION)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                        *This,\r
@@ -355,7 +370,7 @@ EFI_STATUS
   OUT VOID                                                **OutputBuffer,\r
   OUT UINTN                                               *OutputBufferSize\r
   );\r
-  \r
+\r
 /**\r
   Register PIN callback function.\r
 \r
@@ -366,7 +381,7 @@ EFI_STATUS
   @retval EFI_SUCCESS   The PIN callback function is registered successfully.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                        *This,\r
@@ -385,7 +400,7 @@ EFI_STATUS
   @retval EFI_SUCCESS   The callback function complete successfully.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK_FUNCTION)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL        *This,\r
@@ -393,7 +408,7 @@ EFI_STATUS
   IN BLUETOOTH_ADDRESS                    *BDAddr,\r
   OUT UINT8                               LinkKey[BLUETOOTH_HCI_LINK_KEY_SIZE]\r
   );\r
-  \r
+\r
 /**\r
   Register get link key callback function.\r
 \r
@@ -404,14 +419,14 @@ EFI_STATUS
   @retval EFI_SUCCESS   The link key callback function is registered successfully.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                                  *This,\r
   IN EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK_FUNCTION   Callback,\r
   IN VOID                                                           *Context\r
   );\r
-  \r
+\r
 /**\r
   The callback function to set link key.\r
 \r
@@ -423,7 +438,7 @@ EFI_STATUS
   @retval EFI_SUCCESS   The callback function complete successfully.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK_FUNCTION)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL        *This,\r
@@ -431,7 +446,7 @@ EFI_STATUS
   IN BLUETOOTH_ADDRESS                    *BDAddr,\r
   IN UINT8                                LinkKey[BLUETOOTH_HCI_LINK_KEY_SIZE]\r
   );\r
-  \r
+\r
 /**\r
   Register set link key callback function.\r
 \r
@@ -442,14 +457,14 @@ EFI_STATUS
   @retval EFI_SUCCESS   The link key callback function is registered successfully.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                                  *This,\r
   IN EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK_FUNCTION   Callback,\r
   IN VOID                                                           *Context\r
   );\r
-  \r
+\r
 /**\r
   The callback function. It is called after connect completed.\r
 \r
@@ -463,7 +478,7 @@ EFI_STATUS
   @retval EFI_SUCCESS   The callback function complete successfully.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK_FUNCTION)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                  *This,\r
@@ -473,7 +488,7 @@ EFI_STATUS
   IN VOID                                           *InputBuffer,\r
   IN UINTN                                          InputBufferSize\r
   );\r
-  \r
+\r
 /**\r
   Register link connect complete callback function.\r
 \r
@@ -484,14 +499,14 @@ EFI_STATUS
   @retval EFI_SUCCESS   The link connect complete callback function is registered successfully.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK)(\r
   IN EFI_BLUETOOTH_CONFIG_PROTOCOL                                      *This,\r
   IN EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK_FUNCTION   Callback,\r
   IN VOID                                                               *Context\r
   );\r
-  \r
+\r
 ///\r
 /// This protocol abstracts user interface configuration for Bluetooth device.\r
 ///\r