10afa8e06SEd Maste.\" Copyright (c) 2020 Yubico AB. All rights reserved. 2*2ccfa855SEd Maste.\" 3*2ccfa855SEd Maste.\" Redistribution and use in source and binary forms, with or without 4*2ccfa855SEd Maste.\" modification, are permitted provided that the following conditions are 5*2ccfa855SEd Maste.\" met: 6*2ccfa855SEd Maste.\" 7*2ccfa855SEd Maste.\" 1. Redistributions of source code must retain the above copyright 8*2ccfa855SEd Maste.\" notice, this list of conditions and the following disclaimer. 9*2ccfa855SEd Maste.\" 2. Redistributions in binary form must reproduce the above copyright 10*2ccfa855SEd Maste.\" notice, this list of conditions and the following disclaimer in 11*2ccfa855SEd Maste.\" the documentation and/or other materials provided with the 12*2ccfa855SEd Maste.\" distribution. 13*2ccfa855SEd Maste.\" 14*2ccfa855SEd Maste.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15*2ccfa855SEd Maste.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16*2ccfa855SEd Maste.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17*2ccfa855SEd Maste.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18*2ccfa855SEd Maste.\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19*2ccfa855SEd Maste.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20*2ccfa855SEd Maste.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21*2ccfa855SEd Maste.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22*2ccfa855SEd Maste.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23*2ccfa855SEd Maste.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24*2ccfa855SEd Maste.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*2ccfa855SEd Maste.\" 26*2ccfa855SEd Maste.\" SPDX-License-Identifier: BSD-2-Clause 270afa8e06SEd Maste.\" 280afa8e06SEd Maste.Dd $Mdocdate: August 5 2020 $ 290afa8e06SEd Maste.Dt FIDO_DEV_GET_TOUCH_BEGIN 3 300afa8e06SEd Maste.Os 310afa8e06SEd Maste.Sh NAME 320afa8e06SEd Maste.Nm fido_dev_get_touch_begin , 330afa8e06SEd Maste.Nm fido_dev_get_touch_status 340afa8e06SEd Maste.Nd asynchronously wait for touch on a FIDO2 authenticator 350afa8e06SEd Maste.Sh SYNOPSIS 360afa8e06SEd Maste.In fido.h 370afa8e06SEd Maste.Ft int 380afa8e06SEd Maste.Fn fido_dev_get_touch_begin "fido_dev_t *dev" 390afa8e06SEd Maste.Ft int 400afa8e06SEd Maste.Fn fido_dev_get_touch_status "fido_dev_t *dev" "int *touched" "int ms" 410afa8e06SEd Maste.Sh DESCRIPTION 420afa8e06SEd MasteThe functions described in this page allow an application to 433e696dfbSEd Masteasynchronously wait for touch on a FIDO2 authenticator. 440afa8e06SEd MasteThis is useful when multiple authenticators are present and 450afa8e06SEd Mastethe application needs to know which one to use. 460afa8e06SEd Maste.Pp 470afa8e06SEd MasteThe 480afa8e06SEd Maste.Fn fido_dev_get_touch_begin 490afa8e06SEd Mastefunction initiates a touch request on 500afa8e06SEd Maste.Fa dev . 510afa8e06SEd Maste.Pp 520afa8e06SEd MasteThe 530afa8e06SEd Maste.Fn fido_dev_get_touch_status 540afa8e06SEd Mastefunction continues an ongoing touch request on 550afa8e06SEd Maste.Fa dev , 560afa8e06SEd Masteblocking up to 570afa8e06SEd Maste.Fa ms 580afa8e06SEd Mastemilliseconds. 590afa8e06SEd MasteOn success, 600afa8e06SEd Maste.Fa touched 610afa8e06SEd Mastewill be updated to reflect the touch request status. 620afa8e06SEd MasteIf 630afa8e06SEd Maste.Fa touched 640afa8e06SEd Masteis 1, the device was touched, and the touch request is 650afa8e06SEd Masteterminated. 660afa8e06SEd MasteIf 670afa8e06SEd Maste.Fa touched 680afa8e06SEd Masteis 0, the application may call 690afa8e06SEd Maste.Fn fido_dev_get_touch_status 700afa8e06SEd Masteto continue the touch request, or 710afa8e06SEd Maste.Fn fido_dev_cancel 720afa8e06SEd Masteto terminate it. 730afa8e06SEd Maste.Sh RETURN VALUES 740afa8e06SEd MasteThe error codes returned by 750afa8e06SEd Maste.Fn fido_dev_get_touch_begin 760afa8e06SEd Masteand 770afa8e06SEd Maste.Fn fido_dev_get_touch_status 780afa8e06SEd Masteare defined in 790afa8e06SEd Maste.In fido/err.h . 800afa8e06SEd MasteOn success, 810afa8e06SEd Maste.Dv FIDO_OK 820afa8e06SEd Masteis returned. 830afa8e06SEd Maste.Sh EXAMPLES 840afa8e06SEd MastePlease refer to 850afa8e06SEd Maste.Em examples/select.c 860afa8e06SEd Mastein 870afa8e06SEd Maste.Em libfido2's 880afa8e06SEd Mastesource tree. 890afa8e06SEd Maste.Sh SEE ALSO 900afa8e06SEd Maste.Xr fido_dev_cancel 3 910afa8e06SEd Maste.Sh CAVEATS 920afa8e06SEd MasteThe 930afa8e06SEd Maste.Fn fido_dev_get_touch_status 940afa8e06SEd Mastefunction will cause a command to be transmitted to U2F 950afa8e06SEd Masteauthenticators. 960afa8e06SEd MasteThese transmissions should not exceed a frequency of 5Hz. 97