71 lines
2.2 KiB
Groff
71 lines
2.2 KiB
Groff
.\"
|
|
.\" libdivecomputer
|
|
.\"
|
|
.\" Copyright (C) 2017 Kristaps Dzonsons <kristaps@bsd.lv>
|
|
.\"
|
|
.\" This library is free software; you can redistribute it and/or
|
|
.\" modify it under the terms of the GNU Lesser General Public
|
|
.\" License as published by the Free Software Foundation; either
|
|
.\" version 2.1 of the License, or (at your option) any later version.
|
|
.\"
|
|
.\" This library is distributed in the hope that it will be useful,
|
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
.\" Lesser General Public License for more details.
|
|
.\"
|
|
.\" You should have received a copy of the GNU Lesser General Public
|
|
.\" License along with this library; if not, write to the Free Software
|
|
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
.\" MA 02110-1301 USA
|
|
.\"
|
|
.Dd January 5, 2017
|
|
.Dt DC_DEVICE_SET_FINGERPRINT 3
|
|
.Os
|
|
.Sh NAME
|
|
.Nm dc_device_set_fingerprint
|
|
.Nd set the last-seen dive fingerprint
|
|
.Sh LIBRARY
|
|
.Lb libdivecomputer
|
|
.Sh SYNOPSIS
|
|
.In libdivecomputer/device.h
|
|
.Ft dc_status_t
|
|
.Fo dc_device_set_fingerprint
|
|
.Fa "dc_device_t *device"
|
|
.Fa "const unsigned char data[]"
|
|
.Fa "unsigned int size"
|
|
.Fc
|
|
.Sh DESCRIPTION
|
|
Sets the last-seen dive fingerprint on a device opened with
|
|
.Xr dc_device_open 3 .
|
|
This mechanism is used to only download dives
|
|
.Dq newer
|
|
.Po
|
|
as reported by the dive computer, not necessarily on the calendar
|
|
.Pc
|
|
than the last seen dive.
|
|
.Pp
|
|
In general usage, the fingerprint is acquired (and saved) from the first
|
|
dive downloaded from a dive computer by
|
|
.Xr dc_device_foreach 3 .
|
|
In subsequent openings of the device, the fingerprint is set with
|
|
.Nm
|
|
and, when a dive reports a fingerprint matching that dive, the download
|
|
exits before reporting that dive.
|
|
.Pq The first fingerprint is saved again for subsequent invocations.
|
|
In this way, only the newest dives are reported.
|
|
.Sh RETURN VALUES
|
|
This returns
|
|
.Dv DC_STATUS_SUCCESS
|
|
if the fingerprint was set or one of several error values on error.
|
|
.Sh SEE ALSO
|
|
.Xr dc_device_open 3
|
|
.Sh AUTHORS
|
|
The
|
|
.Lb libdivecomputer
|
|
library was written by
|
|
.An Jef Driesen ,
|
|
.Mt jef@libdivecomputer.org .
|
|
The manpages were written by
|
|
.An Kristaps Dzonsons ,
|
|
.Mt kristaps@bsd.lv .
|