aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbus/biod/constants.proto21
-rw-r--r--dbus/biod/dbus-constants.h52
-rw-r--r--dbus/biod/messages.proto18
-rw-r--r--dbus/service_constants.h51
-rw-r--r--system_api.gyp25
-rw-r--r--system_api.pc2
6 files changed, 118 insertions, 51 deletions
diff --git a/dbus/biod/constants.proto b/dbus/biod/constants.proto
new file mode 100644
index 0000000..d7266c0
--- /dev/null
+++ b/dbus/biod/constants.proto
@@ -0,0 +1,21 @@
+// 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.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+
+package biod;
+
+// Included in biod's EnrollScanDone signal.
+enum ScanResult {
+ SCAN_RESULT_SUCCESS = 0;
+ SCAN_RESULT_PARTIAL = 1;
+ SCAN_RESULT_INSUFFICIENT = 2;
+ SCAN_RESULT_SENSOR_DIRTY = 3;
+ SCAN_RESULT_TOO_SLOW = 4;
+ SCAN_RESULT_TOO_FAST = 5;
+ SCAN_RESULT_IMMOBILE = 6;
+ SCAN_RESULT_MAX = 7;
+}
diff --git a/dbus/biod/dbus-constants.h b/dbus/biod/dbus-constants.h
new file mode 100644
index 0000000..f74a447
--- /dev/null
+++ b/dbus/biod/dbus-constants.h
@@ -0,0 +1,52 @@
+// Copyright 2017 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYSTEM_API_DBUS_BIOD_DBUS_CONSTANTS_H_
+#define SYSTEM_API_DBUS_BIOD_DBUS_CONSTANTS_H_
+
+namespace biod {
+const char kBiodServicePath[] = "/org/chromium/BiometricsDaemon";
+const char kBiodServiceName[] = "org.chromium.BiometricsDaemon";
+
+// Interfaces for objects exported by biod
+const char kBiometricsManagerInterface[] =
+ "org.chromium.BiometricsDaemon.BiometricsManager";
+const char kAuthSessionInterface[] =
+ "org.chromium.BiometricsDaemon.AuthSession";
+const char kEnrollSessionInterface[] =
+ "org.chromium.BiometricsDaemon.EnrollSession";
+const char kRecordInterface[] = "org.chromium.BiometricsDaemon.Record";
+
+// List of all BiometricsManagers
+const char kFakeBiometricsManagerName[] = "FakeBiometricsManager";
+const char kFpcBiometricsManagerName[] = "FpcBiometricsManager";
+
+// Methods
+const char kBiometricsManagerStartEnrollSessionMethod[] = "StartEnrollSession";
+const char kBiometricsManagerGetRecordsForUserMethod[] = "GetRecordsForUser";
+const char kBiometricsManagerDestroyAllRecordsMethod[] = "DestroyAllRecords";
+const char kBiometricsManagerStartAuthSessionMethod[] = "StartAuthSession";
+const char kAuthSessionEndMethod[] = "End";
+const char kEnrollSessionCancelMethod[] = "Cancel";
+const char kRecordRemoveMethod[] = "Remove";
+const char kRecordSetLabelMethod[] = "SetLabel";
+
+// Signals
+const char kBiometricsManagerEnrollScanDoneSignal[] = "EnrollScanDone";
+const char kBiometricsManagerAuthScanDoneSignal[] = "AuthScanDone";
+const char kBiometricsManagerSessionFailedSignal[] = "SessionFailed";
+
+// Properties
+const char kBiometricsManagerBiometricTypeProperty[] = "Type";
+const char kRecordLabelProperty[] = "Label";
+
+// Values
+enum BiometricType {
+ BIOMETRIC_TYPE_UNKNOWN = 0,
+ BIOMETRIC_TYPE_FINGERPRINT = 1,
+ BIOMETRIC_TYPE_MAX,
+};
+} // namespace biod
+
+#endif // SYSTEM_API_DBUS_BIOD_DBUS_CONSTANTS_H_
diff --git a/dbus/biod/messages.proto b/dbus/biod/messages.proto
new file mode 100644
index 0000000..ea0e966
--- /dev/null
+++ b/dbus/biod/messages.proto
@@ -0,0 +1,18 @@
+// 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.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+
+package biod;
+
+import "constants.proto";
+
+// Included in biod's EnrollScanDone signal.
+message EnrollScanDone {
+ optional ScanResult scan_result = 1;
+ optional bool done = 2;
+ optional int32 percent_complete = 3;
+}
diff --git a/dbus/service_constants.h b/dbus/service_constants.h
index 8eb2602..179f1f3 100644
--- a/dbus/service_constants.h
+++ b/dbus/service_constants.h
@@ -11,6 +11,7 @@
// Chromium OS and Chromium environment.
#include "apmanager/dbus-constants.h"
#include "authpolicy/dbus-constants.h"
+#include "biod/dbus-constants.h"
#include "cros-disks/dbus-constants.h"
#include "cryptohome/dbus-constants.h"
#include "debugd/dbus-constants.h"
@@ -981,54 +982,4 @@ const char kCreateSecureMessageMethod[] = "CreateSecureMessage";
const char kUnwrapSecureMessageMethod[] = "UnwrapSecureMessage";
} // namespace easy_unlock
-namespace biod {
-const char kBiodServicePath[] = "/org/chromium/BiometricsDaemon";
-const char kBiodServiceName[] = "org.chromium.BiometricsDaemon";
-
-// Interfaces for objects exported by biod
-const char kBiometricsManagerInterface[] =
- "org.chromium.BiometricsDaemon.BiometricsManager";
-const char kAuthSessionInterface[] =
- "org.chromium.BiometricsDaemon.AuthSession";
-const char kEnrollSessionInterface[] =
- "org.chromium.BiometricsDaemon.EnrollSession";
-const char kRecordInterface[] = "org.chromium.BiometricsDaemon.Record";
-
-// Methods
-const char kBiometricsManagerStartEnrollSessionMethod[] = "StartEnrollSession";
-const char kBiometricsManagerGetRecordsForUserMethod[] = "GetRecordsForUser";
-const char kBiometricsManagerDestroyAllRecordsMethod[] = "DestroyAllRecords";
-const char kBiometricsManagerStartAuthSessionMethod[] = "StartAuthSession";
-const char kAuthSessionEndMethod[] = "End";
-const char kEnrollSessionCancelMethod[] = "Cancel";
-const char kRecordRemoveMethod[] = "Remove";
-const char kRecordSetLabelMethod[] = "SetLabel";
-
-// Signals
-const char kBiometricsManagerEnrollScanDoneSignal[] = "EnrollScanDone";
-const char kBiometricsManagerAuthScanDoneSignal[] = "AuthScanDone";
-const char kBiometricsManagerSessionFailedSignal[] = "SessionFailed";
-
-// Properties
-const char kBiometricsManagerBiometricTypeProperty[] = "Type";
-const char kRecordLabelProperty[] = "Label";
-
-// Values
-enum BiometricType {
- BIOMETRIC_TYPE_UNKNOWN = 0,
- BIOMETRIC_TYPE_FINGERPRINT = 1,
- BIOMETRIC_TYPE_MAX,
-};
-enum ScanResult {
- SCAN_RESULT_SUCCESS = 0,
- SCAN_RESULT_PARTIAL = 1,
- SCAN_RESULT_INSUFFICIENT = 2,
- SCAN_RESULT_SENSOR_DIRTY = 3,
- SCAN_RESULT_TOO_SLOW = 4,
- SCAN_RESULT_TOO_FAST = 5,
- SCAN_RESULT_IMMOBILE = 6,
- SCAN_RESULT_MAX,
-};
-} // namespace biod
-
#endif // SYSTEM_API_DBUS_SERVICE_CONSTANTS_H_
diff --git a/system_api.gyp b/system_api.gyp
index 6981987..4044802 100644
--- a/system_api.gyp
+++ b/system_api.gyp
@@ -116,5 +116,30 @@
'<(SHARED_INTERMEDIATE_DIR)/include/authpolicy/proto_bindings/active_directory_info.pb.cc',
]
},
+ {
+ 'target_name': 'system_api-biod-protos-gen',
+ 'type': 'none',
+ 'variables': {
+ 'proto_in_dir': 'dbus/biod',
+ 'proto_out_dir': 'include/biod/proto_bindings',
+ },
+ 'sources': [
+ '<(proto_in_dir)/constants.proto',
+ '<(proto_in_dir)/messages.proto',
+ ],
+ 'includes': ['../../platform2/common-mk/protoc.gypi'],
+ },
+ {
+ 'target_name': 'system_api-biod-protos',
+ 'type': 'static_library',
+ 'standalone_static_library': 1,
+ 'dependencies': [
+ 'system_api-biod-protos-gen',
+ ],
+ 'sources': [
+ '<(SHARED_INTERMEDIATE_DIR)/include/biod/proto_bindings/constants.pb.cc',
+ '<(SHARED_INTERMEDIATE_DIR)/include/biod/proto_bindings/messages.pb.cc',
+ ]
+ },
]
}
diff --git a/system_api.pc b/system_api.pc
index db5fd9c..791f27b 100644
--- a/system_api.pc
+++ b/system_api.pc
@@ -1,4 +1,4 @@
Name: system_api
Description: Protobuffers and headers shared by Chromium OS and Chromium.
Version: 0.1
-Libs: -lsystem_api-power_manager-protos -lsystem_api-cryptohome-protos -lsystem_api-authpolicy-protos -lsystem_api-protos
+Libs: -lsystem_api-power_manager-protos -lsystem_api-cryptohome-protos -lsystem_api-authpolicy-protos -lsystem_api-biod-protos -lsystem_api-protos