Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(647)

Unified Diff: services/device/public/interfaces/fingerprint.mojom

Issue 2664353002: Host fingerprint mojo service within the device service. (Closed)
Patch Set: rebase and trybot Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
blundell 2017/02/22 15:20:06 Could you add an OWNERS file in this directory and
xiaoyinh(OOO Sep 11-29) 2017/02/22 21:03:17 This directory already have a OWNER file that link
+
+// Interface for obeserving biod signals.
blundell 2017/02/22 15:20:09 hmm, is biod ChromeOS-specific? Seems a little str
xiaoyinh(OOO Sep 11-29) 2017/02/22 21:03:17 Yes, biod is chromeos-specific, and fingerprint in
+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);
+
+ // 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.
blundell 2017/02/22 15:20:08 nit: Adds ... and notifies
xiaoyinh(OOO Sep 11-29) 2017/02/22 21:03:17 Done.
+ AddBiodObserver(BiodObserver observer);
+};
+

Powered by Google App Engine
This is Rietveld 408576698