summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-03-14 16:43:29 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-24 08:33:34 +0100
commit5c9d111edbdf73a4875bcf9ea02a3057659f7730 (patch)
tree1c6881cdddcb42b6204aa67994a5e54823fc0124
parente56cd8d2dc4d32f663568d12381661072c6a769a (diff)
Cleanup headers files for BtLE classes
Some spacing and reordering for readability and remove unnecessary friend relationships. Change-Id: I9d2c9eb78713b94999829bc0a58824d476a2dbd4 Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r--src/bluetooth/qlowenergycharacteristicinfo.h3
-rw-r--r--src/bluetooth/qlowenergycontroller.h15
-rw-r--r--src/bluetooth/qlowenergycontroller_p.h1
-rw-r--r--src/bluetooth/qlowenergydescriptorinfo.h7
-rw-r--r--src/bluetooth/qlowenergyserviceinfo.h3
5 files changed, 13 insertions, 16 deletions
diff --git a/src/bluetooth/qlowenergycharacteristicinfo.h b/src/bluetooth/qlowenergycharacteristicinfo.h
index ceaac46e..e8746b04 100644
--- a/src/bluetooth/qlowenergycharacteristicinfo.h
+++ b/src/bluetooth/qlowenergycharacteristicinfo.h
@@ -53,11 +53,8 @@ class QLowEnergyCharacteristicInfoPrivate;
class Q_BLUETOOTH_EXPORT QLowEnergyCharacteristicInfo
{
- friend class QLowEnergyServiceInfo;
- friend class QLowEnergyServiceInfoPrivate;
friend class QLowEnergyController;
friend class QLowEnergyControllerPrivate;
- friend class QLowEnergyCharacteristicInfoPrivate;
public:
enum Property {
diff --git a/src/bluetooth/qlowenergycontroller.h b/src/bluetooth/qlowenergycontroller.h
index aa8f4eea..e993d8d7 100644
--- a/src/bluetooth/qlowenergycontroller.h
+++ b/src/bluetooth/qlowenergycontroller.h
@@ -56,31 +56,36 @@ class QLowEnergyControllerPrivate;
class Q_BLUETOOTH_EXPORT QLowEnergyController: public QObject
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QLowEnergyController)
public:
QLowEnergyController(QObject *parent = 0);
QLowEnergyController(const QBluetoothAddress &localAdapter, QObject *parent = 0);
~QLowEnergyController();
+
QList<QLowEnergyServiceInfo> services() const;
+
void connectToService(const QLowEnergyServiceInfo &leService);
void disconnectFromService(const QLowEnergyServiceInfo &leService = QLowEnergyServiceInfo());
+
bool enableNotifications(const QLowEnergyCharacteristicInfo &characteristic);
void disableNotifications(const QLowEnergyCharacteristicInfo &characteristic);
+
bool writeCharacteristic(const QLowEnergyCharacteristicInfo &characteristic);
bool writeDescriptor(const QLowEnergyDescriptorInfo &descriptor);
+
QString errorString() const;
+
void setRandomAddress();
Q_SIGNALS:
void connected(const QLowEnergyServiceInfo &);
- void error(const QLowEnergyServiceInfo &);
- void error(const QLowEnergyCharacteristicInfo &);
void disconnected(const QLowEnergyServiceInfo &);
- void valueChanged(const QLowEnergyCharacteristicInfo &);
-
+ void valueChanged(const QLowEnergyCharacteristicInfo &);
+ void error(const QLowEnergyServiceInfo &);
+ void error(const QLowEnergyCharacteristicInfo &);
private:
+ Q_DECLARE_PRIVATE(QLowEnergyController)
QLowEnergyControllerPrivate *d_ptr;
#ifdef QT_BLUEZ_BLUETOOTH
Q_PRIVATE_SLOT(d_func(), void _q_replyReceived(const QString &reply))
diff --git a/src/bluetooth/qlowenergycontroller_p.h b/src/bluetooth/qlowenergycontroller_p.h
index cb291569..971cd7dd 100644
--- a/src/bluetooth/qlowenergycontroller_p.h
+++ b/src/bluetooth/qlowenergycontroller_p.h
@@ -44,7 +44,6 @@
QT_BEGIN_NAMESPACE
-class QLowEnergyController;
class QLowEnergyProcess;
class QLowEnergyControllerPrivate
diff --git a/src/bluetooth/qlowenergydescriptorinfo.h b/src/bluetooth/qlowenergydescriptorinfo.h
index 925ea122..272922b9 100644
--- a/src/bluetooth/qlowenergydescriptorinfo.h
+++ b/src/bluetooth/qlowenergydescriptorinfo.h
@@ -53,21 +53,20 @@ class QLowEnergyDescriptorInfoPrivate;
class Q_BLUETOOTH_EXPORT QLowEnergyDescriptorInfo
{
- friend class QLowEnergyCharacteristicInfo;
- friend class QLowEnergyCharacteristicInfoPrivate;
- friend class QLowEnergyServiceInfoPrivate;
friend class QLowEnergyControllerPrivate;
public:
explicit QLowEnergyDescriptorInfo(const QBluetoothUuid &uuid);
~QLowEnergyDescriptorInfo();
QLowEnergyDescriptorInfo &operator=(const QLowEnergyDescriptorInfo &other);
+
QByteArray value() const;
+ void setValue(const QByteArray &value);
+
QBluetoothUuid uuid() const;
QString handle() const;
QVariantMap properties() const;
QString name() const;
- void setValue(const QByteArray &value);
private:
QSharedPointer<QLowEnergyDescriptorInfoPrivate> d_ptr;
diff --git a/src/bluetooth/qlowenergyserviceinfo.h b/src/bluetooth/qlowenergyserviceinfo.h
index 6fb2316a..8365236a 100644
--- a/src/bluetooth/qlowenergyserviceinfo.h
+++ b/src/bluetooth/qlowenergyserviceinfo.h
@@ -54,9 +54,6 @@ class QBluetoothAddress;
class Q_BLUETOOTH_EXPORT QLowEnergyServiceInfo
{
- friend class QBluetoothServiceDiscoveryAgent;
- friend class QBluetoothServiceDiscoveryAgentPrivate;
- friend class QLowEnergyController;
friend class QLowEnergyControllerPrivate;
public:
enum ServiceType {