From 46eeefb53a1843908c3e7dbae56dbaa0a6d83bdd Mon Sep 17 00:00:00 2001 From: JF Date: Fri, 27 Dec 2019 17:05:49 +0100 Subject: Add BleController to manage the BLE connection status --- src/Components/Ble/BleController.cpp | 11 +++++++++++ src/Components/Ble/BleController.h | 15 +++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/Components/Ble/BleController.cpp create mode 100644 src/Components/Ble/BleController.h (limited to 'src/Components/Ble') diff --git a/src/Components/Ble/BleController.cpp b/src/Components/Ble/BleController.cpp new file mode 100644 index 00000000..c2458087 --- /dev/null +++ b/src/Components/Ble/BleController.cpp @@ -0,0 +1,11 @@ +#include "BleController.h" + +using namespace Pinetime::Controllers; + +void Ble::Connect() { + isConnected = true; +} + +void Ble::Disconnect() { + isConnected = false; +} diff --git a/src/Components/Ble/BleController.h b/src/Components/Ble/BleController.h new file mode 100644 index 00000000..be491ee9 --- /dev/null +++ b/src/Components/Ble/BleController.h @@ -0,0 +1,15 @@ +#pragma once + +namespace Pinetime { + namespace Controllers { + class Ble { + public: + bool IsConnected() const {return isConnected;} + void Connect(); + void Disconnect(); + + private: + bool isConnected = false; + }; + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2