| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module device.mojom; | |
| 6 | |
| 7 // This interface is ChromeOS-specific. If it is ever desired | |
| 8 // to support a more general fingerprint service across more | |
| 9 // platforms, the interface would need to be generalized. | |
| 10 // Interface for obeserving fingerprint daemon signals. | |
| 11 interface FingerprintObserver{ | |
| 12 // Called when biometics device powers up or is restarted. | |
| 13 OnRestarted(); | |
| 14 | |
| 15 // Called whenever a user attempts a scan. |scan_result| tells whether the | |
| 16 // scan was succesful. |is_complete| tells whether enrollment is complete | |
| 17 // and now over. | |
| 18 OnScanned(uint32 scan_result, bool is_complete); | |
| 19 | |
| 20 // Called to indicate a bad scan of any kind, or a succesful scan. If scan | |
| 21 // is successful, |recognized_user_ids| will equal all the enrollment IDs | |
| 22 // that match the scan. | |
| 23 OnAttempt(uint32 scan_result, array<string> recognized_user_ids); | |
| 24 | |
| 25 // Called during either mode to indicate a failure. Any enrollment that was | |
| 26 // underway is thrown away and authentication will no longer be happening. | |
| 27 OnFailure(); | |
| 28 }; | |
| 29 | |
| 30 // Interface for communicating with fingerprint deamon through dbus. | |
| 31 interface Fingerprint { | |
| 32 // Gets all the enrollments registered with this biometric. | |
| 33 GetFingerprintsList() => (array<string> enrollments); | |
| 34 | |
| 35 // Starts the biometric enrollment. | |
| 36 StartEnroll(string user_id, string label); | |
| 37 | |
| 38 // Ends the current enroll. | |
| 39 CancelCurrentEnroll(); | |
| 40 | |
| 41 // Gets label of the enrollment. | |
| 42 GetLabel(int32 index) => (string label); | |
| 43 | |
| 44 // Changes the label of the enrollment to |label|. | |
| 45 SetLabel(string label, int32 index); | |
| 46 | |
| 47 // Removes the enrollment. This enrollment will no longer | |
| 48 // be able to used for authentication. | |
| 49 RemoveEnrollment(int32 index); | |
| 50 | |
| 51 // Starts the biometric authentication. | |
| 52 StartAuthentication(); | |
| 53 | |
| 54 // Ends the current autentication. | |
| 55 EndCurrentAuthentication(); | |
| 56 | |
| 57 // Irreversibly destroys all enrollments registered with this biometric. | |
| 58 DestroyAllEnrollments(); | |
| 59 | |
| 60 // Adds fingerprint observers and notifies them when receiving signals. | |
| 61 AddFingerprintObserver(FingerprintObserver observer); | |
| 62 }; | |
| 63 | |
| OLD | NEW |