1DC_DEVICE_SET_FINGERP... BSD Library Functions Manual DC_DEVICE_SET_FINGERP...
2

NAME

4     dc_device_set_fingerprint — set the last-seen dive fingerprint
5

LIBRARY

7     library “libdivecomputer”
8

SYNOPSIS

10     #include <libdivecomputer/device.h>
11
12     dc_status_t
13     dc_device_set_fingerprint(dc_device_t *device,
14         const unsigned char data[], unsigned int size);
15

DESCRIPTION

17     Sets the last-seen dive fingerprint on a device opened with
18     dc_device_open(3).  This mechanism is used to only download dives “newer”
19     (as reported by the dive computer, not necessarily on the calendar) than
20     the last seen dive.
21
22     In general usage, the fingerprint is acquired (and saved) from the first
23     dive downloaded from a dive computer by dc_device_foreach(3).  In subse‐
24     quent openings of the device, the fingerprint is set with
25     dc_device_set_fingerprint and, when a dive reports a fingerprint matching
26     that dive, the download exits before reporting that dive.  (The first
27     fingerprint is saved again for subsequent invocations.) In this way, only
28     the newest dives are reported.
29

RETURN VALUES

31     This returns DC_STATUS_SUCCESS if the fingerprint was set or one of sev‐
32     eral error values on error.
33

SEE ALSO

35     dc_device_open(3)
36

AUTHORS

38     The library “libdivecomputer” library was written by Jef Driesen,
39     jef@libdivecomputer.org.  The manpages were written by
40     Kristaps Dzonsons, kristaps@bsd.lv.
41
42BSD                             January 5, 2017                            BSD
Impressum