From 360fd8567545253f680ea544ce7313ab1ef43d14 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 17 Feb 2015 07:58:36 +0100 Subject: o Passing tests. --- Bluetooth.h | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'Bluetooth.h') diff --git a/Bluetooth.h b/Bluetooth.h index 15ef171..7bc5bc3 100644 --- a/Bluetooth.h +++ b/Bluetooth.h @@ -5,20 +5,9 @@ #include // For now -#include -#include -#include "ByteBuffer.h" - -#define D BOOST_LOG_TRIVIAL(debug) -#define I BOOST_LOG_TRIVIAL(info) -#define W BOOST_LOG_TRIVIAL(warning) +#include "log.h" -#define DF BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ": " -#define IF BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " -#define WF BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << ": " - -#define UUID_PRIMARY_SERVICE 0x2800 -#define UUID_SECONDARY_SERVICE 0x2801 +#include "ByteBuffer.h" namespace trygvis { using namespace std; @@ -91,9 +80,11 @@ namespace trygvis { virtual ~BluetoothAdapter(); + virtual void runScan(void (callback)(BluetoothDevice &device)) = 0; + virtual void stopScan() = 0; - virtual void runScan(void (callback)(BluetoothDevice &device)) = 0; + virtual void startScan() = 0; virtual BluetoothDevice &getDevice(Mac& mac) = 0; }; @@ -128,7 +119,7 @@ namespace trygvis { public: ~AttributeData(); - static AttributeData fromByteBuffer(ByteBuffer &value, uint8_t length); + static AttributeData fromByteBuffer(ByteBuffer &value); const uint16_t handle; const uint16_t groupEndHandle; -- cgit v1.2.3