summaryrefslogtreecommitdiffstats
path: root/core/cli-downloader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/cli-downloader.cpp')
-rw-r--r--core/cli-downloader.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/core/cli-downloader.cpp b/core/cli-downloader.cpp
deleted file mode 100644
index 77053c0c7..000000000
--- a/core/cli-downloader.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include "qt-models/diveimportedmodel.h"
-
-#include <QObject>
-#include <QUndoStack>
-
-
-void cliDownloader(const char *vendor, const char *product, const char *device)
-{
- DiveImportedModel *diveImportedModel = new DiveImportedModel();
- DiveImportedModel::connect(diveImportedModel, &DiveImportedModel::downloadFinished, [] {
- // do something useful at the end of the download
- printf("Finished\n");
- });
-
- auto data = diveImportedModel->thread.data();
- data->setVendor(vendor);
- data->setProduct(product);
- data->setBluetoothMode(false);
- if (data->vendor() == "Uemis") {
- char *colon;
- char *devname = strdup(device);
- if ((colon = strstr(devname, ":\\ (UEMISSDA)")) != NULL) {
- *(colon + 2) = '\0';
- fprintf(stderr, "shortened devname to \"%s\"", devname);
- }
- data->setDevName(devname);
- } else {
- data->setDevName(device);
- }
-
- // some assumptiond - should all be configurable
- data->setForceDownload(false);
- data->setSaveLog(true);
- data->setSaveDump(false);
-
- // before we start, remember where the dive_table ended
- diveImportedModel->startDownload();
-}