MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BluetoothAttribute.h File Reference

Data Structures

struct  EFI_BLUETOOTH_UUID
 
union  EFI_BLUETOOTH_ATTRIBUTE_PERMISSION
 
struct  EFI_BLUETOOTH_ATTRIBUTE_HEADER
 
struct  EFI_BLUETOOTH_GATT_PRIMARY_SERVICE_INFO
 
struct  EFI_BLUETOOTH_GATT_INCLUDE_SERVICE_INFO
 
struct  EFI_BLUETOOTH_GATT_CHARACTERISTIC_INFO
 
struct  EFI_BLUETOOTH_GATT_CHARACTERISTIC_DESCRIPTOR_INFO
 
struct  EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER_NOTIFICATION
 
struct  EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER_INDICATION
 
struct  EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER
 
struct  EFI_BLUETOOTH_LE_DEVICE_INFO
 
struct  _EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL
 

Macros

#define EFI_BLUETOOTH_ATTRIBUTE_SERVICE_BINDING_PROTOCOL_GUID
 
#define EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL_GUID
 
#define UUID_16BIT_TYPE_LEN   2
 
#define UUID_32BIT_TYPE_LEN   4
 
#define UUID_128BIT_TYPE_LEN   16
 
#define BLUETOOTH_IS_ATTRIBUTE_OF_TYPE(a, t)   ((a)->Type.Length == UUID_16BIT_TYPE_LEN && (a)->Type.Data.Uuid16 == (t))
 

Typedefs

typedef struct
_EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL 
EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL
 
typedef IN VOIDData
 
typedef IN VOID IN UINTN DataLength
 
typedef IN VOID IN UINTN IN VOIDContext
 
typedef IN VOID IN UINTN IN
EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION 
Callback
 
typedef EFI_STATUS(EFIAPIEFI_BLUETOOTH_ATTRIBUTE_REGISTER_FOR_SERVER_NOTIFICATION )(IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, IN EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER *CallbackParameter, IN EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION Callback, IN VOID *Context)
 
typedef EFI_STATUS(EFIAPIEFI_BLUETOOTH_ATTRIBUTE_GET_SERVICE_INFO )(IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, OUT UINTN *ServiceInfoSize, OUT VOID **ServiceInfo)
 
typedef EFI_STATUS(EFIAPIEFI_BLUETOOTH_ATTRIBUTE_GET_DEVICE_INFO )(IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, OUT UINTN *DeviceInfoSize, OUT VOID **DeviceInfo)
 

Functions

typedef EFI_STATUS (EFIAPI *EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION)(IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This
 

Variables

EFI_GUID gEfiBluetoothAttributeProtocolGuid
 
EFI_GUID gEfiBluetoothAttributeServiceBindingProtocolGuid
 

Detailed Description

EFI Bluetooth Attribute Protocol as defined in UEFI 2.7. This protocol provides service for Bluetooth ATT (Attribute Protocol) and GATT (Generic Attribute Profile) based protocol interfaces.

Copyright (c) 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
This Protocol is introduced in UEFI Specification 2.7

Macro Definition Documentation

#define BLUETOOTH_IS_ATTRIBUTE_OF_TYPE (   a,
 
)    ((a)->Type.Length == UUID_16BIT_TYPE_LEN && (a)->Type.Data.Uuid16 == (t))
#define EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL_GUID
Value:
{ \
0x898890e9, 0x84b2, 0x4f3a, { 0x8c, 0x58, 0xd8, 0x57, 0x78, 0x13, 0xe0, 0xac } \
}
#define EFI_BLUETOOTH_ATTRIBUTE_SERVICE_BINDING_PROTOCOL_GUID
Value:
{ \
0x5639867a, 0x8c8e, 0x408d, { 0xac, 0x2f, 0x4b, 0x61, 0xbd, 0xc0, 0xbb, 0xbb } \
}
#define UUID_128BIT_TYPE_LEN   16
#define UUID_16BIT_TYPE_LEN   2
#define UUID_32BIT_TYPE_LEN   4

Typedef Documentation

typedef IN BOOLEAN IN UINTN IN UINTN IN EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK Callback
typedef IN UINTN IN VOID * Context
typedef IN VOID* Data
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_GET_DEVICE_INFO)(IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, OUT UINTN *DeviceInfoSize, OUT VOID **DeviceInfo)

