Chromium Code Reviews| Index: services/device/public/interfaces/fingerprint.mojom |
| diff --git a/services/device/public/interfaces/fingerprint.mojom b/services/device/public/interfaces/fingerprint.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..87e3dbad806a74dda3b27ec9463d1c128c228c64 |
| --- /dev/null |
| +++ b/services/device/public/interfaces/fingerprint.mojom |
| @@ -0,0 +1,60 @@ |
| +// 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; |
| + |
| +// Interface for obeserving biod signals. |
| +interface BiodObserver{ |
| + // 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 enrollment is complete |
| + // and now over. |
| + OnScanned(uint32 scan_result, bool is_complete); |
| + |
| + // Called to indicate a bad scan of any kind, or a succesful scan. If scan |
| + // is successful, |recognized_user_ids| will equal all the enrollment IDs |
| + // that match the scan. |
| + OnAttempt(uint32 scan_result, array<string> recognized_user_ids); |
|
Rahul Chaturvedi
2017/02/06 21:31:57
Please sync up with Zach to match this with the ch
xiaoyinh(OOO Sep 11-29)
2017/02/22 00:04:50
Thanks, I will incorporate the API change once tha
|
| + |
| + // Called during either mode to indicate a failure. Any enrollment that was |
| + // underway is thrown away and authentication will no longer be happening. |
| + OnFailure(); |
| +}; |
| + |
| +// Interface for communicating with biod through dbus. |
| +interface Fingerprint { |
| + // Gets all the enrollments registered with this biometric. |
| + GetFingerprintsList() => (array<string> enrollments); |
| + |
| + // Starts the biometric enrollment. |
| + StartEnroll(string user_id, string label); |
| + |
| + // Ends the current enroll. |
| + CancelCurrentEnroll(); |
| + |
| + // Gets label of the enrollment. |
| + GetLabel(int32 index) => (string label); |
| + |
| + // Changes the label of the enrollment to |label|. |
| + SetLabel(string label, int32 index); |
| + |
| + // Removes the enrollment. This enrollment will no longer |
| + // be able to used for authentication. |
| + RemoveEnrollment(int32 index); |
| + |
| + // Starts the biometric authentication. |
| + StartAuthentication(); |
| + |
| + // Ends the current autentication. |
| + EndCurrentAuthentication(); |
| + |
| + // Irreversibly destroys all enrollments registered with this biometric. |
| + DestroyAllEnrollments(); |
| + |
| + // Add biod observers and notify them when receiving signals. |
| + AddBiodObserver(BiodObserver observer); |
| +}; |
| + |