aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-downloader-main.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2020-11-15 22:12:21 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-03 13:26:55 -0800
commitb39e77071e79b31996151434970e1baa5249c0a4 (patch)
treead14301d93edcb4598f4a6ef3fd707aa7c88f58e /subsurface-downloader-main.cpp
parent31f0741ecc0013cd361683e7fad9bf2c8c166a13 (diff)
downloadsubsurface-b39e77071e79b31996151434970e1baa5249c0a4.tar.gz
downloader: small improvements
Provide supported dive computer list on the command line and actually call the cli download. Still not functional. Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'subsurface-downloader-main.cpp')
-rw-r--r--subsurface-downloader-main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/subsurface-downloader-main.cpp b/subsurface-downloader-main.cpp
index 2993e5351..6582cf9dc 100644
--- a/subsurface-downloader-main.cpp
+++ b/subsurface-downloader-main.cpp
@@ -17,6 +17,7 @@
static bool filesOnCommandLine = false;
static void messageHandler(QtMsgType type, const QMessageLogContext &ctx, const QString &msg);
+extern void cliDownloader(const char *vendor, const char *product, const char *device);
int main(int argc, char **argv)
{
@@ -51,6 +52,7 @@ int main(int argc, char **argv)
copy_prefs(&default_prefs, &prefs);
// now handle the arguments
+ fill_computer_list();
for (i = 1; i < arguments.length(); i++) {
QString a = arguments.at(i);
if (a.isEmpty())
@@ -66,7 +68,6 @@ int main(int argc, char **argv)
files.push_back(a);
}
}
- fill_computer_list();
parse_xml_init();
taglist_init_global();
@@ -89,6 +90,7 @@ int main(int argc, char **argv)
if (!empty_string(prefs.dive_computer.vendor) && !empty_string(prefs.dive_computer.product) && !empty_string(prefs.dive_computer.device)) {
// download from that dive computer
printf("Downloading dives from %s %s (via %s)\n", prefs.dive_computer.vendor, prefs.dive_computer.product, prefs.dive_computer.device);
+ cliDownloader(prefs.dive_computer.vendor, prefs.dive_computer.product, prefs.dive_computer.device);
}
}
taglist_free(g_tag_list);