summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNedim Hadzic <nhadzic@blackberry.com>2013-11-27 16:06:02 +0100
committerNedim Hadzic <nhadzic@blackberry.com>2013-11-28 16:31:48 +0100
commitbeb84e5fcdc79b3e9a613d9d5c36ac27952a5546 (patch)
treeb8f5c5bbaae93c52e06c648309f9ae2842b6af36 /src
parent60d9a890ad1b7238dd5713ad32be6e3423945728 (diff)
Removed get part in return methods.
In case method name is getValue(), it was renamed to value(). Change-Id: I914e16bd0b630c0810932c52af14f091cc35bd8f Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qlowenergycharacteristicinfo.cpp8
-rw-r--r--src/bluetooth/qlowenergycharacteristicinfo.h2
-rw-r--r--src/bluetooth/qlowenergycharacteristicinfo_p.cpp6
-rw-r--r--src/bluetooth/qlowenergycontroller.cpp18
-rw-r--r--src/bluetooth/qlowenergyserviceinfo.cpp4
-rw-r--r--src/bluetooth/qlowenergyserviceinfo.h4
6 files changed, 22 insertions, 20 deletions
diff --git a/src/bluetooth/qlowenergycharacteristicinfo.cpp b/src/bluetooth/qlowenergycharacteristicinfo.cpp
index b89ca939..232d03ca 100644
--- a/src/bluetooth/qlowenergycharacteristicinfo.cpp
+++ b/src/bluetooth/qlowenergycharacteristicinfo.cpp
@@ -283,4 +283,12 @@ bool QLowEnergyCharacteristicInfo::isValid() const
return true;
}
+/*!
+ Returns the list of characteristic descriptors.
+*/
+QList<QLowEnergyDescriptorInfo> QLowEnergyCharacteristicInfo::descriptors() const
+{
+ return d_ptr->descriptorsList;
+}
+
QT_END_NAMESPACE
diff --git a/src/bluetooth/qlowenergycharacteristicinfo.h b/src/bluetooth/qlowenergycharacteristicinfo.h
index 565d2195..0622b5d9 100644
--- a/src/bluetooth/qlowenergycharacteristicinfo.h
+++ b/src/bluetooth/qlowenergycharacteristicinfo.h
@@ -97,7 +97,7 @@ public:
bool isNotificationCharacteristic() const;
- QList<QLowEnergyDescriptorInfo> getDescriptors() const;
+ QList<QLowEnergyDescriptorInfo> descriptors() const;
bool isValid() const;
diff --git a/src/bluetooth/qlowenergycharacteristicinfo_p.cpp b/src/bluetooth/qlowenergycharacteristicinfo_p.cpp
index e43a0c71..092a2580 100644
--- a/src/bluetooth/qlowenergycharacteristicinfo_p.cpp
+++ b/src/bluetooth/qlowenergycharacteristicinfo_p.cpp
@@ -53,12 +53,6 @@ QLowEnergyCharacteristicInfoPrivate::~QLowEnergyCharacteristicInfoPrivate()
}
-void QLowEnergyCharacteristicInfoPrivate::propertyChanged(QString valueName, QDBusVariant value)
-{
- Q_UNUSED(valueName);
- Q_UNUSED(value);
-}
-
void QLowEnergyCharacteristicInfoPrivate::setValue(const QByteArray &wantedValue)
{
Q_UNUSED(wantedValue);
diff --git a/src/bluetooth/qlowenergycontroller.cpp b/src/bluetooth/qlowenergycontroller.cpp
index 00a33325..c74a67b2 100644
--- a/src/bluetooth/qlowenergycontroller.cpp
+++ b/src/bluetooth/qlowenergycontroller.cpp
@@ -133,7 +133,7 @@ void QLowEnergyControllerPrivate::_q_serviceError(const QBluetoothUuid &uuid)
void QLowEnergyControllerPrivate::_q_valueReceived(const QBluetoothUuid &uuid)
{
for (int i = 0; i < m_leServices.size(); i++) {
- QList<QLowEnergyCharacteristicInfo> characteristics = m_leServices.at(i).getCharacteristics();
+ QList<QLowEnergyCharacteristicInfo> characteristics = m_leServices.at(i).characteristics();
for (int j = 0; j < characteristics.size(); j++) {
if (characteristics.at(j).uuid() == uuid)
emit q_ptr->valueChanged(characteristics.at(j));
@@ -253,10 +253,10 @@ bool QLowEnergyController::enableNotifications(const QLowEnergyCharacteristicInf
{
bool enable = false;
for (int i = 0; i < d_ptr->m_leServices.size(); i++) {
- for (int j = 0; j < d_ptr->m_leServices.at(i).getCharacteristics().size(); j++) {
- if (d_ptr->m_leServices.at(i).getCharacteristics().at(j).uuid() == characteristic.uuid()) {
- connect(d_ptr->m_leServices.at(i).getCharacteristics().at(j).d_ptr.data(), SIGNAL(notifyValue(QBluetoothUuid)), this, SLOT(_q_valueReceived(QBluetoothUuid)));
- enable = d_ptr->m_leServices.at(i).getCharacteristics().at(j).d_ptr->enableNotification();
+ for (int j = 0; j < d_ptr->m_leServices.at(i).characteristics().size(); j++) {
+ if (d_ptr->m_leServices.at(i).characteristics().at(j).uuid() == characteristic.uuid()) {
+ connect(d_ptr->m_leServices.at(i).characteristics().at(j).d_ptr.data(), SIGNAL(notifyValue(QBluetoothUuid)), this, SLOT(_q_valueReceived(QBluetoothUuid)));
+ enable = d_ptr->m_leServices.at(i).characteristics().at(j).d_ptr->enableNotification();
}
}
}
@@ -272,10 +272,10 @@ bool QLowEnergyController::enableNotifications(const QLowEnergyCharacteristicInf
void QLowEnergyController::disableNotifications(const QLowEnergyCharacteristicInfo &characteristic)
{
for (int i = 0; i < d_ptr->m_leServices.size(); i++) {
- for (int j = 0; j < d_ptr->m_leServices.at(i).getCharacteristics().size(); j++) {
- if (d_ptr->m_leServices.at(i).getCharacteristics().at(j).uuid() == characteristic.uuid()){
- disconnect(d_ptr->m_leServices.at(i).getCharacteristics().at(j).d_ptr.data(), SIGNAL(notifyValue(QBluetoothUuid)), this, SLOT(_q_valueReceived(QBluetoothUuid)));
- d_ptr->m_leServices.at(i).getCharacteristics().at(j).d_ptr->disableNotification();
+ for (int j = 0; j < d_ptr->m_leServices.at(i).characteristics().size(); j++) {
+ if (d_ptr->m_leServices.at(i).characteristics().at(j).uuid() == characteristic.uuid()){
+ disconnect(d_ptr->m_leServices.at(i).characteristics().at(j).d_ptr.data(), SIGNAL(notifyValue(QBluetoothUuid)), this, SLOT(_q_valueReceived(QBluetoothUuid)));
+ d_ptr->m_leServices.at(i).characteristics().at(j).d_ptr->disableNotification();
}
}
}
diff --git a/src/bluetooth/qlowenergyserviceinfo.cpp b/src/bluetooth/qlowenergyserviceinfo.cpp
index 137b93f4..178ca704 100644
--- a/src/bluetooth/qlowenergyserviceinfo.cpp
+++ b/src/bluetooth/qlowenergyserviceinfo.cpp
@@ -160,7 +160,7 @@ QBluetoothUuid QLowEnergyServiceInfo::uuid() const
Returns the list of service characteristics. If service was not connected, an empty
list will be returned.
*/
-QList<QLowEnergyCharacteristicInfo> QLowEnergyServiceInfo::getCharacteristics() const
+QList<QLowEnergyCharacteristicInfo> QLowEnergyServiceInfo::characteristics() const
{
return d_ptr->characteristicList;
}
@@ -185,7 +185,7 @@ void QLowEnergyServiceInfo::setServiceType(QLowEnergyServiceInfo::ServiceType ty
Returns the service type. If setServiceType is not called default service type
(PrimaryService) is returned.
*/
-QLowEnergyServiceInfo::ServiceType QLowEnergyServiceInfo::getServiceType() const
+QLowEnergyServiceInfo::ServiceType QLowEnergyServiceInfo::serviceType() const
{
return d_ptr->serviceType;
}
diff --git a/src/bluetooth/qlowenergyserviceinfo.h b/src/bluetooth/qlowenergyserviceinfo.h
index 2412a742..745fb77f 100644
--- a/src/bluetooth/qlowenergyserviceinfo.h
+++ b/src/bluetooth/qlowenergyserviceinfo.h
@@ -88,12 +88,12 @@ public:
QBluetoothUuid uuid() const;
- QList<QLowEnergyCharacteristicInfo> getCharacteristics() const;
+ QList<QLowEnergyCharacteristicInfo> characteristics() const;
QString name() const;
void setServiceType(QLowEnergyServiceInfo::ServiceType type);
- QLowEnergyServiceInfo::ServiceType getServiceType() const;
+ QLowEnergyServiceInfo::ServiceType serviceType() const;
void setRandomAddress();