Debian Codegraph @

extra/libfido2/libfido2-1.15.0/man/fido_dev_get_touch_begin.3

raw
1 .\" Copyright (c) 2020 Yubico AB. All rights reserved.
2 .\"
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions are
5 .\" met:
6 .\"
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in
11 .\" the documentation and/or other materials provided with the
12 .\" distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18 .\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20 .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 .\"
26 .\" SPDX-License-Identifier: BSD-2-Clause
27 .\"
28 .Dd $Mdocdate: August 5 2020 $
29 .Dt FIDO_DEV_GET_TOUCH_BEGIN 3
30 .Os
31 .Sh NAME
32 .Nm fido_dev_get_touch_begin ,
33 .Nm fido_dev_get_touch_status
34 .Nd asynchronously wait for touch on a FIDO2 authenticator
35 .Sh SYNOPSIS
36 .In fido.h
37 .Ft int
38 .Fn fido_dev_get_touch_begin "fido_dev_t *dev"
39 .Ft int
40 .Fn fido_dev_get_touch_status "fido_dev_t *dev" "int *touched" "int ms"
41 .Sh DESCRIPTION
42 The functions described in this page allow an application to
43 asynchronously wait for touch on a FIDO2 authenticator.
44 This is useful when multiple authenticators are present and
45 the application needs to know which one to use.
46 .Pp
47 The
48 .Fn fido_dev_get_touch_begin
49 function initiates a touch request on
50 .Fa dev .
51 .Pp
52 The
53 .Fn fido_dev_get_touch_status
54 function continues an ongoing touch request on
55 .Fa dev ,
56 blocking up to
57 .Fa ms
58 milliseconds.
59 On success,
60 .Fa touched
61 will be updated to reflect the touch request status.
62 If
63 .Fa touched
64 is 1, the device was touched, and the touch request is
65 terminated.
66 If
67 .Fa touched
68 is 0, the application may call
69 .Fn fido_dev_get_touch_status
70 to continue the touch request, or
71 .Fn fido_dev_cancel
72 to terminate it.
73 .Sh RETURN VALUES
74 The error codes returned by
75 .Fn fido_dev_get_touch_begin
76 and
77 .Fn fido_dev_get_touch_status
78 are defined in
79 .In fido/err.h .
80 On success,
81 .Dv FIDO_OK
82 is returned.
83 .Sh EXAMPLES
84 Please refer to
85 .Em examples/select.c
86 in
87 .Em libfido2's
88 source tree.
89 .Sh SEE ALSO
90 .Xr fido_dev_cancel 3
91 .Sh CAVEATS
92 The
93 .Fn fido_dev_get_touch_status
94 function will cause a command to be transmitted to U2F
95 authenticators.
96 These transmissions should not exceed a frequency of 5Hz.