aboutsummaryrefslogtreecommitdiffstats
path: root/core/device.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-21 15:25:18 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-24 09:51:37 -0700
commitfadea413cdb4644b821369b27fad6e5f019d32c2 (patch)
tree4f027306ccb84277cd142d80c3a9e9c684c1521d /core/device.h
parent53118be1f9915584c33aba6e70b31d1720b1a451 (diff)
downloadsubsurface-fadea413cdb4644b821369b27fad6e5f019d32c2.tar.gz
devices: return index from function adding / removing devices
This will be used to keep the model representing the device-list up to date. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/device.h')
-rw-r--r--core/device.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/device.h b/core/device.h
index 9c7fff31c..590609c45 100644
--- a/core/device.h
+++ b/core/device.h
@@ -29,8 +29,8 @@ 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);
+extern int add_to_device_table(struct device_table *table, const struct device *dev); // returns index
+extern int remove_device(struct device_table *table, const struct device *dev); // returns index or -1 if not found
// struct device accessors for C-code. The returned strings are not stable!
const char *device_get_model(const struct device *dev);