summaryrefslogtreecommitdiffstats
path: root/core/device.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-17 14:01:52 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-24 09:51:37 -0700
commit53118be1f9915584c33aba6e70b31d1720b1a451 (patch)
tree9ad039c544bf0dc9c84e619a8fbc0958c2f6e94f /core/device.h
parenta2614665942959b95eef8453730cd3ac66ac42a3 (diff)
downloadsubsurface-53118be1f9915584c33aba6e70b31d1720b1a451.tar.gz
devices: add functions to add / remove / check for devices
To include the device code in the undo system, we need functions to check for the existence of devices and to add or remove them. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/device.h')
-rw-r--r--core/device.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/device.h b/core/device.h
index f3bb1e097..9c7fff31c 100644
--- a/core/device.h
+++ b/core/device.h
@@ -28,6 +28,9 @@ const char *get_dc_nickname(const struct divecomputer *dc);
extern bool device_used_by_selected_dive(const struct device *dev);
extern const struct device *get_device_for_dc(const struct device_table *table, const struct divecomputer *dc);
+extern bool device_exists(const struct device_table *table, const struct device *dev);
+extern void add_to_device_table(struct device_table *table, const struct device *dev);
+extern void remove_device(struct device_table *table, const struct device *dev);
// struct device accessors for C-code. The returned strings are not stable!
const char *device_get_model(const struct device *dev);