TianoCore EDK2 master
Loading...
Searching...
No Matches
BluetoothAttribute.h
Go to the documentation of this file.
1
14#ifndef __EFI_BLUETOOTH_ATTRIBUTE_H__
15#define __EFI_BLUETOOTH_ATTRIBUTE_H__
16
17#define EFI_BLUETOOTH_ATTRIBUTE_SERVICE_BINDING_PROTOCOL_GUID \
18 { \
19 0x5639867a, 0x8c8e, 0x408d, { 0xac, 0x2f, 0x4b, 0x61, 0xbd, 0xc0, 0xbb, 0xbb } \
20 }
21
22#define EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL_GUID \
23 { \
24 0x898890e9, 0x84b2, 0x4f3a, { 0x8c, 0x58, 0xd8, 0x57, 0x78, 0x13, 0xe0, 0xac } \
25 }
26
28
29#pragma pack(1)
30
31//
32// Bluetooth UUID
33//
34typedef struct {
35 UINT8 Length;
36 union {
37 UINT16 Uuid16;
38 UINT32 Uuid32;
39 UINT8 Uuid128[16];
40 } Data;
42
43#define UUID_16BIT_TYPE_LEN 2
44#define UUID_32BIT_TYPE_LEN 4
45#define UUID_128BIT_TYPE_LEN 16
46
47#define BLUETOOTH_IS_ATTRIBUTE_OF_TYPE(a, t) ((a)->Type.Length == UUID_16BIT_TYPE_LEN && (a)->Type.Data.Uuid16 == (t))
48
49//
50// Bluetooth Attribute Permission
51//
52typedef union {
53 struct {
54 UINT16 Readable : 1;
55 UINT16 ReadEncryption : 1;
56 UINT16 ReadAuthentication : 1;
57 UINT16 ReadAuthorization : 1;
58 UINT16 ReadKeySize : 5;
59 UINT16 Reserved1 : 7;
60 UINT16 Writeable : 1;
61 UINT16 WriteEncryption : 1;
62 UINT16 WriteAuthentication : 1;
63 UINT16 WriteAuthorization : 1;
64 UINT16 WriteKeySize : 5;
65 UINT16 Reserved2 : 7;
66 } Permission;
67 UINT32 Data32;
69
70typedef struct {
72 UINT16 Length;
73 UINT16 AttributeHandle;
74 EFI_BLUETOOTH_ATTRIBUTE_PERMISSION AttributePermission;
76
77typedef struct {
79 UINT16 EndGroupHandle;
80 EFI_BLUETOOTH_UUID ServiceUuid;
82
83typedef struct {
85 UINT16 StartGroupHandle;
86 UINT16 EndGroupHandle;
87 EFI_BLUETOOTH_UUID ServiceUuid;
89
90typedef struct {
92 UINT8 CharacteristicProperties;
93 UINT16 CharacteristicValueHandle;
94 EFI_BLUETOOTH_UUID CharacteristicUuid;
96
97typedef struct {
99 EFI_BLUETOOTH_UUID CharacteristicDescriptorUuid;
101
102#pragma pack()
103
104typedef struct {
105 UINT16 AttributeHandle;
107
108typedef struct {
109 UINT16 AttributeHandle;
111
112typedef struct {
113 UINT32 Version;
114 UINT8 AttributeOpCode;
115 union {
118 } Parameter;
120
121typedef struct {
122 UINT32 Version;
123 BLUETOOTH_LE_ADDRESS BD_ADDR;
124 BLUETOOTH_LE_ADDRESS DirectAddress;
125 UINT8 RSSI;
126 UINTN AdvertisementDataSize;
127 VOID *AdvertisementData;
129
143typedef
147 IN VOID *Data,
148 IN UINTN DataLength,
149 IN VOID *Context
150 );
151
177typedef
181 IN VOID *Data,
182 IN UINTN DataLength,
184 IN VOID *Context
185 );
186
208typedef
214 IN VOID *Context
215 );
216
231typedef
235 OUT UINTN *ServiceInfoSize,
236 OUT VOID **ServiceInfo
237 );
238
256typedef
260 OUT UINTN *DeviceInfoSize,
261 OUT VOID **DeviceInfo
262 );
263
269};
270
271extern EFI_GUID gEfiBluetoothAttributeProtocolGuid;
272extern EFI_GUID gEfiBluetoothAttributeServiceBindingProtocolGuid;
273
274#endif
UINT64 UINTN
EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_GET_DEVICE_INFO)(IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, OUT UINTN *DeviceInfoSize, OUT VOID **DeviceInfo)
EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_GET_SERVICE_INFO)(IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, OUT UINTN *ServiceInfoSize, OUT VOID **ServiceInfo)
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)
EFI_STATUS(EFIAPI * EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION)(IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, IN VOID *Context)
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)
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: Base.h:213