@bun-win32/bluetoothapis 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -27,7 +27,7 @@
27
27
  "directory": "packages/bluetoothapis"
28
28
  },
29
29
  "type": "module",
30
- "version": "1.0.0",
30
+ "version": "1.0.1",
31
31
  "main": "./index.ts",
32
32
  "keywords": [
33
33
  "bun",
@@ -54,6 +54,7 @@
54
54
  "bun": ">=1.1.0"
55
55
  },
56
56
  "scripts": {
57
- "example": "bun ./example/bluetoothapis.ts"
57
+ "example:device-scanner": "bun ./example/device-scanner.ts",
58
+ "example:radio-inspector": "bun ./example/radio-inspector.ts"
58
59
  }
59
60
  }
@@ -281,7 +281,7 @@ class BluetoothApis extends Win32 {
281
281
  }
282
282
 
283
283
  // https://learn.microsoft.com/en-us/windows/win32/api/bluetoothapis/nf-bluetoothapis-bluetoothgetdeviceinfo
284
- public static BluetoothGetDeviceInfo(hRadio: HANDLE, pbtdi: PBLUETOOTH_DEVICE_INFO): DWORD {
284
+ public static BluetoothGetDeviceInfo(hRadio: HANDLE | 0n, pbtdi: PBLUETOOTH_DEVICE_INFO): DWORD {
285
285
  return BluetoothApis.Load('BluetoothGetDeviceInfo')(hRadio, pbtdi);
286
286
  }
287
287
 
@@ -306,7 +306,7 @@ class BluetoothApis extends Win32 {
306
306
  }
307
307
 
308
308
  // https://learn.microsoft.com/en-us/windows/win32/api/bluetoothapis/nf-bluetoothapis-bluetoothregisterforauthentication
309
- public static BluetoothRegisterForAuthentication(pbtdi: PBLUETOOTH_DEVICE_INFO, phRegHandle: PHBLUETOOTH_AUTHENTICATION_REGISTRATION, pfnCallback: PFN_AUTHENTICATION_CALLBACK, pvParam: PVOID | NULL): DWORD {
309
+ public static BluetoothRegisterForAuthentication(pbtdi: PBLUETOOTH_DEVICE_INFO | NULL, phRegHandle: PHBLUETOOTH_AUTHENTICATION_REGISTRATION, pfnCallback: PFN_AUTHENTICATION_CALLBACK | NULL, pvParam: PVOID | NULL): DWORD {
310
310
  return BluetoothApis.Load('BluetoothRegisterForAuthentication')(pbtdi, phRegHandle, pfnCallback, pvParam);
311
311
  }
312
312
 
@@ -361,7 +361,7 @@ class BluetoothApis extends Win32 {
361
361
  }
362
362
 
363
363
  // https://learn.microsoft.com/en-us/windows/win32/api/bluetoothapis/nf-bluetoothapis-bluetoothsetservicestate
364
- public static BluetoothSetServiceState(hRadio: HANDLE, pbtdi: PBLUETOOTH_DEVICE_INFO, pGuidService: PGUID, dwServiceFlags: DWORD): DWORD {
364
+ public static BluetoothSetServiceState(hRadio: HANDLE | 0n, pbtdi: PBLUETOOTH_DEVICE_INFO, pGuidService: PGUID, dwServiceFlags: DWORD): DWORD {
365
365
  return BluetoothApis.Load('BluetoothSetServiceState')(hRadio, pbtdi, pGuidService, dwServiceFlags);
366
366
  }
367
367