From 280573deca13155bc3c5ffaf84b2703d5bb42b1e Mon Sep 17 00:00:00 2001 From: Saiqi Jia Date: Fri, 12 May 2023 23:41:11 +0800 Subject: [PATCH] Add support for fetching bluetooth device MAC addresses --- include/pqrs/osx/iokit_hid_device.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/pqrs/osx/iokit_hid_device.hpp b/include/pqrs/osx/iokit_hid_device.hpp index 8bb8a0c..08b76f2 100644 --- a/include/pqrs/osx/iokit_hid_device.hpp +++ b/include/pqrs/osx/iokit_hid_device.hpp @@ -113,6 +113,10 @@ class iokit_hid_device final { return find_string_property(CFSTR(kIOHIDTransportKey)); } + std::optional find_device_address(void) const { + return find_string_property(CFSTR("DeviceAddress")); + } + // Note: // Input Monitoring permission user approval is required since macOS Catalina (10.15). std::vector> make_elements(void) {