summaryrefslogtreecommitdiffstats
path: root/core/divelist.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-17 16:07:39 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-24 09:51:37 -0700
commit39a4090c0a6e1d8fe12516be06ee7b31dd4bc96d (patch)
tree7587930b64bf95ec3a652cf761e6ded573931364 /core/divelist.h
parentfadea413cdb4644b821369b27fad6e5f019d32c2 (diff)
downloadsubsurface-39a4090c0a6e1d8fe12516be06ee7b31dd4bc96d.tar.gz
devices: add devices in Command::importTable()
Add a device_table parameters to Command::importTable() and add_imported_dives(). The content of this table will be added to the global device list (respectively removed on undo). This is currently a no-op, as the parser doesn't yet fill out the device table, but adds devices directly to the global device table. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/divelist.h')
-rw-r--r--core/divelist.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/divelist.h b/core/divelist.h
index cee52f9c4..1042c88cc 100644
--- a/core/divelist.h
+++ b/core/divelist.h
@@ -11,6 +11,7 @@ extern "C" {
struct dive;
struct trip_table;
struct dive_site_table;
+struct device_table;
struct deco_state;
extern int shown_dives;
@@ -36,12 +37,15 @@ extern void process_loaded_dives();
#define IMPORT_IS_DOWNLOADED (1 << 1)
#define IMPORT_MERGE_ALL_TRIPS (1 << 2)
#define IMPORT_ADD_TO_NEW_TRIP (1 << 3)
-extern void add_imported_dives(struct dive_table *import_table, struct trip_table *import_trip_table, struct dive_site_table *import_sites_table,
+extern void add_imported_dives(struct dive_table *import_table, struct trip_table *import_trip_table,
+ struct dive_site_table *import_sites_table, struct device_table *devices_to_add,
int flags);
-extern void process_imported_dives(struct dive_table *import_table, struct trip_table *import_trip_table, struct dive_site_table *import_sites_table,
+extern void process_imported_dives(struct dive_table *import_table, struct trip_table *import_trip_table,
+ struct dive_site_table *import_sites_table, struct device_table *import_devices_table,
int flags,
struct dive_table *dives_to_add, struct dive_table *dives_to_remove,
- struct trip_table *trips_to_add, struct dive_site_table *sites_to_add);
+ struct trip_table *trips_to_add, struct dive_site_table *sites_to_add,
+ struct device_table *devices_to_add);
extern char *get_dive_gas_string(const struct dive *dive);
extern int dive_table_get_insertion_index(struct dive_table *table, struct dive *dive);