summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller_win_p.h
diff options
context:
space:
mode:
authorLubomir I. Ivanov (VMware) <neolit123@gmail.com>2018-03-06 16:20:22 +0200
committerLubomir I. Ivanov <neolit123@gmail.com>2018-03-29 19:31:19 +0000
commit785462c02a4c793be0801232f5bd0c97351d950e (patch)
tree5f5c10571a290ac4fac85c11050c26124263750d /src/bluetooth/qlowenergycontroller_win_p.h
parent43eebc049aef3b858dd1d38ebe4bf9b395891722 (diff)
qlecontroller_win: read characteristics in a separate thread
Add support for the ThreadWorkerJob type ReadChar in QLowEnergyControllerPrivateWin32. This type of job is responsible for reading GATT characteristics in a separate thread using the previously implemented ThreadWorkerJob scheme: - ThreadWorker::runPendingJob() - QLowEnergyControllerPrivateWin32::jobFinished() The blocking function in this case is getGattCharacteristicValue(). Change-Id: Idc87267a44aab51febae4addaca4b61d7e582a8a Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_win_p.h')
-rw-r--r--src/bluetooth/qlowenergycontroller_win_p.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycontroller_win_p.h b/src/bluetooth/qlowenergycontroller_win_p.h
index 64f824e6..fc20a349 100644
--- a/src/bluetooth/qlowenergycontroller_win_p.h
+++ b/src/bluetooth/qlowenergycontroller_win_p.h
@@ -88,6 +88,16 @@ struct WriteCharData
Q_DECLARE_METATYPE(WriteCharData)
+struct ReadCharData
+{
+ QByteArray value;
+ HANDLE hService;
+ BTH_LE_GATT_CHARACTERISTIC gattCharacteristic;
+ int systemErrorCode;
+};
+
+Q_DECLARE_METATYPE(ReadCharData)
+
class ThreadWorker : public QObject
{
Q_OBJECT