mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
17526ded58
It makes no sense to keep the device nodes if all the other data is cleared. Let's do this automatically and not explicitly. This ensures that the function is also called on mobile. Currently it was only called on desktop. Weirdly, the parser-tests were expecting that the device nodes were not reset by clear_dive_file_data() and therefore divecomputers were accumulating in the test results. Thus, the additional computers had to be removed from the expected test results. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
23 lines
655 B
C
23 lines
655 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef DEVICE_H
|
|
#define DEVICE_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct divecomputer;
|
|
extern void fake_dc(struct divecomputer *dc);
|
|
extern void set_dc_deviceid(struct divecomputer *dc, unsigned int deviceid);
|
|
extern void create_device_node(const char *model, uint32_t deviceid, const char *serial, const char *firmware, const char *nickname);
|
|
extern void call_for_each_dc(void *f, void (*callback)(void *, const char *, uint32_t,
|
|
const char *, const char *, const char *), bool select_only);
|
|
extern void clear_device_nodes();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // DEVICE_H
|