summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2014-10-12 06:57:32 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-12 07:34:46 -0400
commita7e1e7fee1c2afc61b37a0bea76032d169dcee7a (patch)
tree06b9ce2eca7e6e6e0c8ad89875bfff3e53a426cc
parent9882bf5ff8762ebe4741b6380c3ed1088027e5cc (diff)
downloadsubsurface-a7e1e7fee1c2afc61b37a0bea76032d169dcee7a.tar.gz
Pass the whole 'device_data_t' to the uemis downloader
Not only does it make it look more like the libdivecomputer downloaders, but the uemis downloader needs it in order to support all the flags we have. Notably "download into private trip". Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--libdivecomputer.h2
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp2
-rw-r--r--uemis-downloader.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/libdivecomputer.h b/libdivecomputer.h
index f277e298f..af51854a0 100644
--- a/libdivecomputer.h
+++ b/libdivecomputer.h
@@ -33,7 +33,7 @@ typedef struct device_data_t
} device_data_t;
const char *do_libdivecomputer_import(device_data_t *data);
-const char *do_uemis_import(const char *mountpath, short force_download);
+const char *do_uemis_import(device_data_t *data);
extern int import_thread_cancelled;
extern const char *progress_bar_text;
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index fe5d4ee9a..112d10586 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -477,7 +477,7 @@ void DownloadThread::run()
const char *errorText;
import_thread_cancelled = false;
if (!strcmp(data->vendor, "Uemis"))
- errorText = do_uemis_import(data->devname, data->force_download);
+ errorText = do_uemis_import(data);
else
errorText = do_libdivecomputer_import(data);
if (errorText)
diff --git a/uemis-downloader.c b/uemis-downloader.c
index 608d3c6ea..4e0545193 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -824,8 +824,10 @@ static char *uemis_get_divenr(char *deviceidstr)
return strdup(divenr);
}
-const char *do_uemis_import(const char *mountpath, short force_download)
+const char *do_uemis_import(device_data_t *data)
{
+ const char *mountpath = data->devname;
+ short force_download = data->force_download;
char *newmax = NULL;
int start, end = -2, i, offset;
uint32_t deviceidnr;