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>
This commit is contained in:
Linus Torvalds 2014-10-12 06:57:32 -04:00 committed by Dirk Hohndel
parent 9882bf5ff8
commit a7e1e7fee1
3 changed files with 5 additions and 3 deletions

View file

@ -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;

View file

@ -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)

View file

@ -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;