From: Vibhav Pant vibhavp@gmail.com
--- dlls/bluetoothapis/bluetoothapis.spec | 2 +- dlls/bluetoothapis/main.c | 14 +++++++++++ dlls/bthprops.cpl/bthprops.cpl.spec | 2 +- include/bluetoothapis.h | 34 +++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/dlls/bluetoothapis/bluetoothapis.spec b/dlls/bluetoothapis/bluetoothapis.spec index 2a2a657fabe..b028c29146f 100644 --- a/dlls/bluetoothapis/bluetoothapis.spec +++ b/dlls/bluetoothapis/bluetoothapis.spec @@ -59,7 +59,7 @@ @ stdcall BluetoothSdpGetElementData(ptr long ptr) @ stub BluetoothSdpGetString @ stub BluetoothSendAuthenticationResponse -@ stub BluetoothSendAuthenticationResponseEx +@ stdcall BluetoothSendAuthenticationResponseEx(ptr ptr) @ stub BluetoothSetLocalServiceInfo @ stub BluetoothSetServiceState @ stub BluetoothSetServiceStateEx diff --git a/dlls/bluetoothapis/main.c b/dlls/bluetoothapis/main.c index 2c496088e98..061f4208f64 100644 --- a/dlls/bluetoothapis/main.c +++ b/dlls/bluetoothapis/main.c @@ -867,3 +867,17 @@ BOOL WINAPI BluetoothUnregisterAuthentication( HBLUETOOTH_AUTHENTICATION_REGISTR SetLastError( ret ); return !ret; } + +static const char *debugstr_BLUETOOTH_AUTHENTICATE_RESPONSE( const BLUETOOTH_AUTHENTICATE_RESPONSE *resp ) +{ + if (!resp) + return wine_dbg_sprintf("(null)"); + return wine_dbg_sprintf("{ bthAddressRemote: %s, authMethod: %d, negativeResponse: %d }", + debugstr_addr( resp->bthAddressRemote.rgBytes ), resp->authMethod, resp->negativeResponse ); +} + +DWORD WINAPI BluetoothSendAuthenticationResponseEx( HANDLE handle_radio, BLUETOOTH_AUTHENTICATE_RESPONSE *auth_response ) +{ + FIXME( "(%p, %s): stub!\n", handle_radio, debugstr_BLUETOOTH_AUTHENTICATE_RESPONSE( auth_response ) ); + return ERROR_CALL_NOT_IMPLEMENTED; +} diff --git a/dlls/bthprops.cpl/bthprops.cpl.spec b/dlls/bthprops.cpl/bthprops.cpl.spec index 2b263c7627e..4c6ad724792 100644 --- a/dlls/bthprops.cpl/bthprops.cpl.spec +++ b/dlls/bthprops.cpl/bthprops.cpl.spec @@ -52,7 +52,7 @@ @ stub BluetoothSelectDevices @ stub BluetoothSelectDevicesFree @ stub BluetoothSendAuthenticationResponse -@ stub BluetoothSendAuthenticationResponseEx +@ stdcall -import BluetoothSendAuthenticationResponseEx(ptr ptr) @ stub BluetoothSetLocalServiceInfo @ stub BluetoothSetServiceState @ stdcall -import BluetoothUnregisterAuthentication(long) diff --git a/include/bluetoothapis.h b/include/bluetoothapis.h index d3b5c941b7c..b97967ec81f 100644 --- a/include/bluetoothapis.h +++ b/include/bluetoothapis.h @@ -153,6 +153,39 @@ typedef struct _BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS {
typedef BOOL (CALLBACK *PFN_AUTHENTICATION_CALLBACK_EX)(void *, BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS *);
+#define BTH_MAX_PIN_SIZE 16 + +typedef struct _BLUETOOTH_PIN_INFO { + UCHAR pin[BTH_MAX_PIN_SIZE]; + UCHAR pinLength; +} BLUETOOTH_PIN_INFO, *PBLUETOOTH_PIN_INFO; + +typedef struct _BLUETOOTH_OOB_DATA_INFO { + UCHAR C[16]; + UCHAR R[16]; +} BLUETOOTH_OOB_DATA_INFO, *PBLUETOOTH_OOB_DATA_INFO; + +typedef struct _BLUETOOTH_NUMERIC_COMPARISON_INFO { + ULONG NumericValue; +} BLUETOOTH_NUMERIC_COMPARISON_INFO, *PBLUETOOTH_NUMERIC_COMPARISON_INFO; + +typedef struct _BLUETOOTH_PASSKEY_INFO { + ULONG passkey; +} BLUETOOTH_PASSKEY_INFO, *PBLUETOOTH_PASSKEY_INFO; + +typedef struct _BLUETOOTH_AUTHENTICATE_RESPONSE { + BLUETOOTH_ADDRESS bthAddressRemote; + BLUETOOTH_AUTHENTICATION_METHOD authMethod; + union + { + BLUETOOTH_PIN_INFO pinInfo; + BLUETOOTH_OOB_DATA_INFO oobInfo; + BLUETOOTH_NUMERIC_COMPARISON_INFO numericCompInfo; + BLUETOOTH_PASSKEY_INFO passkeyInfo; + }; + UCHAR negativeResponse; +} BLUETOOTH_AUTHENTICATE_RESPONSE, *PBLUETOOTH_AUTHENTICATE_RESPONSE; + typedef struct _SDP_ELEMENT_DATA { SDP_TYPE type; SDP_SPECIFICTYPE specificType; @@ -237,6 +270,7 @@ DWORD WINAPI BluetoothSdpGetString(BYTE *, ULONG, PSDP_STRING_TYPE_DATA, USHORT, BOOL WINAPI BluetoothSelectDevices(BLUETOOTH_SELECT_DEVICE_PARAMS *); BOOL WINAPI BluetoothSelectDevicesFree(BLUETOOTH_SELECT_DEVICE_PARAMS *); DWORD WINAPI BluetoothSendAuthenticationResponse(HANDLE, BLUETOOTH_DEVICE_INFO *, WCHAR *); +DWORD WINAPI BluetoothSendAuthenticationResponseEx(HANDLE, BLUETOOTH_AUTHENTICATE_RESPONSE *); DWORD WINAPI BluetoothSetServiceState(HANDLE, BLUETOOTH_DEVICE_INFO *, GUID *, DWORD); BOOL WINAPI BluetoothUnregisterAuthentication(HBLUETOOTH_AUTHENTICATION_REGISTRATION); DWORD WINAPI BluetoothUpdateDeviceRecord(BLUETOOTH_DEVICE_INFO *);