Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54112
-- v2: bthprops.cpl: Add BluetoothUnregisterAuthentication stub. bthprops.cpl: Add BluetoothRegisterForAuthenticationEx stub. include/bluetoothapis: Add BluetoothRegisterForAuthenticationEx prototype.
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- include/bluetoothapis.h | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
diff --git a/include/bluetoothapis.h b/include/bluetoothapis.h index fd90b731bf9..3e2794f95d6 100644 --- a/include/bluetoothapis.h +++ b/include/bluetoothapis.h @@ -110,6 +110,49 @@ typedef struct _BLUETOOTH_SELECT_DEVICE_PARAMS {
typedef BOOL (WINAPI *PFN_AUTHENTICATION_CALLBACK)(void *, PBLUETOOTH_DEVICE_INFO);
+#define BLUETOOTH_DEVICE_INFO BLUETOOTH_DEVICE_INFO_STRUCT + +typedef BLUETOOTH_DEVICE_INFO * PBLUETOOTH_DEVICE_INFO; + +typedef enum _BLUETOOTH_AUTHENTICATION_METHOD { + BLUETOOTH_AUTHENTICATION_METHOD_LEGACY = 0x1, + BLUETOOTH_AUTHENTICATION_METHOD_OOB, + BLUETOOTH_AUTHENTICATION_METHOD_NUMERIC_COMPARISON, + BLUETOOTH_AUTHENTICATION_METHOD_PASSKEY_NOTIFICATION, + BLUETOOTH_AUTHENTICATION_METHOD_PASSKEY, +} BLUETOOTH_AUTHENTICATION_METHOD, * PBLUETOOTH_AUTHENTICATION_METHOD; + +typedef enum _BLUETOOTH_IO_CAPABILITY { + BLUETOOTH_IO_CAPABILITY_DISPLAYONLY = 0x00, + BLUETOOTH_IO_CAPABILITY_DISPLAYYESNO = 0x01, + BLUETOOTH_IO_CAPABILITY_KEYBOARDONLY = 0x02, + BLUETOOTH_IO_CAPABILITY_NOINPUTNOOUTPUT = 0x03, + BLUETOOTH_IO_CAPABILITY_UNDEFINED = 0xff, +} BLUETOOTH_IO_CAPABILITY; + +typedef enum _BLUETOOTH_AUTHENTICATION_REQUIREMENTS{ + BLUETOOTH_MITM_ProtectionNotRequired = 0, + BLUETOOTH_MITM_ProtectionRequired = 0x1, + BLUETOOTH_MITM_ProtectionNotRequiredBonding = 0x2, + BLUETOOTH_MITM_ProtectionRequiredBonding = 0x3, + BLUETOOTH_MITM_ProtectionNotRequiredGeneralBonding = 0x4, + BLUETOOTH_MITM_ProtectionRequiredGeneralBonding = 0x5, + BLUETOOTH_MITM_ProtectionNotDefined = 0xff, +} BLUETOOTH_AUTHENTICATION_REQUIREMENTS; + +typedef struct _BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS { + BLUETOOTH_DEVICE_INFO deviceInfo; + BLUETOOTH_AUTHENTICATION_METHOD authenticationMethod; + BLUETOOTH_IO_CAPABILITY ioCapability; + BLUETOOTH_AUTHENTICATION_REQUIREMENTS authenticationRequirements; + union{ + ULONG Numeric_Value; + ULONG Passkey; + }; +} BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS, *PBLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS; + +typedef BOOL (CALLBACK *PFN_AUTHENTICATION_CALLBACK_EX)(void *, BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS *); + typedef struct _SDP_ELEMENT_DATA { SDP_TYPE type; SDP_SPECIFICTYPE specificType; @@ -183,6 +226,7 @@ DWORD WINAPI BluetoothGetRadioInfo(HANDLE, PBLUETOOTH_RADIO_INFO); BOOL WINAPI BluetoothIsConnectable(HANDLE); BOOL WINAPI BluetoothIsDiscoverable(HANDLE); DWORD WINAPI BluetoothRegisterForAuthentication(BLUETOOTH_DEVICE_INFO *, HBLUETOOTH_AUTHENTICATION_REGISTRATION *, PFN_AUTHENTICATION_CALLBACK, void *); +DWORD WINAPI BluetoothRegisterForAuthenticationEx(const BLUETOOTH_DEVICE_INFO *, HBLUETOOTH_AUTHENTICATION_REGISTRATION *, PFN_AUTHENTICATION_CALLBACK_EX, void *); DWORD WINAPI BluetoothRemoveDevice(BLUETOOTH_ADDRESS *); #define BluetoothEnumAttributes BluetoothSdpEnumAttributes BOOL WINAPI BluetoothSdpEnumAttributes(BYTE *, ULONG, PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK, void *);
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54112 --- dlls/bluetoothapis/bluetoothapis.spec | 2 +- dlls/bthprops.cpl/bthprops.cpl.spec | 2 +- dlls/bthprops.cpl/main.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/bluetoothapis/bluetoothapis.spec b/dlls/bluetoothapis/bluetoothapis.spec index 39354b8c9a8..c93535b5d0a 100644 --- a/dlls/bluetoothapis/bluetoothapis.spec +++ b/dlls/bluetoothapis/bluetoothapis.spec @@ -51,7 +51,7 @@ @ stub BluetoothIsDiscoverable @ stub BluetoothIsVersionAvailable @ stub BluetoothRegisterForAuthentication -@ stub BluetoothRegisterForAuthenticationEx +@ stdcall BluetoothRegisterForAuthenticationEx(ptr ptr ptr ptr) bthprops.cpl.BluetoothRegisterForAuthenticationEx @ stub BluetoothRemoveDevice @ stub BluetoothSdpEnumAttributes @ stub BluetoothSdpGetAttributeValue diff --git a/dlls/bthprops.cpl/bthprops.cpl.spec b/dlls/bthprops.cpl/bthprops.cpl.spec index 30b5bfa0040..36ca0255bd1 100644 --- a/dlls/bthprops.cpl/bthprops.cpl.spec +++ b/dlls/bthprops.cpl/bthprops.cpl.spec @@ -42,7 +42,7 @@ @ stub BluetoothMapClassOfDeviceToImageIndex @ stub BluetoothMapClassOfDeviceToString @ stub BluetoothRegisterForAuthentication -@ stub BluetoothRegisterForAuthenticationEx +@ stdcall BluetoothRegisterForAuthenticationEx(ptr ptr ptr ptr) @ stub BluetoothRemoveDevice @ stub BluetoothSdpEnumAttributes @ stub BluetoothSdpGetAttributeValue diff --git a/dlls/bthprops.cpl/main.c b/dlls/bthprops.cpl/main.c index 2dcb18458b7..d2a010a686a 100644 --- a/dlls/bthprops.cpl/main.c +++ b/dlls/bthprops.cpl/main.c @@ -99,3 +99,13 @@ BOOL WINAPI BluetoothFindNextDevice(HBLUETOOTH_DEVICE_FIND find, BLUETOOTH_DEVIC SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } + +/********************************************************************* + * BluetoothRegisterForAuthenticationEx + */ +DWORD WINAPI BluetoothRegisterForAuthenticationEx(const BLUETOOTH_DEVICE_INFO *info, HBLUETOOTH_AUTHENTICATION_REGISTRATION *out, + PFN_AUTHENTICATION_CALLBACK_EX callback, void *param) +{ + FIXME("(%p, %p, %p, %p): stub!\n", info, out, callback, param); + return ERROR_CALL_NOT_IMPLEMENTED; +}
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- dlls/bluetoothapis/bluetoothapis.spec | 2 +- dlls/bthprops.cpl/bthprops.cpl.spec | 2 +- dlls/bthprops.cpl/main.c | 10 ++++++++++ dlls/irprops.cpl/irprops.cpl.spec | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/dlls/bluetoothapis/bluetoothapis.spec b/dlls/bluetoothapis/bluetoothapis.spec index c93535b5d0a..5b6d44928bf 100644 --- a/dlls/bluetoothapis/bluetoothapis.spec +++ b/dlls/bluetoothapis/bluetoothapis.spec @@ -63,7 +63,7 @@ @ stub BluetoothSetLocalServiceInfo @ stub BluetoothSetServiceState @ stub BluetoothSetServiceStateEx -@ stub BluetoothUnregisterAuthentication +@ stdcall BluetoothUnregisterAuthentication(long) bthprops.cpl.BluetoothUnregisterAuthentication @ stub BluetoothUpdateDeviceRecord @ stub BthpCheckForUnsupportedGuid @ stub BthpCleanupBRDeviceNode diff --git a/dlls/bthprops.cpl/bthprops.cpl.spec b/dlls/bthprops.cpl/bthprops.cpl.spec index 36ca0255bd1..a5e834b8ba1 100644 --- a/dlls/bthprops.cpl/bthprops.cpl.spec +++ b/dlls/bthprops.cpl/bthprops.cpl.spec @@ -55,7 +55,7 @@ @ stub BluetoothSendAuthenticationResponseEx @ stub BluetoothSetLocalServiceInfo @ stub BluetoothSetServiceState -@ stub BluetoothUnregisterAuthentication +@ stdcall BluetoothUnregisterAuthentication(long) @ stub BluetoothUpdateDeviceRecord @ stub BthpEnableAllServices @ stub BthpFindPnpInfo diff --git a/dlls/bthprops.cpl/main.c b/dlls/bthprops.cpl/main.c index d2a010a686a..eef26ad39e6 100644 --- a/dlls/bthprops.cpl/main.c +++ b/dlls/bthprops.cpl/main.c @@ -109,3 +109,13 @@ DWORD WINAPI BluetoothRegisterForAuthenticationEx(const BLUETOOTH_DEVICE_INFO *i FIXME("(%p, %p, %p, %p): stub!\n", info, out, callback, param); return ERROR_CALL_NOT_IMPLEMENTED; } + +/********************************************************************* + * BluetoothUnregisterAuthentication + */ +BOOL WINAPI BluetoothUnregisterAuthentication(HBLUETOOTH_AUTHENTICATION_REGISTRATION handle) +{ + FIXME("(%p): stub!\n", handle); + if (!handle) SetLastError(ERROR_INVALID_HANDLE); + return FALSE; +} diff --git a/dlls/irprops.cpl/irprops.cpl.spec b/dlls/irprops.cpl/irprops.cpl.spec index 252410f589f..8da4bf6995b 100644 --- a/dlls/irprops.cpl/irprops.cpl.spec +++ b/dlls/irprops.cpl/irprops.cpl.spec @@ -47,6 +47,6 @@ @ stub BluetoothSelectDevicesFree @ stub BluetoothSendAuthenticationResponse @ stub BluetoothSetServiceState -@ stub BluetoothUnregisterAuthentication +@ stdcall BluetoothUnregisterAuthentication(long) bthprops.cpl.BluetoothUnregisterAuthentication @ stub BluetoothUpdateDeviceRecord #@ stub CPlApplet
**v2:** - Remove trailing whitespace.