headers: Add new symbols in bluetoothapis.h Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com> Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-headers/include/bluetoothapis.h b/mingw-w64-headers/include/bluetoothapis.h index 92fcad4..c580ae4 100644 --- a/mingw-w64-headers/include/bluetoothapis.h +++ b/mingw-w64-headers/include/bluetoothapis.h
@@ -11,6 +11,14 @@ #include <bthsdpdef.h> #define BLUETOOTH_MAX_NAME_SIZE 248 +#define BLUETOOTH_MAX_PASSKEY_SIZE 16 +#define BLUETOOTH_MAX_PASSKEY_BUFFER_SIZE (BLUETOOTH_MAX_PASSKEY_SIZE + 1) +#define BLUETOOTH_MAX_SERVICE_NAME_SIZE 256 +#define BLUETOOTH_DEVICE_NAME_SIZE 256 + +#define BLUETOOTH_SERVICE_DISABLE 0x00 +#define BLUETOOTH_SERVICE_ENABLE 0x01 +#define BLUETOOTH_SERVICE_MASK (BLUETOOTH_SERVICE_DISABLE | BLUETOOTH_SERVICE_ENABLE) #ifdef __cplusplus extern "C" { @@ -26,7 +34,11 @@ BTH_ADDR ullLong; BYTE rgBytes[6]; }; -} BLUETOOTH_ADDRESS; +} BLUETOOTH_ADDRESS_STRUCT; + +#define BLUETOOTH_ADDRESS BLUETOOTH_ADDRESS_STRUCT + +#define BLUETOOTH_NULL_ADDRESS ((ULONGLONG)0x0) typedef struct _BLUETOOTH_COD_PAIRS { ULONG ulCODMask; @@ -43,7 +55,11 @@ SYSTEMTIME stLastSeen; SYSTEMTIME stLastUsed; WCHAR szName[BLUETOOTH_MAX_NAME_SIZE]; -} BLUETOOTH_DEVICE_INFO, *PBLUETOOTH_DEVICE_INFO; +} BLUETOOTH_DEVICE_INFO_STRUCT; + +#define BLUETOOTH_DEVICE_INFO BLUETOOTH_DEVICE_INFO_STRUCT + +typedef BLUETOOTH_DEVICE_INFO *PBLUETOOTH_DEVICE_INFO; typedef struct _BLUETOOTH_DEVICE_SEARCH_PARAMS { DWORD dwSize; @@ -75,7 +91,7 @@ BLUETOOTH_AUTHENTICATION_METHOD_NUMERIC_COMPARISON, BLUETOOTH_AUTHENTICATION_METHOD_PASSKEY_NOTIFICATION, BLUETOOTH_AUTHENTICATION_METHOD_PASSKEY -} BLUETOOTH_AUTHENTICATION_METHOD; +} BLUETOOTH_AUTHENTICATION_METHOD, *PBLUETOOTH_AUTHENTICATION_METHOD; typedef enum _BLUETOOTH_IO_CAPABILITY { BLUETOOTH_IO_CAPABILITY_DISPLAYONLY = 0x00, @@ -106,14 +122,16 @@ } ; } BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS, *PBLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS; -#define BLUETOOTH_MAX_SERVICE_NAME_SIZE 256 -#define BLUETOOTH_DEVICE_NAME_SIZE 256 typedef struct _BLUETOOTH_LOCAL_SERVICE_INFO { WINBOOL Enabled; BLUETOOTH_ADDRESS btAddr; WCHAR szName[BLUETOOTH_MAX_SERVICE_NAME_SIZE]; WCHAR szDeviceString[BLUETOOTH_DEVICE_NAME_SIZE]; -} BLUETOOTH_LOCAL_SERVICE_INFO; +} BLUETOOTH_LOCAL_SERVICE_INFO_STRUCT; + +#define BLUETOOTH_LOCAL_SERVICE_INFO BLUETOOTH_LOCAL_SERVICE_INFO_STRUCT + +typedef BLUETOOTH_LOCAL_SERVICE_INFO *PBLUETOOTH_LOCAL_SERVICE_INFO; #define BTH_MAX_PIN_SIZE 16 typedef struct _BLUETOOTH_PIN_INFO { @@ -176,6 +194,14 @@ BLUETOOTH_DEVICE_INFO *pbtdi ); +DWORD WINAPI BluetoothAuthenticateDevice( + HWND hwndParent, + HANDLE hRadio, + BLUETOOTH_DEVICE_INFO *pbtbi, + PWSTR pszPasskey, + ULONG ulPasskeyLength +); + DWORD WINAPI BluetoothAuthenticateDeviceEx( HWND hwndParentIn, HANDLE hRadioIn, @@ -252,6 +278,11 @@ HANDLE hRadio ); +WINBOOL WINAPI BluetoothIsVersionAvailable( + UCHAR MajorVersion, + UCHAR MinorVersion +); + DWORD WINAPI BluetoothRegisterForAuthentication( const BLUETOOTH_DEVICE_INFO *pbtdi, HBLUETOOTH_AUTHENTICATION_REGISTRATION *phRegHandle,