aboutsummaryrefslogtreecommitdiff
path: root/ble/OsxBluetooth.h
diff options
context:
space:
mode:
Diffstat (limited to 'ble/OsxBluetooth.h')
-rw-r--r--ble/OsxBluetooth.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/ble/OsxBluetooth.h b/ble/OsxBluetooth.h
new file mode 100644
index 0000000..8fa06a9
--- /dev/null
+++ b/ble/OsxBluetooth.h
@@ -0,0 +1,39 @@
+#ifndef OSX_BLUETOOTH_H
+#define OSX_BLUETOOTH_H
+
+#include <map>
+
+namespace trygvis {
+namespace bluetooth {
+namespace osx {
+
+class OsxBluetoothDevice;
+
+class OsxBluetoothAdapter : public DefaultBluetoothAdapter {
+public:
+ OsxBluetoothAdapter(const string name, Mac &mac);
+
+ ~OsxBluetoothAdapter();
+
+ void startScan() override;
+
+ void stopScan() override;
+
+ void runScan(std::function<void(BluetoothDevice &device)>) override;
+
+ BluetoothDevice &getDevice(Mac &mac) override;
+
+private:
+ bool scanning;
+
+ map<Mac, OsxBluetoothDevice *> devices;
+};
+
+shared_ptr<OsxBluetoothAdapter>&& getAdapterImpl();
+void shutdownImpl();
+
+}
+}
+}
+
+#endif