From 441cd0b11186d66493798551e1102eb246f1af9f Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 30 Jun 2015 14:37:06 +0200 Subject: Getting started on a port to OSX. --- ble/OsxBluetooth.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ble/OsxBluetooth.h (limited to 'ble/OsxBluetooth.h') 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 + +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) override; + + BluetoothDevice &getDevice(Mac &mac) override; + +private: + bool scanning; + + map devices; +}; + +shared_ptr&& getAdapterImpl(); +void shutdownImpl(); + +} +} +} + +#endif -- cgit v1.2.3