iphlpapi: Add GetPerTcpConnectionEStats stub.
[wine.git] / include / bluetoothapis.h
blobd3b5c941b7cea66d8ca8de8a30031af2531a62e0
1 /*
2 * Copyright (C) 2016 Austin English
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 #ifndef __BLUETOOTHAPIS_H
19 #define __BLUETOOTHAPIS_H
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
25 typedef ULONGLONG BTH_ADDR;
27 typedef struct _BLUETOOTH_ADDRESS {
28 union {
29 BTH_ADDR ullLong;
30 BYTE rgBytes[6];
31 } DUMMYUNIONNAME;
32 } BLUETOOTH_ADDRESS_STRUCT;
34 #define BLUETOOTH_ADDRESS BLUETOOTH_ADDRESS_STRUCT
35 #define BLUETOOTH_NULL_ADDRESS ((ULONGLONG) 0x0)
37 #define BLUETOOTH_MAX_NAME_SIZE (248)
38 #define BLUETOOTH_MAX_PASSKEY_SIZE (16)
39 #define BLUETOOTH_MAX_PASSKEY_BUFFER_SIZE (BLUETOOTH_MAX_PASSKEY_SIZE + 1)
41 #define BLUETOOTH_SERVICE_DISABLE 0x00
42 #define BLUETOOTH_SERVICE_ENABLE 0x01
43 #define BLUETOOTH_SERVICE_MASK (BLUETOOTH_ENABLE_SERVICE | BLUETOOTH_DISABLE_SERVICE)
45 typedef struct _BLUETOOTH_FIND_RADIO_PARAMS {
46 DWORD dwSize;
47 } BLUETOOTH_FIND_RADIO_PARAMS;
49 typedef struct _BLUETOOTH_RADIO_INFO {
50 DWORD dwSize;
51 BLUETOOTH_ADDRESS address;
52 WCHAR szName[BLUETOOTH_MAX_NAME_SIZE];
53 ULONG ulClassofDevice;
54 USHORT lmpSubversion;
55 USHORT manufacturer;
56 } BLUETOOTH_RADIO_INFO, *PBLUETOOTH_RADIO_INFO;
58 typedef struct _BLUETOOTH_DEVICE_INFO {
59 DWORD dwSize;
60 BLUETOOTH_ADDRESS Address;
61 ULONG ulClassofDevice;
62 BOOL fConnected;
63 BOOL fRemembered;
64 BOOL fAuthenticated;
65 SYSTEMTIME stLastSeen;
66 SYSTEMTIME stLastUsed;
67 WCHAR szName[BLUETOOTH_MAX_NAME_SIZE];
68 } BLUETOOTH_DEVICE_INFO, BLUETOOTH_DEVICE_INFO_STRUCT, *PBLUETOOTH_DEVICE_INFO;
70 typedef struct _BLUETOOTH_DEVICE_SEARCH_PARAMS {
71 DWORD dwSize;
72 BOOL fReturnAuthenticated;
73 BOOL fReturnRemembered;
74 BOOL fReturnUnknown;
75 BOOL fReturnConnected;
76 BOOL fIssueInquiry;
77 UCHAR cTimeoutMultiplier;
78 HANDLE hRadio;
79 } BLUETOOTH_DEVICE_SEARCH_PARAMS;
81 typedef HANDLE HBLUETOOTH_AUTHENTICATION_REGISTRATION;
82 typedef HANDLE HBLUETOOTH_CONTAINER_ELEMENT;
83 typedef HANDLE HBLUETOOTH_DEVICE_FIND;
84 typedef HANDLE HBLUETOOTH_RADIO_FIND;
86 typedef struct _BLUETOOTH_COD_PAIRS {
87 ULONG ulCODMask;
88 const WCHAR *pcszDescription;
89 } BLUETOOTH_COD_PAIRS;
91 typedef BOOL (WINAPI *PFN_DEVICE_CALLBACK)(void *pvParam, const BLUETOOTH_DEVICE_INFO *pDevice);
93 typedef struct _BLUETOOTH_SELECT_DEVICE_PARAMS {
94 DWORD dwSize;
95 ULONG cNumOfClasses;
96 BLUETOOTH_COD_PAIRS *prgClassOfDevices;
97 WCHAR *pszInfo;
98 HWND hwndParent;
99 BOOL fForceAuthentication;
100 BOOL fShowAuthenticated;
101 BOOL fShowRemembered;
102 BOOL fShowUnknown;
103 BOOL fAddNewDeviceWizard;
104 BOOL fSkipServicesPage;
105 PFN_DEVICE_CALLBACK pfnDeviceCallback;
106 void *pvParam;
107 DWORD cNumDevices;
108 PBLUETOOTH_DEVICE_INFO pDevices;
109 } BLUETOOTH_SELECT_DEVICE_PARAMS;
111 typedef BOOL (WINAPI *PFN_AUTHENTICATION_CALLBACK)(void *, PBLUETOOTH_DEVICE_INFO);
113 #define BLUETOOTH_DEVICE_INFO BLUETOOTH_DEVICE_INFO_STRUCT
115 typedef BLUETOOTH_DEVICE_INFO *PBLUETOOTH_DEVICE_INFO;
117 typedef enum _BLUETOOTH_AUTHENTICATION_METHOD {
118 BLUETOOTH_AUTHENTICATION_METHOD_LEGACY = 0x1,
119 BLUETOOTH_AUTHENTICATION_METHOD_OOB,
120 BLUETOOTH_AUTHENTICATION_METHOD_NUMERIC_COMPARISON,
121 BLUETOOTH_AUTHENTICATION_METHOD_PASSKEY_NOTIFICATION,
122 BLUETOOTH_AUTHENTICATION_METHOD_PASSKEY,
123 } BLUETOOTH_AUTHENTICATION_METHOD, *PBLUETOOTH_AUTHENTICATION_METHOD;
125 typedef enum _BLUETOOTH_IO_CAPABILITY {
126 BLUETOOTH_IO_CAPABILITY_DISPLAYONLY = 0x00,
127 BLUETOOTH_IO_CAPABILITY_DISPLAYYESNO = 0x01,
128 BLUETOOTH_IO_CAPABILITY_KEYBOARDONLY = 0x02,
129 BLUETOOTH_IO_CAPABILITY_NOINPUTNOOUTPUT = 0x03,
130 BLUETOOTH_IO_CAPABILITY_UNDEFINED = 0xff,
131 } BLUETOOTH_IO_CAPABILITY;
133 typedef enum _BLUETOOTH_AUTHENTICATION_REQUIREMENTS{
134 BLUETOOTH_MITM_ProtectionNotRequired = 0,
135 BLUETOOTH_MITM_ProtectionRequired = 0x1,
136 BLUETOOTH_MITM_ProtectionNotRequiredBonding = 0x2,
137 BLUETOOTH_MITM_ProtectionRequiredBonding = 0x3,
138 BLUETOOTH_MITM_ProtectionNotRequiredGeneralBonding = 0x4,
139 BLUETOOTH_MITM_ProtectionRequiredGeneralBonding = 0x5,
140 BLUETOOTH_MITM_ProtectionNotDefined = 0xff,
141 } BLUETOOTH_AUTHENTICATION_REQUIREMENTS;
143 typedef struct _BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS {
144 BLUETOOTH_DEVICE_INFO deviceInfo;
145 BLUETOOTH_AUTHENTICATION_METHOD authenticationMethod;
146 BLUETOOTH_IO_CAPABILITY ioCapability;
147 BLUETOOTH_AUTHENTICATION_REQUIREMENTS authenticationRequirements;
148 union{
149 ULONG Numeric_Value;
150 ULONG Passkey;
152 } BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS, *PBLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS;
154 typedef BOOL (CALLBACK *PFN_AUTHENTICATION_CALLBACK_EX)(void *, BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS *);
156 typedef struct _SDP_ELEMENT_DATA {
157 SDP_TYPE type;
158 SDP_SPECIFICTYPE specificType;
159 union {
160 SDP_LARGE_INTEGER_16 int128;
161 LONGLONG int64;
162 LONG int32;
163 SHORT int16;
164 CHAR int8;
166 SDP_ULARGE_INTEGER_16 uint128;
167 ULONGLONG uint64;
168 ULONG uint32;
169 USHORT uint16;
170 UCHAR uint8;
172 UCHAR booleanVal;
174 GUID uuid128;
175 ULONG uuid32;
176 USHORT uuid16;
178 struct {
179 BYTE *value;
180 ULONG length;
181 } string;
183 struct {
184 BYTE *value;
185 ULONG length;
186 } url;
188 struct {
189 BYTE *value;
190 ULONG length;
191 } sequence;
193 struct {
194 BYTE *value;
195 ULONG length;
196 } alternative;
197 } data;
198 } SDP_ELEMENT_DATA, *PSDP_ELEMENT_DATA;
200 typedef struct _SDP_STRING_TYPE_DATA {
201 USHORT encoding;
202 USHORT mibeNum;
203 USHORT attributeId;
204 } SDP_STRING_TYPE_DATA, *PSDP_STRING_TYPE_DATA;
206 typedef BOOL (CALLBACK *PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK)(
207 ULONG uAttribId,
208 BYTE *pValueStream,
209 ULONG cbStreamSize,
210 void *pvParam);
212 DWORD WINAPI BluetoothAuthenticateDevice(HWND, HANDLE, BLUETOOTH_DEVICE_INFO *, WCHAR *, ULONG);
213 DWORD WINAPI BluetoothAuthenticateMultipleDevices(HWND, HANDLE, DWORD, BLUETOOTH_DEVICE_INFO *);
214 BOOL WINAPI BluetoothDisplayDeviceProperties(HWND, BLUETOOTH_DEVICE_INFO *);
215 BOOL WINAPI BluetoothEnableDiscovery(HANDLE, BOOL);
216 BOOL WINAPI BluetoothEnableIncomingConnections(HANDLE, BOOL);
217 DWORD WINAPI BluetoothEnumerateInstalledServices(HANDLE, BLUETOOTH_DEVICE_INFO *, DWORD *, GUID *);
218 BOOL WINAPI BluetoothFindDeviceClose(HBLUETOOTH_DEVICE_FIND);
219 HBLUETOOTH_DEVICE_FIND WINAPI BluetoothFindFirstDevice(BLUETOOTH_DEVICE_SEARCH_PARAMS *, BLUETOOTH_DEVICE_INFO *);
220 HBLUETOOTH_RADIO_FIND WINAPI BluetoothFindFirstRadio(BLUETOOTH_FIND_RADIO_PARAMS *, HANDLE *);
221 BOOL WINAPI BluetoothFindNextDevice(HBLUETOOTH_DEVICE_FIND, BLUETOOTH_DEVICE_INFO *);
222 BOOL WINAPI BluetoothFindNextRadio(HBLUETOOTH_RADIO_FIND, HANDLE *);
223 BOOL WINAPI BluetoothFindRadioClose(HBLUETOOTH_RADIO_FIND);
224 DWORD WINAPI BluetoothGetDeviceInfo(HANDLE, BLUETOOTH_DEVICE_INFO *);
225 DWORD WINAPI BluetoothGetRadioInfo(HANDLE, PBLUETOOTH_RADIO_INFO);
226 BOOL WINAPI BluetoothIsConnectable(HANDLE);
227 BOOL WINAPI BluetoothIsDiscoverable(HANDLE);
228 DWORD WINAPI BluetoothRegisterForAuthentication(const BLUETOOTH_DEVICE_INFO *, HBLUETOOTH_AUTHENTICATION_REGISTRATION *, PFN_AUTHENTICATION_CALLBACK, void *);
229 DWORD WINAPI BluetoothRegisterForAuthenticationEx(const BLUETOOTH_DEVICE_INFO *, HBLUETOOTH_AUTHENTICATION_REGISTRATION *, PFN_AUTHENTICATION_CALLBACK_EX, void *);
230 DWORD WINAPI BluetoothRemoveDevice(BLUETOOTH_ADDRESS *);
231 #define BluetoothEnumAttributes BluetoothSdpEnumAttributes
232 BOOL WINAPI BluetoothSdpEnumAttributes(BYTE *, ULONG, PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK, void *);
233 DWORD WINAPI BluetoothSdpGetAttributeValue(BYTE *, ULONG, USHORT, PSDP_ELEMENT_DATA);
234 DWORD WINAPI BluetoothSdpGetContainerElementData(BYTE *, ULONG, HBLUETOOTH_CONTAINER_ELEMENT *, PSDP_ELEMENT_DATA);
235 DWORD WINAPI BluetoothSdpGetElementData(BYTE *, ULONG, PSDP_ELEMENT_DATA);
236 DWORD WINAPI BluetoothSdpGetString(BYTE *, ULONG, PSDP_STRING_TYPE_DATA, USHORT, WCHAR *, ULONG *);
237 BOOL WINAPI BluetoothSelectDevices(BLUETOOTH_SELECT_DEVICE_PARAMS *);
238 BOOL WINAPI BluetoothSelectDevicesFree(BLUETOOTH_SELECT_DEVICE_PARAMS *);
239 DWORD WINAPI BluetoothSendAuthenticationResponse(HANDLE, BLUETOOTH_DEVICE_INFO *, WCHAR *);
240 DWORD WINAPI BluetoothSetServiceState(HANDLE, BLUETOOTH_DEVICE_INFO *, GUID *, DWORD);
241 BOOL WINAPI BluetoothUnregisterAuthentication(HBLUETOOTH_AUTHENTICATION_REGISTRATION);
242 DWORD WINAPI BluetoothUpdateDeviceRecord(BLUETOOTH_DEVICE_INFO *);
244 #ifdef __cplusplus
246 #endif
248 #endif /* __BLUETOOTHAPIS_H */