mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-25 13:28:46 +03:00
73 lines
2.7 KiB
Plaintext
73 lines
2.7 KiB
Plaintext
// Copyright 2017 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
module device.mojom;
|
|
|
|
// This interface is ChromeOS-specific. If it is ever desired
|
|
// to support a more general fingerprint service across more
|
|
// platforms, the interface would need to be generalized.
|
|
// Interface for obeserving fingerprint daemon signals.
|
|
interface FingerprintObserver{
|
|
// Called when biometics device powers up or is restarted.
|
|
OnRestarted();
|
|
|
|
// Called whenever a user attempts a scan. |scan_result| tells whether the
|
|
// scan was succesful. |is_complete| tells whether record is complete
|
|
// and now over.
|
|
// |percent_complete| within [0, 100] represents the percent of enrollment
|
|
// completion and -1 means unknown percentage.
|
|
OnEnrollScanDone(uint32 scan_result,
|
|
bool is_complete,
|
|
int32 percent_complete);
|
|
|
|
// Called to indicate a bad scan of any kind, or a succesful scan. If scan
|
|
// is successful, |matches| is a map of user id keys to a vector of
|
|
// object path values.
|
|
OnAuthScanDone(uint32 scan_result, map<string, array<string>> matches);
|
|
|
|
// Called during either mode to indicate a failure. Any EnrollSession record
|
|
// that was underway is thrown away and AuthSession will no longer be
|
|
// happening.
|
|
OnSessionFailed();
|
|
};
|
|
|
|
// Interface for communicating with fingerprint deamon through dbus.
|
|
interface Fingerprint {
|
|
// Gets all the records of this user registered with this biometric manager.
|
|
// |records| is a map of record path keys to record label values.
|
|
GetRecordsForUser(string user_id) => (map<string, string> records);
|
|
|
|
// Starts the biometric enroll session.
|
|
StartEnrollSession(string user_id, string label);
|
|
|
|
// Ends the current enroll session.
|
|
CancelCurrentEnrollSession() => (bool success);
|
|
|
|
// Requests the label of the record at |record_path|.
|
|
RequestRecordLabel(string record_path) => (string label);
|
|
|
|
// Changes the label of the record at |record_path| to |new_label|.
|
|
SetRecordLabel(string record_path, string new_label) => (bool success);
|
|
|
|
// Removes the record. This record will no longer
|
|
// be able to used for authentication.
|
|
RemoveRecord(string record_path) => (bool success);
|
|
|
|
// Starts the biometric authentication session.
|
|
StartAuthSession();
|
|
|
|
// Ends the current autentication session.
|
|
EndCurrentAuthSession() => (bool success);
|
|
|
|
// Irreversibly destroys all records registered with this biometric manager.
|
|
DestroyAllRecords() => (bool success);
|
|
|
|
// Adds fingerprint observers and notifies them when receiving signals.
|
|
AddFingerprintObserver(FingerprintObserver observer);
|
|
|
|
// Requests the type of biometric.
|
|
RequestType() => (uint32 type);
|
|
};
|
|
|