diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-02-17 07:58:36 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-02-17 07:58:36 +0100 |
commit | 360fd8567545253f680ea544ce7313ab1ef43d14 (patch) | |
tree | 06fb409ddee9b370a4d0a76884b433e8e93f0de2 /Bluetooth.h | |
parent | 60d5440dd3514e71b87948ff5ed30ee38445b8a5 (diff) | |
download | ble-toys-360fd8567545253f680ea544ce7313ab1ef43d14.tar.gz ble-toys-360fd8567545253f680ea544ce7313ab1ef43d14.tar.bz2 ble-toys-360fd8567545253f680ea544ce7313ab1ef43d14.tar.xz ble-toys-360fd8567545253f680ea544ce7313ab1ef43d14.zip |
o Passing tests.
Diffstat (limited to 'Bluetooth.h')
-rw-r--r-- | Bluetooth.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/Bluetooth.h b/Bluetooth.h index 15ef171..7bc5bc3 100644 --- a/Bluetooth.h +++ b/Bluetooth.h @@ -5,20 +5,9 @@ #include <stdexcept> // For now -#include <boost/log/core.hpp> -#include <boost/log/trivial.hpp> -#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; |