diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-03-14 18:11:46 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-16 07:58:20 -0700 |
commit | ec3a968df9d8fc706fedb788959631e2ed84e04b (patch) | |
tree | aaa56de98ae2a861aef1d9bc2ab78fe05f06f745 /core/downloadfromdcthread.h | |
parent | 1495aa2dbf5366cc135c1ceb959c6a12abbb3e0b (diff) | |
download | subsurface-ec3a968df9d8fc706fedb788959631e2ed84e04b.tar.gz |
android/usb: pass in the UsbDevice when downloading
This finally allows us to download from not just the first device, but specifically
the device that the user picks.
Passing the object through a void pointer is not nice - but since this traverses
C code other solutions (like passing an index into the list) seemed even worse.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/downloadfromdcthread.h')
-rw-r--r-- | core/downloadfromdcthread.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/downloadfromdcthread.h b/core/downloadfromdcthread.h index 4284c2cc6..f142a4243 100644 --- a/core/downloadfromdcthread.h +++ b/core/downloadfromdcthread.h @@ -31,7 +31,7 @@ public: int diveId() const; /* this needs to be a pointer to make the C-API happy */ - device_data_t* internalData(); + device_data_t *internalData(); QStringList getProductListFromVendor(const QString& vendor); int getMatchingAddress(const QString &vendor, const QString &product); @@ -49,6 +49,9 @@ public: void setForceDownload(bool force); void setSaveDump(bool dumpMode); void setSaveLog(bool saveLog); +#if defined(Q_OS_ANDROID) + void setUsbDevice(void *device); +#endif private: device_data_t data; |