summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-03-30 14:06:30 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-04-10 07:46:50 +0000
commit3162d33d98a96e506a4d8dfc6813f1fb0fe44c18 (patch)
treeddbc1d830c03162fa4ca393841085687a2ba2a64
parent3a6824f137f48918a2b76b01ff634e30f3878cc2 (diff)
Make new read(Descriptor/Characteristic)() API compile on OSX and iOS
Change-Id: I19a1fd15a5cdc13b28f77fff02949a7895ddb0cb Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
-rw-r--r--src/bluetooth/qlowenergyservice_osx.mm30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergyservice_osx.mm b/src/bluetooth/qlowenergyservice_osx.mm
index 436cc086..80ab6eaa 100644
--- a/src/bluetooth/qlowenergyservice_osx.mm
+++ b/src/bluetooth/qlowenergyservice_osx.mm
@@ -177,6 +177,22 @@ bool QLowEnergyService::contains(const QLowEnergyCharacteristic &characteristic)
return false;
}
+void QLowEnergyService::readCharacteristic(const QLowEnergyCharacteristic &characteristic)
+{
+ // not a characteristic of this service
+ if (!contains(characteristic))
+ return;
+
+ QLowEnergyControllerPrivateOSX *const controller = qt_mac_le_controller(d_ptr);
+ if (state() != ServiceDiscovered || !controller) {
+ d_ptr->setError(OperationError);
+ return;
+ }
+
+ //TODO implement QLowEnergyService::readCharacteristic() on iOS/OSX
+}
+
+
void QLowEnergyService::writeCharacteristic(const QLowEnergyCharacteristic &ch, const QByteArray &newValue,
WriteMode mode)
{
@@ -218,6 +234,20 @@ bool QLowEnergyService::contains(const QLowEnergyDescriptor &descriptor) const
return false;
}
+void QLowEnergyService::readDescriptor(const QLowEnergyDescriptor &descriptor)
+{
+ if (!contains(descriptor))
+ return;
+
+ QLowEnergyControllerPrivateOSX *const controller = qt_mac_le_controller(d_ptr);
+ if (state() != ServiceDiscovered || !controller) {
+ d_ptr->setError(OperationError);
+ return;
+ }
+
+ //TODO implement QLowEnergyService::readDescriptor() on iOS/OSX
+}
+
void QLowEnergyService::writeDescriptor(const QLowEnergyDescriptor &descriptor,
const QByteArray &newValue)
{