File: constants.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (60 lines) | stat: -rw-r--r-- 2,670 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package biod;

option go_package = "go.chromium.org/chromiumos/system_api/biod_messages_proto";

// Included in FingerprintMessage.
// Android codes end at 1000. Everything above is intended to be used for
// returning vendor specific codes. Chrome OS specific codes start from
// 10000.
enum FingerprintError {
  // Android API:
  // https://cs.android.com/android/platform/superproject/+/master:hardware/libhardware/include/hardware/fingerprint.h;l=48;drc=1ae7379baab4b2941ad1701190718cf53a051b48
  ERROR_HW_UNAVAILABLE =
      1;  // The hardware has an error that can't be resolved.
  ERROR_UNABLE_TO_PROCESS = 2;  // Bad data; operation can't continue.
  ERROR_TIMEOUT = 3;   // The operation has timed out waiting for user input.
  ERROR_NO_SPACE = 4;  // No space available to store a template.
  ERROR_CANCELED = 5;  // The current operation can't proceed.
  ERROR_UNABLE_TO_REMOVE = 6;  // Fingerprint with given id can't be removed.
  ERROR_LOCKOUT =
      7;  // Fingerprint hardware is locked due to too many attempts.

  // Chrome OS specific error codes.
  ERROR_NO_TEMPLATES = 10000;  // Fingerprint hardware contains no templates.
}

// Included in biod's EnrollScanDone signal and FingerprintMessage.
// Android codes end at 1000. Everything above is intended to be used for
// returning vendor specific codes. Chrome OS specific codes start from
// 10000.
enum ScanResult {
  // Android API:
  // https://cs.android.com/android/platform/superproject/+/master:hardware/libhardware/include/hardware/fingerprint.h;l=67;drc=1ae7379baab4b2941ad1701190718cf53a051b48
  SCAN_RESULT_SUCCESS = 0;
  SCAN_RESULT_PARTIAL = 1;       // Sensor needs more data.
  SCAN_RESULT_INSUFFICIENT = 2;  // Image doesn't contain enough details.
  SCAN_RESULT_SENSOR_DIRTY = 3;  // Sensor needs to be cleaned.
  SCAN_RESULT_TOO_SLOW = 4;  // Not enough data collected (swipe type sensor).
  SCAN_RESULT_TOO_FAST = 5;  // User removed finger too fast.
  SCAN_RESULT_IMMOBILE = 6;  // User didn't move finger during enrollment.

  // Chrome OS specific error codes.
  SCAN_RESULT_NO_MATCH = 10000;  // Scan was success, but no template matched.
  // Power button event seen along with match. Treat as an error to prevent
  // accidental unlock.
  SCAN_RESULT_POWER_BUTTON_PRESSED = 10001;
}

// Included in biod's BiometricsManagerStatusChanged.
enum BiometricsManagerStatus {
  INITIALIZED = 1;
  // In the future, other values such as ERROR and UNINITIALIZED may be added.
}