From 7914949f8f1d8422289d9864f1e8e24bc374edc3 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath <nathbap...@gmail.com> Date: Sat, 2 Sep 2023 06:06:51 +0000 Subject: [PATCH 3/3] headers: Add new symbols in bluetoothapis.h
Signed-off-by: Biswapriyo Nath <nathbap...@gmail.com> --- mingw-w64-headers/include/bluetoothapis.h | 43 +++++++++++++++++++---- 1 file changed, 37 insertions(+), 6 deletions(-) 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 @@ typedef struct _BLUETOOTH_ADDRESS { 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 @@ typedef struct _BLUETOOTH_DEVICE_INFO { 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 @@ typedef enum _BLUETOOTH_AUTHENTICATION_METHOD { 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 @@ typedef struct _BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS { } ; } 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 @@ DWORD WINAPI BluetoothAuthenticateMultipleDevices( 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 @@ WINBOOL WINAPI BluetoothIsConnectable( HANDLE hRadio ); +WINBOOL WINAPI BluetoothIsVersionAvailable( + UCHAR MajorVersion, + UCHAR MinorVersion +); + DWORD WINAPI BluetoothRegisterForAuthentication( const BLUETOOTH_DEVICE_INFO *pbtdi, HBLUETOOTH_AUTHENTICATION_REGISTRATION *phRegHandle, -- 2.42.0
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public