-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature-discover-connection-wrapper'
- remove qtbluetooth - updated wrapper and cleaned up crashing issues
- Loading branch information
Showing
17 changed files
with
346 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// Created by Michael on 8/27/2018. | ||
// | ||
|
||
#ifndef SMART_BASEDISCOVERYAGENT_H | ||
#define SMART_BASEDISCOVERYAGENT_H | ||
|
||
#include <QtCore/QObject> | ||
#include "BluetoothAddress.h" | ||
|
||
class BaseDiscoveryAgent : public QObject{ | ||
Q_OBJECT | ||
private: | ||
public: | ||
BaseDiscoveryAgent(){ | ||
|
||
} | ||
~BaseDiscoveryAgent(){ | ||
|
||
} | ||
|
||
virtual void start() = 0; | ||
virtual void stop() = 0; | ||
signals: | ||
void deviceDiscovered(BluetoothAddress address); | ||
void finished(); | ||
|
||
}; | ||
|
||
#endif //SMART_BASEDISCOVERYAGENT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// Created by Michael on 8/27/2018. | ||
// | ||
|
||
#include "common/BluetoothAddress.h" | ||
|
||
BluetoothAddress::BluetoothAddress(){ | ||
|
||
} | ||
BluetoothAddress::BluetoothAddress(const QString& mac, const QString& title) : | ||
m_mac(mac),m_title(title) {} | ||
|
||
BluetoothAddress::BluetoothAddress(const BluetoothAddress& address): | ||
m_title(address.m_title),m_mac(address.m_mac){ | ||
} | ||
|
||
|
||
BluetoothAddress::~BluetoothAddress() { | ||
} | ||
|
||
const QString& BluetoothAddress::getTitle() const{ | ||
return m_title; | ||
} | ||
|
||
const QString& BluetoothAddress::getMac() const{ | ||
return m_mac; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// Created by Michael on 8/27/2018. | ||
// | ||
|
||
#ifndef SMART_BLUETOOTHADRESS_H | ||
#define SMART_BLUETOOTHADRESS_H | ||
|
||
#include <QString> | ||
|
||
class BluetoothAddress{ | ||
private: | ||
QString m_mac; | ||
QString m_title; | ||
public: | ||
BluetoothAddress(); | ||
BluetoothAddress(const QString& mac, const QString& title); | ||
BluetoothAddress(const BluetoothAddress& address); | ||
BluetoothAddress(unsigned long long address, const QString& title); | ||
|
||
~BluetoothAddress(); | ||
|
||
const QString& getTitle() const; | ||
const QString& getMac() const; | ||
|
||
}; | ||
|
||
#endif //SMART_BLUETOOTHADRESS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.