diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-09-01 13:46:59 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-09-02 13:58:14 +0200 |
commit | 6837d143b456eb1f253b68704a5ff1b48bef4de4 (patch) | |
tree | 55d900db5b034498f9690aa508696dfc8978d736 /examples/bluetooth/lowenergyscanner/device.h | |
parent | ffbe7708f87aea5e7919e7ca1029bfa24ce13bcd (diff) |
Add support for random vs public address selection to lowenergyscanner
Change-Id: I963f47f0089d072249b73bdfb0c715d43186b08d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'examples/bluetooth/lowenergyscanner/device.h')
-rw-r--r-- | examples/bluetooth/lowenergyscanner/device.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/bluetooth/lowenergyscanner/device.h b/examples/bluetooth/lowenergyscanner/device.h index f15c4c95..97a52b26 100644 --- a/examples/bluetooth/lowenergyscanner/device.h +++ b/examples/bluetooth/lowenergyscanner/device.h @@ -65,6 +65,7 @@ class Device: public QObject Q_PROPERTY(QVariant servicesList READ getServices NOTIFY servicesUpdated) Q_PROPERTY(QVariant characteristicList READ getCharacteristics NOTIFY characteristicsUpdated) Q_PROPERTY(QString update READ getUpdate NOTIFY updateChanged) + Q_PROPERTY(bool useRandomAddress READ isRandomAddress WRITE setRandomAddress NOTIFY randomAddressChanged) Q_PROPERTY(bool state READ state NOTIFY stateChanged) public: Device(); @@ -75,6 +76,9 @@ public: QString getUpdate(); bool state(); + bool isRandomAddress() const; + void setRandomAddress(bool newValue); + public slots: void startDeviceDiscovery(); void scanServices(const QString &address); @@ -105,6 +109,7 @@ Q_SIGNALS: void updateChanged(); void stateChanged(); void disconnected(); + void randomAddressChanged(); private: void setUpdate(QString message); @@ -117,6 +122,7 @@ private: bool connected; QLowEnergyController *controller; bool m_deviceScanState; + bool randomAddress; }; #endif // DEVICE_H |