Get Bluetooth device information.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL instance.
[out]DeviceInfoSizeA pointer to the size, in bytes, of the DeviceInfo buffer.
[out]DeviceInfoA pointer to a callee allocated buffer that returns Bluetooth device information. Callee allocates this buffer by using EFI Boot Service AllocatePool(). If this device is Bluetooth classic device, EFI_BLUETOOTH_DEVICE_INFO should be used. If this device is Bluetooth LE device, EFI_BLUETOOTH_LE_DEVICE_INFO should be used.
Return values
EFI_SUCCESSThe Bluetooth device information is returned successfully.
EFI_DEVICE_ERRORA hardware error occurred trying to retrieve the Bluetooth device information
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_GET_SERVICE_INFO)(IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, OUT UINTN *ServiceInfoSize, OUT VOID **ServiceInfo)

Get Bluetooth discovered service information.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL instance.
[out]ServiceInfoSizeA pointer to the size, in bytes, of the ServiceInfo buffer.
[out]ServiceInfoA pointer to a callee allocated buffer that returns Bluetooth discovered service information. Callee allocates this buffer by using EFI Boot Service AllocatePool().
Return values
EFI_SUCCESSThe Bluetooth discovered service information is returned successfully.
EFI_DEVICE_ERRORA hardware error occurred trying to retrieve the Bluetooth discovered service information.
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_REGISTER_FOR_SERVER_NOTIFICATION)(IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, IN EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER *CallbackParameter, IN EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION Callback, IN VOID *Context)

Register or unregister a server initiated message, such as NOTIFICATION or INDICATION, on a characteristic value on remote server.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL instance.
[in]CallbackParameterThe parameter of the callback.
[in]CallbackCallback function for server initiated attribute protocol. NULL callback function means unregister the server initiated callback.
[in]ContextData passed into Callback function. It is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe callback function is registered or unregistered successfully
EFI_INVALID_PARAMETERThe attribute opcode is not server initiated message opcode. See Bluetooth specification, Vol 3, Part F, Attribute Protocol.
EFI_ALREADY_STARTEDA callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL.
EFI_NOT_STARTEDA callback function is not registered on the same attribute opcode and attribute handle, when the Callback is NULL.
EFI_NOT_READYA GATT operation is already underway for this device.
EFI_UNSUPPORTEDThe attribute does not support notification.

Function Documentation

typedef EFI_STATUS ( EFIAPI EFI_BLUETOOTH_ATTRIBUTE_SEND_REQUEST)

The callback function to send request.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL instance.
[in]DataData received. The first byte is the attribute opcode, followed by opcode specific fields. See Bluetooth specification, Vol 3, Part F, Attribute Protocol. It might be a normal RESPONSE message, or ERROR RESPONSE messag
[in]DataLengthThe length of Data in bytes.
[in]ContextThe context passed from the callback registration request.
Return values
EFI_SUCCESSThe callback function complete successfully.

Send a "REQUEST" or "COMMAND" message to remote server and receive a "RESPONSE" message for "REQUEST" from remote server according to Bluetooth attribute protocol data unit(PDU).

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL instance.
[in]DataData of a REQUEST or COMMAND message. The first byte is the attribute PDU related opcode, followed by opcode specific fields. See Bluetooth specification, Vol 3, Part F, Attribute Protocol.
[in]DataLengthThe length of Data in bytes.
[in]CallbackCallback function to notify the RESPONSE is received to the caller, with the response buffer. Caller must check the response buffer content to know if the request action is success or fail. It may be NULL if the data is a COMMAND.
[in]ContextData passed into Callback function. It is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe request is sent successfully.
EFI_INVALID_PARAMETEROne or more parameters are invalid due to following conditions:
  • The Buffer is NULL.
  • The BufferLength is 0.
  • The opcode in Buffer is not a valid OPCODE according to Bluetooth specification.
  • The Callback is NULL.
EFI_DEVICE_ERRORSending the request failed due to the host controller or the device error.
EFI_NOT_READYA GATT operation is already underway for this device.
EFI_UNSUPPORTEDThe attribute does not support the corresponding operation.

Variable Documentation

EFI_GUID gEfiBluetoothAttributeProtocolGuid
EFI_GUID gEfiBluetoothAttributeServiceBindingProtocolGuid