MCPcopy Create free account
hub / github.com/MeisApps/pcbu-desktop / IsAvailable

Method IsAvailable

common/src/platform/BluetoothHelper.Linux.cpp:11–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <unistd.h>
10
11bool BluetoothHelper::IsAvailable() {
12 int dev_id = hci_get_route(nullptr);
13 int sock = hci_open_dev(dev_id);
14 if(dev_id < 0 || sock < 0)
15 return false;
16 close(sock);
17 return true;
18}
19
20void BluetoothHelper::StartScan() {}
21

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected