TianoCore EDK2 master
Loading...
Searching...
No Matches
BluetoothAttribute.h File Reference

Go to the source code of this file.

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 EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION) (IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, IN VOID *Context)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_SEND_REQUEST) (IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, IN EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION Callback, IN VOID *Context)
 
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)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_GET_SERVICE_INFO) (IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, OUT UINTN *ServiceInfoSize, OUT VOID **ServiceInfo)
 
typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_GET_DEVICE_INFO) (IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, OUT UINTN *DeviceInfoSize, OUT VOID **DeviceInfo)
 

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

Definition in file BluetoothAttribute.h.

Macro Definition Documentation

◆ BLUETOOTH_IS_ATTRIBUTE_OF_TYPE

#define BLUETOOTH_IS_ATTRIBUTE_OF_TYPE (   a,
 
)    ((a)->Type.Length == UUID_16BIT_TYPE_LEN && (a)->Type.Data.Uuid16 == (t))

Definition at line 47 of file BluetoothAttribute.h.

◆ EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL_GUID

#define EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL_GUID
Value:
{ \
0x898890e9, 0x84b2, 0x4f3a, { 0x8c, 0x58, 0xd8, 0x57, 0x78, 0x13, 0xe0, 0xac } \
}

Definition at line 22 of file BluetoothAttribute.h.

◆ EFI_BLUETOOTH_ATTRIBUTE_SERVICE_BINDING_PROTOCOL_GUID

#define EFI_BLUETOOTH_ATTRIBUTE_SERVICE_BINDING_PROTOCOL_GUID
Value:
{ \
0x5639867a, 0x8c8e, 0x408d, { 0xac, 0x2f, 0x4b, 0x61, 0xbd, 0xc0, 0xbb, 0xbb } \
}

Definition at line 17 of file BluetoothAttribute.h.

◆ UUID_128BIT_TYPE_LEN

#define UUID_128BIT_TYPE_LEN   16

Definition at line 45 of file BluetoothAttribute.h.

◆ UUID_16BIT_TYPE_LEN

#define UUID_16BIT_TYPE_LEN   2

Definition at line 43 of file BluetoothAttribute.h.

◆ UUID_32BIT_TYPE_LEN

#define UUID_32BIT_TYPE_LEN   4

Definition at line 44 of file BluetoothAttribute.h.

Typedef Documentation

◆ EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION) (IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, IN VOID *Context)

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.

Definition at line 144 of file BluetoothAttribute.h.

◆ EFI_BLUETOOTH_ATTRIBUTE_GET_DEVICE_INFO

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

Definition at line 257 of file BluetoothAttribute.h.

◆ EFI_BLUETOOTH_ATTRIBUTE_GET_SERVICE_INFO

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.

Definition at line 232 of file BluetoothAttribute.h.

◆ EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL

◆ EFI_BLUETOOTH_ATTRIBUTE_REGISTER_FOR_SERVER_NOTIFICATION

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.

Definition at line 209 of file BluetoothAttribute.h.

◆ EFI_BLUETOOTH_ATTRIBUTE_SEND_REQUEST

typedef EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_SEND_REQUEST) (IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, IN EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION Callback, IN VOID *Context)

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.

Definition at line 178 of file BluetoothAttribute.h.