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 // Interface for obeserving biod signals. | |
blundell
2017/02/23 14:10:41
It's a little strange that we're putting a ChromeO
| |
8 interface BiodObserver{ | |
9 // Called when biometics device powers up or is restarted. | |
10 OnRestarted(); | |
11 | |
12 // Called whenever a user attempts a scan. |scan_result| tells whether the | |
13 // scan was succesful. |is_complete| tells whether enrollment is complete | |
14 // and now over. | |
15 OnScanned(uint32 scan_result, bool is_complete); | |
16 | |
17 // Called to indicate a bad scan of any kind, or a succesful scan. If scan | |
18 // is successful, |recognized_user_ids| will equal all the enrollment IDs | |
19 // that match the scan. | |
20 OnAttempt(uint32 scan_result, array<string> recognized_user_ids); | |
21 | |
22 // Called during either mode to indicate a failure. Any enrollment that was | |
23 // underway is thrown away and authentication will no longer be happening. | |
24 OnFailure(); | |
25 }; | |
26 | |
27 // Interface for communicating with biod through dbus. | |
28 interface Fingerprint { | |
29 // Gets all the enrollments registered with this biometric. | |
30 GetFingerprintsList() => (array<string> enrollments); | |
31 | |
32 // Starts the biometric enrollment. | |
33 StartEnroll(string user_id, string label); | |
34 | |
35 // Ends the current enroll. | |
36 CancelCurrentEnroll(); | |
37 | |
38 // Gets label of the enrollment. | |
39 GetLabel(int32 index) => (string label); | |
40 | |
41 // Changes the label of the enrollment to |label|. | |
42 SetLabel(string label, int32 index); | |
43 | |
44 // Removes the enrollment. This enrollment will no longer | |
45 // be able to used for authentication. | |
46 RemoveEnrollment(int32 index); | |
47 | |
48 // Starts the biometric authentication. | |
49 StartAuthentication(); | |
50 | |
51 // Ends the current autentication. | |
52 EndCurrentAuthentication(); | |
53 | |
54 // Irreversibly destroys all enrollments registered with this biometric. | |
55 DestroyAllEnrollments(); | |
56 | |
57 // Adds biod observers and notifies them when receiving signals. | |
58 AddBiodObserver(BiodObserver observer); | |
59 }; | |
60 | |
OLD | NEW |