OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module device.mojom; | 5 module device.mojom; |
6 | 6 |
7 // This interface is ChromeOS-specific. If it is ever desired | 7 // This interface is ChromeOS-specific. If it is ever desired |
8 // to support a more general fingerprint service across more | 8 // to support a more general fingerprint service across more |
9 // platforms, the interface would need to be generalized. | 9 // platforms, the interface would need to be generalized. |
10 // Interface for obeserving fingerprint daemon signals. | 10 // Interface for obeserving fingerprint daemon signals. |
11 interface FingerprintObserver{ | 11 interface FingerprintObserver{ |
12 // Called when biometics device powers up or is restarted. | 12 // Called when biometics device powers up or is restarted. |
13 OnRestarted(); | 13 OnRestarted(); |
14 | 14 |
15 // Called whenever a user attempts a scan. |scan_result| tells whether the | 15 // Called whenever a user attempts a scan. |scan_result| tells whether the |
16 // scan was succesful. |is_complete| tells whether record is complete | 16 // scan was succesful. |is_complete| tells whether record is complete |
17 // and now over. | 17 // and now over. |
Daniel Erat
2017/05/04 03:07:11
nit: document percent_complete as well (including
xiaoyinh(OOO Sep 11-29)
2017/05/04 17:07:49
Done.
| |
18 OnEnrollScanDone(uint32 scan_result, bool is_complete); | 18 OnEnrollScanDone(uint32 scan_result, |
19 bool is_complete, | |
20 int32 percent_complete); | |
19 | 21 |
20 // Called to indicate a bad scan of any kind, or a succesful scan. If scan | 22 // Called to indicate a bad scan of any kind, or a succesful scan. If scan |
21 // is successful, |matches| is a map of user id keys to a vector of | 23 // is successful, |matches| is a map of user id keys to a vector of |
22 // object path values. | 24 // object path values. |
23 OnAuthScanDone(uint32 scan_result, map<string, array<string>> matches); | 25 OnAuthScanDone(uint32 scan_result, map<string, array<string>> matches); |
24 | 26 |
25 // Called during either mode to indicate a failure. Any EnrollSession record | 27 // Called during either mode to indicate a failure. Any EnrollSession record |
26 // that was underway is thrown away and AuthSession will no longer be happenin g. | 28 // that was underway is thrown away and AuthSession will no longer be |
29 // happening. | |
27 OnSessionFailed(); | 30 OnSessionFailed(); |
28 }; | 31 }; |
29 | 32 |
30 // Interface for communicating with fingerprint deamon through dbus. | 33 // Interface for communicating with fingerprint deamon through dbus. |
31 interface Fingerprint { | 34 interface Fingerprint { |
32 // Gets all the records of this user registered with this biometric manager. | 35 // Gets all the records of this user registered with this biometric manager. |
33 // |records| is a map of record path keys to record label values. | 36 // |records| is a map of record path keys to record label values. |
34 GetRecordsForUser(string user_id) => (map<string, string> records); | 37 GetRecordsForUser(string user_id) => (map<string, string> records); |
35 | 38 |
36 // Starts the biometric enroll session. | 39 // Starts the biometric enroll session. |
(...skipping 21 matching lines...) Expand all Loading... | |
58 // Irreversibly destroys all records registered with this biometric manager. | 61 // Irreversibly destroys all records registered with this biometric manager. |
59 DestroyAllRecords() => (bool success); | 62 DestroyAllRecords() => (bool success); |
60 | 63 |
61 // Adds fingerprint observers and notifies them when receiving signals. | 64 // Adds fingerprint observers and notifies them when receiving signals. |
62 AddFingerprintObserver(FingerprintObserver observer); | 65 AddFingerprintObserver(FingerprintObserver observer); |
63 | 66 |
64 // Requests the type of biometric. | 67 // Requests the type of biometric. |
65 RequestType() => (uint32 type); | 68 RequestType() => (uint32 type); |
66 }; | 69 }; |
67 | 70 |
OLD | NEW |