#include "device/fido/bio/enrollment_handler.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "components/device_event_log/device_event_log.h"
#include "device/fido/bio/enrollment.h"
#include "device/fido/fido_authenticator.h"
#include "device/fido/fido_constants.h"
#include "device/fido/pin.h"
namespace device {
BioEnrollmentHandler::SensorInfo::SensorInfo() = default;
BioEnrollmentHandler::SensorInfo::SensorInfo(SensorInfo&&) = default;
BioEnrollmentHandler::SensorInfo& BioEnrollmentHandler::SensorInfo::operator=(
SensorInfo&&) = default;
BioEnrollmentHandler::BioEnrollmentHandler(
const base::flat_set<FidoTransportProtocol>& supported_transports,
ReadyCallback ready_callback,
ErrorCallback error_callback,
GetPINCallback get_pin_callback,
FidoDiscoveryFactory* factory)
: … { … }
BioEnrollmentHandler::~BioEnrollmentHandler() { … }
void BioEnrollmentHandler::EnrollTemplate(
SampleCallback sample_callback,
EnrollmentCallback enrollment_callback) { … }
void BioEnrollmentHandler::CancelEnrollment() { … }
void BioEnrollmentHandler::EnumerateTemplates(EnumerationCallback callback) { … }
void BioEnrollmentHandler::RenameTemplate(std::vector<uint8_t> template_id,
std::string name,
StatusCallback callback) { … }
void BioEnrollmentHandler::DeleteTemplate(std::vector<uint8_t> template_id,
StatusCallback callback) { … }
void BioEnrollmentHandler::DispatchRequest(FidoAuthenticator* authenticator) { … }
void BioEnrollmentHandler::AuthenticatorRemoved(
FidoDiscoveryBase* discovery,
FidoAuthenticator* authenticator) { … }
void BioEnrollmentHandler::OnSampleCollected(BioEnrollmentSampleStatus status,
int samples_remaining) { … }
void BioEnrollmentHandler::OnEnrollmentDone(
std::optional<std::vector<uint8_t>> template_id) { … }
void BioEnrollmentHandler::OnEnrollmentError(CtapDeviceResponseCode status) { … }
void BioEnrollmentHandler::OnTouch(FidoAuthenticator* authenticator) { … }
void BioEnrollmentHandler::OnRetriesResponse(
CtapDeviceResponseCode status,
std::optional<pin::RetriesResponse> response) { … }
void BioEnrollmentHandler::OnHavePIN(std::string pin) { … }
void BioEnrollmentHandler::OnHavePINToken(
CtapDeviceResponseCode status,
std::optional<pin::TokenResponse> response) { … }
void BioEnrollmentHandler::OnGetSensorInfo(
CtapDeviceResponseCode status,
std::optional<BioEnrollmentResponse> response) { … }
void BioEnrollmentHandler::OnEnumerateTemplates(
EnumerationCallback callback,
CtapDeviceResponseCode status,
std::optional<BioEnrollmentResponse> response) { … }
void BioEnrollmentHandler::OnRenameTemplate(
StatusCallback callback,
CtapDeviceResponseCode status,
std::optional<BioEnrollmentResponse> response) { … }
void BioEnrollmentHandler::OnDeleteTemplate(
StatusCallback callback,
CtapDeviceResponseCode status,
std::optional<BioEnrollmentResponse> response) { … }
void BioEnrollmentHandler::RunErrorCallback(Error error) { … }
}