Skip to content

Add BluetoothApis to c.s.j.p.win32#1725

Merged
dbwiddis merged 2 commits into
java-native-access:masterfrom
dbwiddis:add-bluetooth-apis
May 20, 2026
Merged

Add BluetoothApis to c.s.j.p.win32#1725
dbwiddis merged 2 commits into
java-native-access:masterfrom
dbwiddis:add-bluetooth-apis

Conversation

@dbwiddis
Copy link
Copy Markdown
Contributor

@dbwiddis dbwiddis commented May 17, 2026

Adds mappings for the Windows Bluetooth API (BluetoothApis.dll) to enumerate Bluetooth radios and paired/connected devices.

Structs

  • BLUETOOTH_ADDRESS: Union with ullLong (BTH_ADDR) and rgBytes[6]
  • BLUETOOTH_DEVICE_INFO: Device name, address, CoD, connected/remembered/authenticated flags
  • BLUETOOTH_DEVICE_SEARCH_PARAMS: Search criteria for device enumeration
  • BLUETOOTH_FIND_RADIO_PARAMS: Radio enumeration parameters
  • BLUETOOTH_RADIO_INFO: Radio name, address, CoD, manufacturer

Functions

  • BluetoothFindFirstRadio / BluetoothFindNextRadio / BluetoothFindRadioClose
  • BluetoothGetRadioInfo
  • BluetoothFindFirstDevice / BluetoothFindNextDevice / BluetoothFindDeviceClose

Add mappings for the Windows Bluetooth API (BluetoothApis.dll):
- BLUETOOTH_ADDRESS union (ullLong / rgBytes[6])
- BLUETOOTH_DEVICE_INFO struct
- BLUETOOTH_DEVICE_SEARCH_PARAMS struct
- BLUETOOTH_FIND_RADIO_PARAMS struct
- BLUETOOTH_RADIO_INFO struct
- BluetoothFindFirstRadio / BluetoothFindNextRadio / BluetoothFindRadioClose
- BluetoothGetRadioInfo
- BluetoothFindFirstDevice / BluetoothFindNextDevice / BluetoothFindDeviceClose
@dbwiddis dbwiddis force-pushed the add-bluetooth-apis branch from fe95cbd to da652b6 Compare May 17, 2026 20:55
Copy link
Copy Markdown
Member

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general looks sane to me. I left three nitpicks inline.

Comment thread contrib/platform/src/com/sun/jna/platform/win32/BluetoothApis.java Outdated
Comment thread contrib/platform/src/com/sun/jna/platform/win32/BluetoothApis.java Outdated
Comment thread contrib/platform/src/com/sun/jna/platform/win32/BluetoothApis.java Outdated
Copy link
Copy Markdown
Member

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane to me. Thank you

@dbwiddis dbwiddis merged commit 0e29d6f into java-native-access:master May 20, 2026
12 checks passed
@dbwiddis dbwiddis deleted the add-bluetooth-apis branch May 20, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants