mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
a261466594
commit
53118be1f9
3 changed files with 26 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue