File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -1134,7 +1134,7 @@ elseif(Haiku)
11341134 src/detection/cpucache/cpucache_shared.c
11351135 src/detection/cpuusage/cpuusage_haiku.c
11361136 src/detection/cursor/cursor_nosupport.c
1137- src/detection/bluetooth/bluetooth_nosupport.c
1137+ src/detection/bluetooth/bluetooth_haiku.cpp
11381138 src/detection/bluetoothradio/bluetoothradio_nosupport.c
11391139 src/detection/disk/disk_haiku.cpp
11401140 src/detection/dns/dns_linux.c
@@ -1649,6 +1649,7 @@ elseif(Haiku)
16491649 PRIVATE "bnetapi"
16501650 PRIVATE "media"
16511651 PRIVATE "device"
1652+ PRIVATE "bluetooth"
16521653 PRIVATE "be"
16531654 PRIVATE "gnu"
16541655 )
Original file line number Diff line number Diff line change 1+ extern " C" {
2+ #include " bluetooth.h"
3+ }
4+
5+ #include < bluetooth/LocalDevice.h>
6+
7+ const char * ffDetectBluetooth (FF_MAYBE_UNUSED FFBluetoothOptions* options, FFlist* devices /* FFBluetoothResult */ )
8+ {
9+ using namespace Bluetooth ;
10+ LocalDevice* dev = LocalDevice::GetLocalDevice ();
11+ if (!dev) return NULL ;
12+
13+ BString devClass;
14+ dev->GetDeviceClass ().DumpDeviceClass (devClass);
15+
16+ FFBluetoothResult* device = (FFBluetoothResult*) ffListAdd (devices);
17+ ffStrbufInitS (&device->name , dev->GetFriendlyName ());
18+ ffStrbufInitS (&device->address , bdaddrUtils::ToString (dev->GetBluetoothAddress ()).String ());
19+ ffStrbufInitS (&device->type , devClass.String ());
20+ device->battery = 0 ;
21+ device->connected = true ;
22+
23+ // TODO: more devices?
24+
25+ return NULL ;
26+ }
You can’t perform that action at this time.
0 commit comments