diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cli-downloader.cpp | 2 | ||||
-rw-r--r-- | core/downloadfromdcthread.h | 2 | ||||
-rw-r--r-- | core/subsurfacestartup.c | 7 |
3 files changed, 10 insertions, 1 deletions
diff --git a/core/cli-downloader.cpp b/core/cli-downloader.cpp index b4a8854aa..4f672eda7 100644 --- a/core/cli-downloader.cpp +++ b/core/cli-downloader.cpp @@ -4,7 +4,7 @@ #include <QObject> #include <QUndoStack> -extern "C" + void cliDownloader(const char *vendor, const char *product, const char *device) { DiveImportedModel *diveImportedModel = new DiveImportedModel(); diff --git a/core/downloadfromdcthread.h b/core/downloadfromdcthread.h index 8f11fb7cc..448271211 100644 --- a/core/downloadfromdcthread.h +++ b/core/downloadfromdcthread.h @@ -98,7 +98,9 @@ struct mydescriptor { * stay like this for now. */ void fill_computer_list(); +extern "C" { void show_computer_list(); +} extern QStringList vendorList; extern QHash<QString, QStringList> productList; extern QMap<QString, dc_descriptor_t *> descriptorLookup; diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c index 0b8385616..25fd03352 100644 --- a/core/subsurfacestartup.c +++ b/core/subsurfacestartup.c @@ -10,6 +10,8 @@ #include "git-access.h" #include "libdivecomputer/version.h" +extern void show_computer_list(); + struct preferences prefs, git_prefs; struct preferences default_prefs = { .cloud_base_url = "https://cloud.subsurface-divelog.org/", @@ -152,6 +154,7 @@ void print_files() const char *filename, *local_git; printf("\nFile locations:\n\n"); + printf("Cloud email:%s\n", prefs.cloud_storage_email); if (!empty_string(prefs.cloud_storage_email) && !empty_string(prefs.cloud_storage_password)) { filename = cloud_url(); @@ -265,6 +268,10 @@ void parse_argument(const char *arg) prefs.dive_computer.device = strdup(arg + sizeof("--device=") - 1); return; } + if (strncmp(arg, "--list-dc", sizeof("--list-dc") - 1) == 0) { + show_computer_list(); + return; + } #elif SUBSURFACE_MOBILE_DESKTOP if (strncmp(arg, "--testqml=", sizeof("--testqml=") - 1) == 0) { testqml = malloc(strlen(arg) - sizeof("--testqml=") + 1); |