mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
52050fdc92
We used to save dive computer information only if that dive computer was actually used in any of the dives we saved. But we can simplify the code if we just always save any dive computers we know about. And it does allow for some usage cases where you have nicknames for other peoples computers that you may not actively use, but you want to see if you end up loading multiple XML files in one go. So there's just no compelling reason to not just save all the info we have. And this will make it less painful to remove the "use system config for dive computer nicknames", because you can also use this to continue to gather dive computer info in a separate XML file if you want to. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
20 lines
619 B
C
20 lines
619 B
C
#ifndef DEVICE_INFO_H
|
|
#define DEVICE_INFO_H
|
|
|
|
struct device_info {
|
|
const char *model;
|
|
uint32_t deviceid;
|
|
|
|
const char *serial_nr;
|
|
const char *firmware;
|
|
const char *nickname;
|
|
struct device_info *next;
|
|
};
|
|
|
|
extern struct device_info *get_device_info(const char *model, uint32_t deviceid);
|
|
extern struct device_info *get_different_device_info(const char *model, uint32_t deviceid);
|
|
extern struct device_info *create_device_info(const char *model, uint32_t deviceid);
|
|
extern struct device_info *remove_device_info(const char *model, uint32_t deviceid);
|
|
extern struct device_info *head_of_device_info_list(void);
|
|
|
|
#endif
|