biometric-authentication/0000755000175000017500000000000013755706021014476 5ustar fengfengbiometric-authentication/.editorconfig0000644000175000017500000000021713517470404017152 0ustar fengfengroot = true [*] charset = utf-8 end_of_line = lf indent_style = tab insert_final_newline = true tab_width = 4 trim_trailing_whitespace = true biometric-authentication/ChangeLog0000644000175000017500000000000013517470404016235 0ustar fengfengbiometric-authentication/README0000644000175000017500000000415113517470404015356 0ustar fengfeng# Biometric Authentication -------------------------- ## Introduction A biometric identification framework. Provide unified DBus interface for application layer, used for various biometric identification and authentication. The framework is divided into three layers: service layer, core layer and drive layer. ### Service Layer The service layer uses the DBus bus to provide the upper application with operation interfaces such as feature enroll, feature verify, feature identify, feature search, feature delete, etc. Meanwhile, it also provides notification of device status changes event and notification of USB device hotplug event. ### Core Layer The core layer abstracts the common operation of all kinds of biometric recognition, constructs the underlying framework of biometric recognition, and provides the general function and unified data storage method. ### Driver Layer The driver layer adapts various hardware, one driver corresponds to a kind of hardware, and completes the hardware related characteristic operation. --- ## Compilation & Install ### Least parameter compilation: ``` ./autogen.sh ./configure --disable-dependency-tracking make ``` ### Complete parameter compilation (in ubuntu, x86_64 architectures): ``` export prefix=/usr ./autogen.sh ./configure --build=x86_64-linux-gnu \ --prefix=/usr \ --includedir=\${prefix}/include \ --mandir=\${prefix}/share/man \ --infodir=\${prefix}/share/info \ --sysconfdir=/etc \ --localstatedir=/var \ --disable-silent-rules \ --libdir=\${prefix}/lib/x86_64-linux-gnu \ --libexecdir=\${prefix}/lib/x86_64-linux-gnu \ --disable-dependency-tracking \ --enable-static \ --enable-shared \ --with-bio-db-dir=/var/lib/biometric-auth/ \ --with-bio-db-name=biometric.db \ --with-bio-config-dir=/etc/biometric-auth/ \ --with-bio-driver-dir=/usr/lib/biometric-authentication/drivers \ --with-bio-extra-dir=/usr/lib/biometric-authentication/drivers/extra \ --libexecdir=\${prefix}/lib/biometric-authentication make ``` ### Install Note: Root permissions may be required for installation ``` make install ``` biometric-authentication/AUTHORS0000644000175000017500000000006213517470404015543 0ustar fengfengJiang Linxuan (droiing) biometric-authentication/COPYING0000644000175000017500000001674313517470404015543 0ustar fengfeng GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. biometric-authentication/doc/0000755000175000017500000000000013517470404015242 5ustar fengfengbiometric-authentication/doc/man/0000755000175000017500000000000013517470404016015 5ustar fengfengbiometric-authentication/doc/man/biometric-auth-client.10000644000175000017500000001020013517470404022260 0ustar fengfeng.TH BIOMETRIC-AUTH-CLIENT 8 .SH NAME biometric-auth-client \- The command line client of the biometric identification framework service .SH SYNOPSIS .B biometric-auth-client [\fBOPTION\fR] .IR BuiltinCommands ... .SH DESCRIPTION .B biometric-auth-client The command line client of the biometric identification framework service. .SH OPTIONS .IP "-h, --help" Display help message and exit .SH BuiltinCommands .PD 0.5v .IP "get-driver-list Get Driver List" .IP "get-device-list Get Device List" .IP "get-feature-list Get Feature List" .IP "enroll Enroll Feature" .IP "verify Verify Feature" .IP "capture Capture Feature" .IP "search Search Feature" .IP "clean Clean Feature" .IP "rename Rename Feature" .PD 1v .SH BuiltinCommands Usage .SS get-driver-list Usage: biometric-auth-client get-driver-list [-afbsevi] .IP OPTIONS: .RS .PD 0.5v .IP "-a" Show all fields (Highest priority) .IP "-f FEATURE_NAME" Show 'Driver Full Name' fields .IP "-b" Show 'Biometric Type' fields .IP "-s" Show 'Storge Type' fields .IP "-e" Show 'Feature Type' fields .IP "-v" Show 'Verify Type' fields .IP "-i INDEX" Show 'Identify Type' fields .IP "-h, --help" Display "biometric-auth-client get-driver-list" help message and exit .PD 1v .RE .SS get-device-list Usage: biometric-auth-client get-device-list [-afbsevi] .IP OPTIONS: .RS .PD 0.5v .IP "-a" Show all fields (Highest priority) .IP "-f FEATURE_NAME" Show 'Driver Full Name' fields .IP "-b" Show 'Biometric Type' fields .IP "-s" Show 'Storge Type' fields .IP "-e" Show 'Feature Type' fields .IP "-v" Show 'Verify Type' fields .IP "-i INDEX" Show 'Identify Type' fields .IP "-h, --help" Display "biometric-auth-client get-device-list" help message and exit .PD 1v .RE .SS get-feature-list Usage: biometric-auth-client get-feature-list [-u USER_NAME] -d DRIVER_ID .IP OPTIONS: .RS .PD 0.5v .IP "-u USER_NAME" User Name (Default is current user) .IP "-d DRIVER_ID" Driver(or Device) ID .IP "-h, --help" Display "biometric-auth-client get-feature-list" help message and exit .PD 1v .RE .SS enroll Usage: biometric-auth-client enroll [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME .IP OPTIONS: .RS .PD 0.5v .IP "-u USER_NAME" User Name (Default is current user) .IP "-d DRIVER_ID" Driver(or Device) ID .IP "-f FEATURE_NAME" Feature Name .IP "-h, --help" Display "biometric-auth-client enroll" help message and exit .PD 1v .RE .SS verify Usage: biometric-auth-client verify [-u USER_NAME] -d DRIVER_ID -i INDEX .IP OPTIONS: .RS .PD 0.5v .IP "-u USER_NAME" User Name (Default is current user) .IP "-d DRIVER_ID" Driver(or Device) ID .IP "-i INDEX" Feature Index .IP "-h, --help" Display "biometric-auth-client verify" help message and exit .PD 1v .RE .SS capture Usage: biometric-auth-client capture -d DRIVER_ID .IP OPTIONS: .RS .PD 0.5v .IP "-d DRIVER_ID" Driver(or Device) ID .IP "-h, --help" Display "biometric-auth-client capture" help message and exit .PD 1v .RE .SS search Usage: biometric-auth-client search [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END] .IP OPTIONS: .RS .PD 0.5v .IP "-u USER_NAME" User Name (Not set to search for all users) .IP "-d DRIVER_ID" Driver(or Device) ID .IP "-s INDEX_START" Start of Feature Index (default 0) .IP "-e INDEX_END" End of Feature Index (default -1, means search all) .IP "-h, --help" Display "biometric-auth-client search" help message and exit .PD 1v .RE .SS clean Usage: biometric-auth-client clean [-u USER_NAME] -d DRIVER_ID -i INDEX .IP OPTIONS: .RS .PD 0.5v .IP "-u USER_NAME" User Name (Default is current user) .IP "-d DRIVER_ID" Driver(or Device) ID .IP "-i INDEX" The Feature Index You Want To Delete (-1 means delete all) .IP "-h, --help" Display "biometric-auth-client clean" help message and exit .PD 1v .RE .SS rename Usage: biometric-auth-client rename [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME .IP OPTIONS: .RS .PD 0.5v .IP "-u USER_NAME" User Name (Default is current user) .IP "-d DRIVER_ID" Driver(or Device) ID .IP "-i INDEX" The Feature Index that needs to be renamed .IP "-n NEW_NAME" New Feature Name .IP "-h, --help" Display "biometric-auth-client rename" help message and exit .PD 1v .RE biometric-authentication/doc/man/biometric-config-tool.80000644000175000017500000000403013517470404022276 0ustar fengfeng.TH BIOMETRIC-CONFIG-TOOL 8 .SH NAME biometric-config-tool \- Manage and configure biometric authentication services .SH SYNOPSIS .B biometric-config-tool [\fBOPTION\fR] .IR BuiltinCommands ... .SH DESCRIPTION .B biometric-config-tool Manage and configure biometric authentication services. .SH OPTIONS .IP "-h, --help" Display help message and exit. .SH BuiltinCommands .IP add-driver Add drivers, usage: biometric-config-tool add-driver [OPTION...] DriverName DriverFilePath .RS .IP OPTIONS: .RS .IP "-f, --force" When there is a driver of the same name, force to override it .IP "-d, --disable" Only add driver and Not enable driver .IP "-h, --help" Display "biometric-config-tool add-driver" help message and exit. .RE .RE .IP remove-driver Remove drives, usage: biometric-config-tool remove-driver [OPTION...] Driver1 [Driver2 ...] .RS .IP OPTIONS: .RS .IP "-i, --ignore" Ignore nonexistent drivers .IP "-h, --help" Display "biometric-config-tool remove-driver" help message and exit. .RE .RE .IP enable-driver Enable drivers, usage: biometric-config-tool enable-driver [OPTION...] Driver1 [Driver2 ...] .RS .IP OPTIONS: .RS .IP "-i, --ignore" Ignore nonexistent drivers .IP "-h, --help" Display "biometric-config-tool enable-driver" help message and exit. .RE .RE .IP disable-driver Disable drivers, usage: biometric-config-tool disable-driver [OPTION...] Driver1 [Driver2 ...] .RS .IP OPTIONS: .RS .IP "-i, --ignore" Ignore nonexistent drivers .IP "-h, --help" Display "biometric-config-tool disable-driver" help message and exit. .RE .RE .IP set-key Set the key value of the specified driver, usage: biometric-config-tool set-key [OPTION...] DriverName Key Value .RS .IP OPTIONS: .RS .IP "-h, --help" Display "biometric-config-tool set-key" help message and exit. .RE .RE .IP remove-key remove the key value of the specified driver, usage: biometric-config-tool remove-key [OPTION...] DriverName Key .RS .IP OPTIONS: .RS .IP "-i, --ignore" Ignore nonexistent drivers .IP "-h, --help" Display "biometric-config-tool remove-key" help message and exit. .RE .RE biometric-authentication/doc/man/biometric-device-discover.10000644000175000017500000000100613517470404023122 0ustar fengfeng.TH BIOMETRIC-DEVICE-DISCOVER 1 .SH NAME biometric-device-discover \- Discover the device supported by biometric authentication services .SH SYNOPSIS .B biometric-device-discover [\fBOPTION\fR] .SH DESCRIPTION .B biometric-device-discover Discover the device supported by biometric authentication services in the current system. .SH OPTIONS .IP -t device type ("serial", "usb", "pcie" or "all") .IP -w Write the discover results to configuration file (just for serial device) .IP -h Display help message and exit. biometric-authentication/Makefile.am0000644000175000017500000000006513517470404016532 0ustar fengfengSUBDIRS = src data po EXTRA_DIST = autogen.sh debian biometric-authentication/src/0000755000175000017500000000000013755706021015265 5ustar fengfengbiometric-authentication/src/dbus_comm.h0000644000175000017500000000212613517470404017406 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef DBUS_COMM_H #define DBUS_COMM_H #include #define UKUI_GDBUS_BIO_BUS G_BUS_TYPE_SYSTEM #define UKUI_GDBUS_BIO_BUS_NAME "org.ukui.Biometric" #define UKUI_GDBUS_BIO_OBJECT_PATH "/org/ukui/Biometric" #endif // DBUS_COMM_H biometric-authentication/src/biometric-dbus-common.h0000644000175000017500000000347713517470404021646 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRICDBUSCOMMON_H #define BIOMETRICDBUSCOMMON_H #include #define GET_CALLER_BUS_NAME "org.freedesktop.DBus" #define GET_CALLER_OBJECT_PATH "/org/freedesktop/DBus" #define GET_CALLER_INTERFACE_NAME "org.freedesktop.DBus" #define GET_CALLER_METHOD_UID "GetConnectionUnixUser" #define GET_CALLER_METHOD_PID "GetConnectionUnixProcessID" #define POLKIT_ENROLL_OWN_ACTION_ID "org.ukui.biometric.enroll-own-data" #define POLKIT_ENROLL_ADMIN_ACTION_ID "org.ukui.biometric.enroll-admin-data" #define POLKIT_CLEAN_OWN_ACTION_ID "org.ukui.biometric.clean-own-data" #define POLKIT_CLEAN_ADMIN_ACTION_ID "org.ukui.biometric.clean-admin-data" gboolean get_dbus_caller_uid (GDBusMethodInvocation *invocation, gint *uid); gboolean get_dbus_caller_pid (GDBusMethodInvocation *invocation, gint *pid); gboolean authority_check_by_polkit (PolkitAuthority *pAuthority, GDBusMethodInvocation *invocation, const char * action_id); #endif // BIOMETRICDBUSCOMMON_H biometric-authentication/src/drivers/0000755000175000017500000000000013755706021016743 5ustar fengfengbiometric-authentication/src/drivers/community-multidevice/0000755000175000017500000000000013757133715023305 5ustar fengfengbiometric-authentication/src/drivers/community-multidevice/aes_128_cfb.h0000644000175000017500000000354713755706021025435 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef AES_128_CFB_H #define AES_128_CFB_H #define AES_BLOCK_SIZE 16 void keyExpansion(unsigned char* key, unsigned char w[][4][4]); unsigned char* cipher(unsigned char* input, unsigned char* output, unsigned char w[][4][4]); unsigned char* invCipher(unsigned char* input, unsigned char* output, unsigned char w[][4][4]); unsigned char FFmul(unsigned char a, unsigned char b); void subBytes(unsigned char state[][4]); void shiftRows(unsigned char state[][4]); void mixColumns(unsigned char state[][4]); void invSubBytes(unsigned char state[][4]); void invShiftRows(unsigned char state[][4]); void invMixColumns(unsigned char state[][4]); void addRoundKey(unsigned char state[][4], unsigned char k[][4]); int AES_128_CFB_Encrypt(unsigned char* key, unsigned char* iv, unsigned char* indata, int inlen, unsigned char* outData); int AES_128_CFB_Decrypt(unsigned char* key, unsigned char* iv, unsigned char* inData, int inLen, unsigned char* outData); #endif // AES_128_CFB_H biometric-authentication/src/drivers/community-multidevice/close.c0000644000175000017500000004076313755706021024562 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "close.h" // 创建指纹模板 FpPrint *print_create_template(FpDevice *device, FpFinger finger, bio_dev *dev) { bio_print_debug ("print_create_template start\n"); driver_info *priv = dev->dev_priv; priv->device = device; // 智能指针 g_autoptr(GDateTime) datetime = NULL; g_autoptr(GDate) date = NULL; FpPrint *template = NULL; gint year; gint month; gint day; // 创建一个新的FpPrint指纹 template = fp_print_new (priv->device); // 设置指纹的手指 fp_print_set_finger (template, finger); // 设置指纹的用户名 fp_print_set_username (template, g_get_user_name ()); // 获取当前时间 datetime = g_date_time_new_now_local (); g_date_time_get_ymd (datetime, &year, &month, &day); date = g_date_new_dmy (day, month, year); // 设置录入指纹时间 fp_print_set_enroll_date (template, date); bio_print_debug ("print_create_template end\n"); return template; } // 设备打开后的回调函数 void on_device_opened(FpDevice *device, GAsyncResult *res, void *user_data) { bio_dev *dev = user_data; driver_info *priv = dev->dev_priv; priv->device = device; // 智能指针 g_autoptr(GError) error = NULL; if (!fp_device_open_finish (priv->device, res, &error)) { bio_print_error ("Failed to open device: %s", error->message); return; } bio_print_debug ("Opened device. It's now time to operate.\n\n"); priv->asyn_flag = ASYN_FLAG_DONE; } // 设备关闭后的回调函数 void on_device_closed(FpDevice *device, GAsyncResult *res, void *user_data) { bio_dev *dev = user_data; driver_info *priv = dev->dev_priv; priv->device = device; g_autoptr(GError) error = NULL; fp_device_close_finish (priv->device, res, &error); if (error) bio_print_error ("Failed closing device %s\n", error->message); priv->asyn_flag = ASYN_FLAG_DONE; } // 设备录入过程回调函数,参数不可更改 void on_enroll_progress(FpDevice *device, gint completed_stages, FpPrint *print, gpointer user_data, GError *error) { bio_print_debug ("on_enroll_progress start\n"); enroll_data *enrollData = user_data; driver_info *priv = enrollData->dev->dev_priv; priv->device = device; if (error) { bio_print_error ("Enroll stage %d of %d failed with error %s", completed_stages, fp_device_get_nr_enroll_stages (priv->device), error->message); } snprintf (priv->extra_info, EXTRA_INFO_LENGTH, ("Enroll stage[ %d / %d ] passed. Yay! Please press your finger again.\n"), completed_stages, fp_device_get_nr_enroll_stages (device)); bio_set_notify_abs_mid (enrollData->dev, MID_EXTENDED_MESSAGE); bio_print_debug ("%s\n", bio_get_notify_mid_mesg (enrollData->dev)); priv->timeused = 0; bio_print_debug ("on_enroll_progress end\n"); } // 录入函数完成后的回调函数 void on_enroll_completed(FpDevice *device, GAsyncResult *res, void *user_data) { bio_print_debug ("on_enroll_completed start\n"); enroll_data *enrollData = user_data; driver_info *priv = (driver_info *)enrollData->dev->dev_priv; g_autoptr(FpPrint) print = NULL; g_autoptr(GError) error = NULL; g_autofree guchar *data = NULL; gsize size; guchar *feature_data = NULL; char *feature_encode = NULL; // 录入是否成功 print = fp_device_enroll_finish (device, res, &error); // 成功 if (!error) { // 序列化永久存储的指纹定义。 fp_print_serialize (print, &data, &size, &error); if (error) { g_warning ("Error serializing data: %s", error->message); return; } feature_data = buf_alloc(size); feature_encode = buf_alloc(size * 2 + 1); // 特征值加密处理 community_internal_aes_encrypt (data, size, priv->aes_key, feature_data); // 64编码 bio_base64_encode (feature_data, feature_encode, size); // 存储模板 feature_info *info; // 创建特征结构体 info = bio_sto_new_feature_info (enrollData->uid, enrollData->dev->bioinfo.biotype, enrollData->dev->device_name, enrollData->idx, enrollData->bio_idx_name); // 创建新的采样结构体 info->sample = bio_sto_new_feature_sample (-1, NULL); info->sample->no = size; info->sample->data = bio_sto_new_str (feature_encode); // 打印特征结构体 print_feature_info (info); // 连接数据库 sqlite3 *db = bio_sto_connect_db (); // 保存特征信息链表 bio_sto_set_feature_info (db, info); // 断开数据库连接 bio_sto_disconnect_db (db); // 回收特征数据项 bio_sto_free_feature_info_list (info); } else { bio_print_error ("Enroll failed with error %s\n", error->message); priv->asyn_flag = ASYN_FLAG_DONE; return; } bio_set_ops_abs_result (enrollData->dev, OPS_ENROLL_SUCCESS); // 设置操作结果:录入信息成功 bio_set_notify_abs_mid (enrollData->dev, NOTIFY_ENROLL_SUCCESS); // 用户提醒消息:录入信息成功 bio_set_dev_status (enrollData->dev, DEVS_COMM_IDLE); // 设备状态:空闲状态 bio_print_debug ("on_enroll_completed end\n"); priv->asyn_flag = ASYN_FLAG_DONE; return; } // 捕获函数完成回调函数 void on_capture_completed(FpDevice *device, GAsyncResult *res, void *user_data) { capture_data *captureData = user_data; driver_info *priv = (driver_info *)captureData->dev->dev_priv; priv->device = device; g_autoptr(FpImage) img = NULL; g_autoptr(GError) error = NULL; gsize size; img = fp_device_capture_finish (priv->device, res, &error); if (!error){ // 获取图像的数据 const guchar *data = fp_image_get_binarized (img, &size); captureData->feature_data = buf_alloc (size); captureData->feature_encode = buf_alloc (size * 2 +1); captureData->feature_data = (char *)data; bio_print_debug ("Captrue successful!!\n"); priv->asyn_flag = ASYN_FLAG_DONE; return; } else { bio_print_debug ("Capture failed with error %s\n", error->message); priv->asyn_flag = ASYN_FLAG_DONE; return; } } // 验证完成回调函数 void on_verify_completed(FpDevice *device, GAsyncResult *res, void *user_data) { bio_dev *dev = user_data; driver_info *priv = (driver_info *)dev->dev_priv; priv->device = device; g_autoptr(FpPrint) print = NULL; g_autoptr(GError) error = NULL; gboolean match; // 异步验证失败 if (!fp_device_verify_finish (priv->device, res, &match, &print, &error)) { bio_print_error ("Failed to verify print: %s\n", error->message); priv->asyn_flag = ASYN_FLAG_DONE; return; } else { priv->asyn_flag = ASYN_FLAG_DONE; return; } } // 创建指纹列表 GPtrArray *create_prints(bio_dev *dev, int uid, int idx_start, int idx_end) { bio_print_debug ("create_prints start\n"); driver_info *priv = (driver_info *)dev->dev_priv; GPtrArray *prints = NULL; feature_info *info_list = NULL; const guchar *stored_data = NULL; gsize stored_len; g_autoptr(GError) error = NULL; guchar *template_data = NULL; // 连接数据库 sqlite3 *db = bio_sto_connect_db (); // 获取特征列表 info_list = bio_sto_get_feature_info (db, uid, dev->bioinfo.biotype, dev->device_name, idx_start, idx_end); // 打印特征列表 print_feature_info (info_list); // 断开数据库 bio_sto_disconnect_db (db); // 创建一个GPtrArray prints = g_ptr_array_new (); // 为匹配的特征构建新的特征链表,每个特征值对应一个采样特征值 while (info_list != NULL) { feature_sample *sample = info_list->sample; while (sample != NULL) { FpPrint *print = NULL; char *temp = (char *)stored_data; template_data = buf_alloc (sample->no); stored_data = buf_alloc (sample->no); stored_len = sample->no; // 特征解码 bio_base64_decode (sample->data, template_data); // 解密 community_internal_aes_decrypt (template_data, sample->no, priv->aes_key, (guchar *)stored_data); // 将数据库中的值反序列化 print = fp_print_deserialize (stored_data, stored_len, &error); // 插入数据 g_ptr_array_add (prints, print); sample = sample->next; free (temp); temp = NULL; stored_data = NULL; free (template_data); } info_list = info_list->next; } // 回收特征数据项 bio_sto_free_feature_info_list (info_list); bio_print_debug ("create_prints end\n"); return prints; } // 识别完成回调函数 void on_device_identify(FpDevice *device, GAsyncResult *res, void *user_data) { bio_dev *dev = user_data; driver_info *priv = (driver_info *)dev->dev_priv; priv->device = device; g_autoptr(GError) error = NULL; g_autoptr(FpPrint) match = NULL; g_autoptr(FpPrint) print = NULL; fp_device_identify_finish (priv->device, res, &match, &print, &error); if (error) { bio_print_error ("Failed identify device %s\n", error->message); priv->asyn_flag = ASYN_FLAG_DONE; } priv->asyn_flag = ASYN_FLAG_DONE; } // 验证函数结果函数 void on_match_cb_verify(FpDevice *device, FpPrint *match, FpPrint *print, gpointer user_data, GError *error) { bio_print_debug ("on_math_cb start\n"); bio_dev *dev = user_data; driver_info *priv = (driver_info *)dev->dev_priv; if (error) { bio_print_error ("Match report: Finger not matched, retry error reported: %s", error->message); return; } if (match) { char date_str[128]; // 以特定于区域设置的方式生成日期的打印表示形式。 g_date_strftime (date_str, G_N_ELEMENTS (date_str), "%Y-%m-%d\0", fp_print_get_enroll_date (match)); bio_print_debug ("Match report: device %s matched finger successifully " "with print %s, enrolled on date %s by user %s", fp_device_get_name (device), fp_print_get_description (match), date_str, fp_print_get_username (match)); bio_print_debug ("MATCH!\n"); snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "_Verify fingerprint template successful"); bio_set_ops_abs_result (dev, OPS_VERIFY_MATCH); bio_set_notify_abs_mid (dev, NOTIFY_VERIFY_MATCH); bio_set_notify_abs_mid (dev, MID_EXTENDED_MESSAGE); } else { bio_print_debug ("Match report: Finger not matched"); bio_print_debug ("NO MATCH!\n"); snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "_Verify fingerprint template fail"); bio_set_ops_abs_result (dev, OPS_VERIFY_NO_MATCH); bio_set_notify_abs_mid (dev, NOTIFY_VERIFY_NO_MATCH); bio_set_notify_abs_mid (dev, MID_EXTENDED_MESSAGE); } } // 识别函数结果函数(搜索) void on_match_cb_search(FpDevice *device, FpPrint *match, FpPrint *print, gpointer user_data, GError *error) { bio_print_debug ("on_math_cb start\n"); search_data *searchData = user_data; driver_info *priv = (driver_info *)searchData->dev->dev_priv; priv->device = device; feature_info *info = NULL; feature_info *info_list = NULL; const guchar *stored_data = NULL; gsize stored_len; guchar *template_data = NULL; if (error) { bio_print_error ("Match report: Finger not matched, retry error reported: %s", error->message); return; } if (match) { // 连接数据库 sqlite3 *db = bio_sto_connect_db(); // 获取特征列表 info_list = bio_sto_get_feature_info(db, searchData->uid, searchData->dev->bioinfo.biotype, searchData->dev->device_name, searchData->index, searchData->idx_end); // 打印特征列表 print_feature_info(info_list); // 断开数据库 bio_sto_disconnect_db(db); info = info_list; // info指向info_list while (info != NULL) { feature_sample *sample = info->sample; while (sample != NULL) { FpPrint *compare_print = NULL; char *temp = (char *)stored_data; template_data = buf_alloc (sample->no); stored_data = buf_alloc (sample->no); stored_len = sample->no; // 特征解码 bio_base64_decode (sample->data, template_data); // 解密 community_internal_aes_decrypt (template_data, sample->no, priv->aes_key, (guchar *)stored_data); // 将数据库中的值反序列化 compare_print = fp_print_deserialize (stored_data, stored_len, &error); // 指纹比较是否相等 if (fp_print_equal (match, compare_print)) { searchData->found->next = bio_sto_new_feature_info (info->uid, info->biotype, info->driver, info->index, info->index_name); searchData->found->next->sample = bio_sto_new_feature_sample (sample->no, sample->data); searchData->found = searchData->found->next; searchData->index = info->index; } else { if(sample->next != NULL) { free(temp); temp = NULL; stored_data = NULL; free(template_data); sample = sample->next; } else { free(temp); temp = NULL; stored_data = NULL; free(template_data); break; } } sample = sample->next; free(temp); temp = NULL; stored_data = NULL; free(template_data); } info = info->next; } snprintf (priv->extra_info, EXTRA_INFO_LENGTH, ("search successful [index = %d] ! Please press your finger again to search.\n"), searchData->index); bio_set_notify_abs_mid (searchData->dev, MID_EXTENDED_MESSAGE); bio_print_debug ("%s\n", bio_get_notify_mid_mesg(searchData->dev)); bio_sto_free_feature_info_list (info_list); // 释放原始的特征列表 } else { searchData->found = searchData->found_head.next; priv->ctrlFlag = CONTROL_FLAG_DONE; // 控制标志设置为:4 } return; } // 识别函数结果函数(识别) void on_match_cb_identify (FpDevice *device, FpPrint *match, FpPrint *print, gpointer user_data, GError *error) { bio_print_debug ("on_math_cb_identify start\n"); identify_data *identifyData = user_data; driver_info *priv = (driver_info *)identifyData->dev->dev_priv; priv->device = device; feature_info *info_list = NULL; const guchar *stored_data = NULL; gsize stored_len; guchar *template_data = NULL; if (error) { bio_print_error ("Match report: Finger not matched, retry error reported: %s\n", error->message); return; } if (match) { // 连接数据库 sqlite3 *db = bio_sto_connect_db (); // 获取特征列表 info_list = bio_sto_get_feature_info (db, identifyData->uid, identifyData->dev->bioinfo.biotype, identifyData->dev->device_name, identifyData->idx_start, identifyData->idx_end); // 打印特征列表 print_feature_info (info_list); // 断开数据库 bio_sto_disconnect_db (db); // 为匹配的特征构建新的特征链表,每个特征值对应一个采样特征值 while (info_list != NULL) { feature_sample *sample = info_list->sample; while (sample != NULL) { FpPrint *compare_print = NULL; char *temp = (char *)stored_data; template_data = buf_alloc(sample->no); stored_data = buf_alloc(sample->no); stored_len = sample->no; // 特征解码 bio_base64_decode (sample->data, template_data); // 解密 community_internal_aes_decrypt (template_data, sample->no, priv->aes_key, (guchar *)stored_data); // 将数据库中的值反序列化 compare_print = fp_print_deserialize (stored_data, stored_len, &error); // 指纹比较是否相等 if (fp_print_equal (match, compare_print)) { free (temp); temp = NULL; stored_data = NULL; identifyData->uid = info_list->uid; } sample = sample->next; free (temp); temp = NULL; stored_data = NULL; free (template_data); } info_list = info_list->next; } // 回收特征数据项 bio_sto_free_feature_info_list (info_list); snprintf (priv->extra_info, EXTRA_INFO_LENGTH, ("_identify fingerprint template successful, its uid is %d"), identifyData->uid); bio_set_ops_abs_result (identifyData->dev, OPS_IDENTIFY_MATCH); bio_set_notify_abs_mid (identifyData->dev, NOTIFY_IDENTIFY_MATCH); bio_set_notify_abs_mid (identifyData->dev, MID_EXTENDED_MESSAGE); bio_print_info ("%s\n", bio_get_notify_mid_mesg (identifyData->dev)); } else { snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "_identify fingerprint template fail"); bio_set_ops_abs_result (identifyData->dev, OPS_IDENTIFY_NO_MATCH); bio_set_notify_abs_mid (identifyData->dev, NOTIFY_IDENTIFY_NO_MATCH); bio_set_notify_abs_mid (identifyData->dev, MID_EXTENDED_MESSAGE); bio_print_info ("%s\n", bio_get_notify_mid_mesg (identifyData->dev)); } return; } biometric-authentication/src/drivers/community-multidevice/drivers/0000755000175000017500000000000013755706021024755 5ustar fengfengbiometric-authentication/src/drivers/community-multidevice/drivers/etes603.c0000644000175000017500000000610013755706021026307 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id etes603_id_table[] = { { .idVendor = 0x1c7a, .idProduct = 0x0603, .description = "EgisTec (aka Lightuning) ES603"}, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = ETES603_NAME; dev->full_name = "EgisTec (aka Lightuning) ES603"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = etes603_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = ETES603_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/upektc.c0000644000175000017500000000616613755706021026425 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id upektc_id_table[] = { { .idVendor = 0x0483, .idProduct = 0x2015, .description = "UPEKTC_2015" }, { .idVendor = 0x147e, .idProduct = 0x3001, .description = "UPEKTC_3001" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = UPEKTC_NAME; dev->full_name = "UPEK TouchChip/Eikon Touch 300"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = upektc_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = UPEKTC_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/upekts.c0000644000175000017500000000602013755706021026432 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id upekts_id_table[] = { { .idVendor = 0x0483, .idProduct = 0x2016, .description = "" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = UPEKTS_NAME; dev->full_name = "UPEK TouchStrip"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = upekts_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = UPEKTS_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/fdu2000.c0000644000175000017500000000604513755706021026206 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id fdu2000_id_table[] = { { .idVendor = 0x1162, .idProduct = 0x0300, .description = "Secugen FDU 2000" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = FDU2000_NAME; dev->full_name = "Secugen FDU 2000"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = fdu2000_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = FDU2000_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/aes4000.c0000644000175000017500000000604713755706021026204 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id aes4000_id_table[] = { { .idVendor = 0x08ff, .idProduct = 0x5501, .description = "AuthenTec AES4000" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = AES4000_NAME; dev->full_name = "AuthenTec AES4000"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = aes4000_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = AES4000_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/aes2501.c0000644000175000017500000000615513755706021026210 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id aes2501_id_table[] = { { .idVendor = 0x08ff, .idProduct = 0x2500, .description = "AES2500" }, { .idVendor = 0x08ff, .idProduct = 0x2580, .description = "AES2501" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = AES2501_NAME; dev->full_name = "AuthenTec AES2501/AES2500"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = aes2501_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = AES2501_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/upeksonly.c0000644000175000017500000000620513755706021027155 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id upeksonly_id_table[] = { { .idVendor = 0x147e, .idProduct = 0x1000, .description = "UPEKSONLY_1000" }, { .idVendor = 0x147e, .idProduct = 0x1001, .description = "UPEKSONLY_1001" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = UPEKSONLY_NAME; dev->full_name = "UPEK TouchStrip Sensor-Only"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = upeksonly_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = UPEKSONLY_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/aes2550.c0000644000175000017500000000615513755706021026214 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id aes2550_id_table[] = { { .idVendor = 0x08ff, .idProduct = 0x2550, .description = "AES2550" }, { .idVendor = 0x08ff, .idProduct = 0x2810, .description = "AES2810" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = AES2550_NAME; dev->full_name = "AuthenTec AES2550/AES2810"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = aes2550_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = AES2550_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/uru4000.c0000644000175000017500000000714313755706021026245 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id uru4000_id_table[] = { { .idVendor = 0x045e, .idProduct = 0x00bb, .description = "ms kbd with fp rdr" }, { .idVendor = 0x045e, .idProduct = 0x00bc, .description = "ms intellimouse with fp rdr" }, { .idVendor = 0x045e, .idProduct = 0x00bd, .description = "ms fp rdr (standalone)" }, { .idVendor = 0x045e, .idProduct = 0x00ca, .description = "ms fp rdr (standalone) v2" }, { .idVendor = 0x05ba, .idProduct = 0x0007, .description = "dp uru4000 (standalone)" }, { .idVendor = 0x05ba, .idProduct = 0x0008, .description = "dp uru4000 (keyboard)" }, { .idVendor = 0x05ba, .idProduct = 0x000a, .description = "dp uru4000b (standalone)" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = URU4000_NAME; dev->full_name = "Digital Persona U.are.U 4000/4000B/4500"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = uru4000_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = community_ops_capture; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = URU4000_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/aes1610.c0000644000175000017500000000605013755706021026202 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id aes1610_id_table[] = { { .idVendor = 0x08ff, .idProduct = 0x1600, .description = "AuthenTec AES1610" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = AES1610_NAME; dev->full_name = "AuthenTec AES1610"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = aes1610_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = AES1610_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/aes1660.c0000644000175000017500000001050713755706021026211 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id aes1660_id_table[] = { { .idVendor = 0x08ff, .idProduct = 0x1660, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x1680, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x1681, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x1682, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x1683, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x1684, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x1685, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x1686, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x1687, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x1688, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x1689, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x168a, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x168b, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x168c, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x168d, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x168e, .description = "AuthenTec AES1660" }, { .idVendor = 0x08ff, .idProduct = 0x168f, .description = "AuthenTec AES1660" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = AES1660_NAME; dev->full_name = "AuthenTec AES1660"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = aes1660_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = AES1660_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/vcom5s.c0000644000175000017500000000604513755706021026342 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id vcom5s_id_table[] = { { .idVendor = 0x061a, .idProduct = 0x0110, .description = "Veridicom 5thSense" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = VCOM5S_NAME; dev->full_name = "Veridicom 5thSense"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = vcom5s_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = VCOM5S_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/vfs101.c0000644000175000017500000000602013755706021026137 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id vfs101_id_table[] = { { .idVendor = 0x138a, .idProduct = 0x0001, .description = "" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = VFS101_NAME; dev->full_name = "Validity VFS101"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = vfs101_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = VFS101_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/vfs5011.c0000644000175000017500000000651013755706021026230 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id vfs5011_id_table[] = { { .idVendor = 0x138a, .idProduct = 0x0010, .description = "Validity device from some Toshiba laptops" }, { .idVendor = 0x138a, .idProduct = 0x0011, .description = "vfs5011" }, { .idVendor = 0x138a, .idProduct = 0x0017, .description = "Validity device from Lenovo T440 laptops" }, { .idVendor = 0x138a, .idProduct = 0x0018, .description = "one more Validity device" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = VFS5011_NAME; dev->full_name = "Validity VFS5011"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = vfs5011_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = VFS5011_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/elan.c0000644000175000017500000001727313755706021026052 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id elan_id_table[] = { { .idVendor = 0x04f3, .idProduct = 0x0903, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0907, .description = "ELAN 0907" }, { .idVendor = 0x04f3, .idProduct = 0x0c01, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c02, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c03, .description = "ELAN 0C03" }, { .idVendor = 0x04f3, .idProduct = 0x0c04, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c05, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c06, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c07, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c08, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c09, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c0a, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c0b, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c0c, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c0d, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c0e, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c0f, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c10, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c11, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c12, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c13, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c14, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c15, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c16, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c17, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c18, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c19, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c1a, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c1b, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c1c, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c1d, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c1e, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c1f, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c20, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c21, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c22, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c23, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c24, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c25, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c26, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c27, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c28, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c29, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c2a, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c2b, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c2c, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c2d, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c2e, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c2f, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c30, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c31, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c32, .description = "ElanTech Fingerprint Sensor" }, { .idVendor = 0x04f3, .idProduct = 0x0c33, .description = "ElanTech Fingerprint Sensor" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = ELAN_NAME; dev->full_name = "ElanTech Fingerprint Sensor"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = elan_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = ELAN_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/Makefile.am0000644000175000017500000001121413755706021027010 0ustar fengfengNULL = AUTOMAKE_OPTIONS = subdir-objects if HAS_BIO_DRIVER_DIR drv_dir = $(BIO_DRIVER_DIR) else drv_dir = $(datadir)/biometric-authentication/driver endif if HAS_BIO_EXTRA_DIR extra_dir = $(BIO_EXTRA_DIR) else extra_dir = $(datadir)/biometric-authentication/driver/extra endif DOMAIN_NAME = -DBIOMETRIC_DRIVER_COMMUNITY_MULTIDEVICE_DOMAIN_NAME=\""$(PACKAGE)"\" LOCALEDIR_CFS = -DLOCALEDIR=\""$(localedir)"\" libdrvdir = $(drv_dir) libdrv_LTLIBRARIES = upekts.la uru4000.la aes4000.la aes2501.la upektc.la \ aes1610.la fdu2000.la vcom5s.la upeksonly.la vfs101.la vfs301.la \ aes2550.la aes1660.la aes2660.la aes3500.la upektc_img.la \ etes603.la vfs5011.la vfs0050.la elan.la \ $(NULL) COMM_SOURCES = $(top_srcdir)/src/drivers/community-multidevice/community_ops.c \ $(top_srcdir)/src/drivers/community-multidevice/aes_128_cfb.c \ $(top_srcdir)/src/drivers/community-multidevice/close.c \ $(top_srcdir)/src/drivers/community-multidevice/driver_internal.c COMM_INCLUDE = $(top_srcdir)/src/drivers/community-multidevice/close.h \ $(top_srcdir)/src/drivers/community-multidevice/community_define.h \ $(top_srcdir)/src/drivers/community-multidevice/aes_128_cfb.h \ $(top_srcdir)/src/drivers/community_multidevice/driver_internal.h \ $(top_srcdir)/src/drivers/comunity_multidevice/driver_type.h \ $(NULL) COMM_CFS = -Wall -g -o0 -shared -fpic \ -I$(top_srcdir)/src/lib/ -I$(top_srcdir)/src/drivers/community-multidevice/ \ $(LOCALEDIR_CFS) $(DOMAIN_NAME) \ $(LIBBIOMETRIC_CFLAGS) $(LIBFPRINT_CFLAGS) \ $(GLIB_2_CFLAGS) $(LIBUSB_1_CFLAGS) $(SQLITE3_CFLAGS) \ $(NULL) COMM_LDFS = $(LIBFPRINT_LIBS) $(GLIB_2_LIBS) $(LIBUSB_1_LIBS) $(SQLITE3_LIBS) \ ../../../lib/libbiometric.la -module -avoid-version -Wl,-z,now \ $(NULL) upekts_la_SOURCES = $(COMM_SOURCES) upekts.c upekts_la_INCLUDE = $(COMM_INCLUDE) upekts_la_CFLAGS = $(COMM_CFS) upekts_la_LDFLAGS = $(COMM_LDFS) uru4000_la_SOURCES = $(COMM_SOURCES) uru4000.c uru4000_la_INCLUDE = $(COMM_INCLUDE) uru4000_la_CFLAGS = $(COMM_CFS) uru4000_la_LDFLAGS = $(COMM_LDFS) aes4000_la_SOURCES = $(COMM_SOURCES) aes4000.c aes4000_la_INCLUDE = $(COMM_INCLUDE) aes4000_la_CFLAGS = $(COMM_CFS) aes4000_la_LDFLAGS = $(COMM_LDFS) aes2501_la_SOURCES = $(COMM_SOURCES) aes2501.c aes2501_la_INCLUDE = $(COMM_INCLUDE) aes2501_la_CFLAGS = $(COMM_CFS) aes2501_la_LDFLAGS = $(COMM_LDFS) upektc_la_SOURCES = $(COMM_SOURCES) upektc.c upektc_la_INCLUDE = $(COMM_INCLUDE) upektc_la_CFLAGS = $(COMM_CFS) upektc_la_LDFLAGS = $(COMM_LDFS) aes1610_la_SOURCES = $(COMM_SOURCES) aes1610.c aes1610_la_INCLUDE = $(COMM_INCLUDE) aes1610_la_CFLAGS = $(COMM_CFS) aes1610_la_LDFLAGS = $(COMM_LDFS) fdu2000_la_SOURCES = $(COMM_SOURCES) fdu2000.c fdu2000_la_INCLUDE = $(COMM_INCLUDE) fdu2000_la_CFLAGS = $(COMM_CFS) fdu2000_la_LDFLAGS = $(COMM_LDFS) vcom5s_la_SOURCES = $(COMM_SOURCES) vcom5s.c vcom5s_la_INCLUDE = $(COMM_INCLUDE) vcom5s_la_CFLAGS = $(COMM_CFS) vcom5s_la_LDFLAGS = $(COMM_LDFS) upeksonly_la_SOURCES = $(COMM_SOURCES) upeksonly.c upeksonly_la_INCLUDE = $(COMM_INCLUDE) upeksonly_la_CFLAGS = $(COMM_CFS) upeksonly_la_LDFLAGS = $(COMM_LDFS) vfs101_la_SOURCES = $(COMM_SOURCES) vfs101.c vfs101_la_INCLUDE = $(COMM_INCLUDE) vfs101_la_CFLAGS = $(COMM_CFS) vfs101_la_LDFLAGS = $(COMM_LDFS) vfs301_la_SOURCES = $(COMM_SOURCES) vfs301.c vfs301_la_INCLUDE = $(COMM_INCLUDE) vfs301_la_CFLAGS = $(COMM_CFS) vfs301_la_LDFLAGS = $(COMM_LDFS) aes2550_la_SOURCES = $(COMM_SOURCES) aes2550.c aes2550_la_INCLUDE = $(COMM_INCLUDE) aes2550_la_CFLAGS = $(COMM_CFS) aes2550_la_LDFLAGS = $(COMM_LDFS) aes1660_la_SOURCES = $(COMM_SOURCES) aes1660.c aes1660_la_INCLUDE = $(COMM_INCLUDE) aes1660_la_CFLAGS = $(COMM_CFS) aes1660_la_LDFLAGS = $(COMM_LDFS) aes2660_la_SOURCES = $(COMM_SOURCES) aes2660.c aes2660_la_INCLUDE = $(COMM_INCLUDE) aes2660_la_CFLAGS = $(COMM_CFS) aes2660_la_LDFLAGS = $(COMM_LDFS) aes3500_la_SOURCES = $(COMM_SOURCES) aes3500.c aes3500_la_INCLUDE = $(COMM_INCLUDE) aes3500_la_CFLAGS = $(COMM_CFS) aes3500_la_LDFLAGS = $(COMM_LDFS) upektc_img_la_SOURCES = $(COMM_SOURCES) upektc_img.c upektc_img_la_INCLUDE = $(COMM_INCLUDE) upektc_img_la_CFLAGS = $(COMM_CFS) upektc_img_la_LDFLAGS = $(COMM_LDFS) etes603_la_SOURCES = $(COMM_SOURCES) etes603.c etes603_la_INCLUDE = $(COMM_INCLUDE) etes603_la_CFLAGS = $(COMM_CFS) etes603_la_LDFLAGS = $(COMM_LDFS) vfs5011_la_SOURCES = $(COMM_SOURCES) vfs5011.c vfs5011_la_INCLUDE = $(COMM_INCLUDE) vfs5011_la_CFLAGS = $(COMM_CFS) vfs5011_la_LDFLAGS = $(COMM_LDFS) vfs0050_la_SOURCES = $(COMM_SOURCES) vfs0050.c vfs0050_la_INCLUDE = $(COMM_INCLUDE) vfs0050_la_CFLAGS = $(COMM_CFS) vfs0050_la_LDFLAGS = $(COMM_LDFS) elan_la_SOURCES = $(COMM_SOURCES) elan.c elan_la_INCLUDE = $(COMM_INCLUDE) elan_la_CFLAGS = $(COMM_CFS) elan_la_LDFLAGS = $(COMM_LDFS) biometric-authentication/src/drivers/community-multidevice/drivers/vfs0050.c0000644000175000017500000000602513755706021026227 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id vfs0050_id_table[] = { { .idVendor = 0x138a, .idProduct = 0x0050, .description = "" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = VFS0050_NAME; dev->full_name = "Validity VFS0050"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = vfs0050_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = VFS0050_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/aes2660.c0000644000175000017500000001014713755706021026212 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id aes2660_id_table[] = { { .idVendor = 0x08ff, .idProduct = 0x2660, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2680, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2681, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2682, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2683, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2684, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2685, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2686, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2687, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2688, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2689, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x268a, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x268b, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x268c, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x268d, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x268e, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x268f, .description = "" }, { .idVendor = 0x08ff, .idProduct = 0x2691, .description = "" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = AES2660_NAME; dev->full_name = "AuthenTec AES2660"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = aes2660_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = AES2660_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/aes3500.c0000644000175000017500000000604713755706021026210 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id aes3500_id_table[] = { { .idVendor = 0x08ff, .idProduct = 0x5731, .description = "AuthenTec AES3500" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = AES3500_NAME; dev->full_name = "AuthenTec AES3500"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = aes3500_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = AES3500_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/vfs301.c0000644000175000017500000000613513755706021026150 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id vfs301_id_table[] = { { .idVendor = 0x138a, .idProduct = 0x0005, .description = "vfs301" }, { .idVendor = 0x138a, .idProduct = 0x0008, .description = "vfs300" }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = VFS301_NAME; dev->full_name = "Validity VFS301"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = vfs301_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = VFS301_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/drivers/upektc_img.c0000644000175000017500000000607013755706021027253 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include "community_ops.h" static const struct usb_id upektc_img_id_table[] = { { .idVendor = 0x147e, .idProduct = 0x2020, .description = "", }, { 0, 0, NULL }, }; int ops_configure(bio_dev * dev, GKeyFile * conf) { dev->driver_id = bio_get_empty_driver_id(); dev->device_name = UPEKTC_IMG_NAME; dev->full_name = "Upek TouchChip Fingerprint Coprocessor"; dev->bioinfo.biotype = BioT_FingerPrint; dev->bioinfo.stotype = StoT_OS; dev->bioinfo.eigtype = EigT_Eigenvalue; dev->bioinfo.vertype = VerT_Software; dev->bioinfo.idtype = IdT_Software; dev->bioinfo.bustype = BusT_USB; dev->usb_info.id_table = upektc_img_id_table; dev->usb_info.driver_data = 0; dev->ops_configure = ops_configure; dev->ops_driver_init = community_ops_driver_init; dev->ops_discover = community_ops_discover; dev->ops_open = community_ops_open; dev->ops_enroll = community_ops_enroll; dev->ops_verify = community_ops_verify; dev->ops_identify = community_ops_identify; dev->ops_capture = NULL; dev->ops_search = community_ops_search; dev->ops_clean = community_ops_clean; dev->ops_get_feature_list = community_ops_get_feature_list; dev->ops_attach = community_ops_attach; dev->ops_detach = community_ops_detach; dev->ops_stop_by_user = community_ops_stop_by_user; dev->ops_feature_rename = NULL; // Use the default function provided by the framework dev->ops_close = community_ops_close; dev->ops_free = community_ops_free; dev->ops_get_ops_result_mesg = community_ops_get_ops_result_mesg; dev->ops_get_dev_status_mesg = community_ops_get_dev_status_mesg; dev->ops_get_notify_mid_mesg = community_ops_get_notify_mid_mesg; bio_set_drv_api_version(dev); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_result(dev, OPS_COMM_SUCCESS); bio_set_notify_mid(dev, NOTIFY_COMM_IDLE); dev->enable = bio_dev_is_enable(dev, conf); driver_info *priv = g_new0 (driver_info, 1); dev->dev_priv = priv; priv->community_driver_id = UPEKTC_IMG_NAME; community_para_config(dev, conf); return 0; } biometric-authentication/src/drivers/community-multidevice/driver_internal.c0000644000175000017500000002102313755706021026630 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "driver_internal.h" // 探测设备 int device_discover(bio_dev *dev) { driver_info *priv = (driver_info *)dev->dev_priv; int i; int deviceNum = 0; key_t key; shared_number *share; // 申请一个key key = ftok ("/tmp/biometric_shared_file", 1234); priv->shmid = shmget (key, sizeof(shared_number), 0); priv->shmaddr = shmat (priv->shmid, NULL, 0); share = (shared_number *)(priv->shmaddr); // 没有设备返回空 if (!(share->devices->len)) { return 0; } else { for (i = 0; i < share->devices->len; ++i) { // 从设备集中通过索引选择设备 share->device = g_ptr_array_index (share->devices, i); // 获取驱动ID const char *drvId = fp_device_get_driver (share->device); if (strcmp((char *)drvId, priv->community_driver_id) == 0) { deviceNum++; share->device = g_ptr_array_index (share->devices, i); } else { return 0; } } } bio_print_debug ("discover device %s (%s) claimed by %s driver\n", fp_device_get_device_id (share->device), fp_device_get_name (share->device), fp_device_get_driver (share->device)); return deviceNum; } int set_fp_common_context(bio_dev *dev) { driver_info *priv = (driver_info *)dev->dev_priv; // 打开文件 priv->fd = open ("/tmp/biometric_shared_file", O_CREAT | O_RDWR, 0664); shared_number *share; // 申请一个key key_t key; key = ftok ("/tmp/biometric_shared_file", 1234); if (flock (priv->fd , LOCK_EX | LOCK_NB) != -1) { // 申请一个共享内存 priv->shmid = shmget (key, sizeof(shared_number), IPC_CREAT | 0666); // 映射共享内存 priv->shmaddr = shmat (priv->shmid, NULL, 0); // 清零空间 memset(priv->shmaddr, 0, sizeof(shared_number)); // 设置共享内存 share = (shared_number *)(priv->shmaddr); /*写数据到共享内存*/ // 获取上下文 share->ctx = fp_context_new (); // 获取设备集 share->devices = fp_context_get_devices (share->ctx); if (!(share->devices)) { bio_print_error ("Impossible to get devices"); return -1; } // 探测设备 device_discover (dev); share->d_count = 1; priv->ctx = share->ctx; priv->devices = share->devices; priv->device = share->device; } else { priv->shmid = shmget (key, sizeof(shared_number), 0); priv->shmaddr = shmat (priv->shmid, NULL, 0); share = (shared_number *)(priv->shmaddr); share->d_count++; priv->ctx = share->ctx; priv->devices = share->devices; priv->device = share->device; } return 0; } // 分配空间 void *buf_alloc(unsigned long size) { void *buf = malloc(size); memset(buf, 0, size); return buf; } // 清零空间 void buf_clean(void *buf, unsigned long size) { memset(buf, 0, size); return; } char *finger_capture(capture_data *user_data) { g_autoptr(GError) error = NULL; capture_data *captureData = user_data; // 私有结构体 driver_info *priv = (driver_info *)captureData->dev->dev_priv; // 异步控制标志位 priv->asyn_flag = ASYN_FALG_RUNNING; priv->timeused = 0; snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "capture start ! Please press your finger.\n"); bio_set_notify_abs_mid (captureData->dev, MID_EXTENDED_MESSAGE); bio_print_debug ("%s\n", bio_get_notify_mid_mesg(captureData->dev)); // 异步捕获 fp_device_capture (priv->device, true, priv->cancellable, (GAsyncReadyCallback) on_capture_completed, captureData); while (1) { usleep (100); // 异步结束 if (priv->asyn_flag == ASYN_FLAG_DONE) { break; } else { if (priv->timeused > priv->timeoutMS) { // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if (priv->asyn_flag == ASYN_FLAG_DONE) { bio_set_ops_abs_result (captureData->dev, OPS_CAPTURE_TIMEOUT); // 设置操作结果:录入超时 bio_set_notify_abs_mid (captureData->dev, NOTIFY_CAPTURE_TIMEOUT); // 用户提醒消息:录入超时 bio_set_dev_status (captureData->dev, DEVS_COMM_IDLE); // 设备状态:空闲状态 return NULL; } } } } priv->timeused += EM1600DEV_FINGER_CHECK_INTERVAL_MS; usleep (EM1600DEV_FINGER_CHECK_INTERVAL_MS * 1000); } // 状态被中断 if (priv->ctrlFlag == CONTROL_FLAG_STOPING) { bio_set_ops_result (captureData->dev, OPS_COMM_STOP_BY_USER); bio_set_notify_mid (captureData->dev, NOTIFY_COMM_STOP_BY_USER); bio_set_dev_status (captureData->dev, DEVS_COMM_IDLE); priv->ctrlFlag = CONTROL_FLAG_STOPPED; // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { sleep (1); if (priv->asyn_flag == ASYN_FLAG_DONE) return NULL; } } } } return captureData->feature_data; } int community_para_config(bio_dev * dev, GKeyFile *conf) { driver_info *priv = dev->dev_priv; char *key_file = NULL; priv->aes_key = NULL; GError *err = NULL; key_file = g_key_file_get_string (conf, dev->device_name, "AESKey", &err); if (err != NULL) { bio_print_warning (("Get AES Key File Error[%d]: %s, use default Key.\n"), err->code, err->message); g_error_free(err); priv->aes_key = malloc(strlen(DEFAULT_AES_KEY) + 1); memset (priv->aes_key, 0, strlen(DEFAULT_AES_KEY) + 1); sprintf ((char *)priv->aes_key, "%s", DEFAULT_AES_KEY); return 0; } if (access(key_file, F_OK | R_OK) != 0) { bio_print_warning (("AES Key File (%s) does not Exist or has no Read " "Permission, use default key.\n"), key_file); priv->aes_key = malloc(strlen(DEFAULT_AES_KEY) + 1); memset (priv->aes_key, 0, strlen(DEFAULT_AES_KEY) + 1); sprintf ((char *)priv->aes_key, "%s", DEFAULT_AES_KEY); return 0; } FILE *fp = NULL; int len = 0; int read_len = 0; fp = fopen (key_file, "r"); if (fp == NULL) { bio_print_warning (("Can not open AES Key File: %s, use default key.\n"), key_file); priv->aes_key = malloc(strlen(DEFAULT_AES_KEY) + 1); memset (priv->aes_key, 0, strlen(DEFAULT_AES_KEY) + 1); sprintf ((char *)priv->aes_key, "%s", DEFAULT_AES_KEY); return 0; } fseek (fp, 0, SEEK_END); len = ftell (fp); if (len == 0) { bio_print_warning (("AES Key File is Enpty, use default Key.\n")); fclose (fp); priv->aes_key = malloc(strlen(DEFAULT_AES_KEY) + 1); memset (priv->aes_key, 0, strlen(DEFAULT_AES_KEY) + 1); sprintf ((char *)priv->aes_key, "%s", DEFAULT_AES_KEY); return 0; } if (len > DEFAULT_AES_KEY_MAX_LEN) len = DEFAULT_AES_KEY_MAX_LEN; priv->aes_key = malloc(len + 1); memset (priv->aes_key, 0, len + 1); fseek (fp, 0, SEEK_SET); read_len = fread (priv->aes_key, 1, len, fp); priv->aes_key[read_len * 1] = 0; fclose (fp); if (priv->aes_key[0] == '\0') { bio_print_warning (("AES Key is Enpty, use default Key.\n")); free (priv->aes_key); priv->aes_key = malloc(strlen(DEFAULT_AES_KEY) + 1); memset (priv->aes_key, 0, strlen(DEFAULT_AES_KEY) + 1); sprintf ((char *)priv->aes_key, "%s", DEFAULT_AES_KEY); } return 0; } int community_internal_aes_encrypt(unsigned char *in, int len, unsigned char *key, unsigned char *out) { if (!in || !key || !out) return -1; unsigned char iv[AES_BLOCK_SIZE] = {0}; // 初始偏移向量IV int i = 0; for (i = 0; i < AES_BLOCK_SIZE; i++) iv[i] = i; AES_128_CFB_Encrypt(key, iv, in, len, out); return 0; } int community_internal_aes_decrypt(unsigned char *in, int len, unsigned char *key, unsigned char *out) { if (!in || !key || !out) return -1; unsigned char iv[AES_BLOCK_SIZE] = {0}; // 初始偏移向量IV int i = 0; for (i = 0; i < AES_BLOCK_SIZE; i++) iv[i] = i; AES_128_CFB_Decrypt (key, iv, in, len, out); return 0; } biometric-authentication/src/drivers/community-multidevice/community_define.h0000644000175000017500000000451113755706021027007 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef COMMUNITY_DEFINE_H #define COMMUNITY_DEFINE_H #include enum { UPEKTS_ID = 1, URU4000_ID = 2, AES4000_ID = 3, AES2501_ID = 4, UPEKTC_ID = 5, AES1610_ID = 6, FDU2000_ID = 7, VCOM5S_ID = 8, UPEKSONLY_ID= 9, VFS101_ID = 10, VFS301_ID = 11, AES2550_ID = 12, AES1660_ID = 13, AES2660_ID = 14, AES3500_ID = 15, UPEKTC_IMG_ID= 16, ETES603_ID = 17, VFS5011_ID = 18, VFS0050_ID = 19, ELAN_ID = 20, COMMUNITY_MULTIDEVICE_MAX_ID, }; #define UPEKTS_NAME "upekts" #define URU4000_NAME "uru4000" #define AES4000_NAME "aes4000" #define AES2501_NAME "aes2501" #define UPEKTC_NAME "upektc" #define AES1610_NAME "aes1610" #define FDU2000_NAME "fdu2000" #define VCOM5S_NAME "vcom5s" #define UPEKSONLY_NAME "upeksonly" #define VFS101_NAME "vfs101" #define VFS301_NAME "vfs301" #define AES2550_NAME "aes2550" #define AES1660_NAME "aes1660" #define AES2660_NAME "aes2660" #define AES3500_NAME "aes3500" #define UPEKTC_IMG_NAME "upektc_img" #define ETES603_NAME "etes603" #define VFS5011_NAME "vfs5011" #define VFS0050_NAME "vfs0050" #define ELAN_NAME "elan" #ifndef BIOMETRIC_DRIVER_COMMUNITY_MULTIDEVICE_DOMAIN_NAME #define BIOMETRIC_DRIVER_COMMUNITY_MULTIDEVICE_DOMAIN_NAME \ "biometric-driver-community-multidevice" #endif #ifndef LOCALEDIR #define LOCALEDIR "/usr/local/share/locale/" #endif #define _(String) dgettext (BIOMETRIC_DRIVER_COMMUNITY_MULTIDEVICE_DOMAIN_NAME, String) #define N_(String) (String) #endif // COMMUNITY_DEFINE_H biometric-authentication/src/drivers/community-multidevice/aes_128_cfb.c0000644000175000017500000002425413755706021025426 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include "aes_128_cfb.h" static unsigned char SBox[] = { /*0 1 2 3 4 5 6 7 8 9 a b c d e f */ 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, /*0*/ 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, /*1*/ 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, /*2*/ 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, /*3*/ 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, /*4*/ 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, /*5*/ 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, /*6*/ 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, /*7*/ 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, /*8*/ 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, /*9*/ 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, /*a*/ 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, /*b*/ 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, /*c*/ 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, /*d*/ 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, /*e*/ 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 /*f*/ }; static unsigned char InvSBox[] = { /*0 1 2 3 4 5 6 7 8 9 a b c d e f */ 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, /*0*/ 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, /*1*/ 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, /*2*/ 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, /*3*/ 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, /*4*/ 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, /*5*/ 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, /*6*/ 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, /*7*/ 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, /*8*/ 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, /*9*/ 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, /*a*/ 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, /*b*/ 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, /*c*/ 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, /*d*/ 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, /*e*/ 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d /*f*/ }; void keyExpansion(unsigned char* key, unsigned char w[][4][4]) { int i, j, r, c; unsigned char rc[] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36}; for (r = 0; r < 4; r++) for (c = 0; c < 4; c++) w[0][r][c] = key[r + c * 4]; for (i = 1; i <= 10; i++) for (j = 0; j < 4; j++) { unsigned char t[4]; for (r = 0; r < 4; r++) t[r] = j ? w[i][r][j - 1] : w[i - 1][r][3]; if (j == 0) { unsigned char temp = t[0]; for (r = 0; r < 3; r++) { t[r] = SBox[t[(r + 1) % 4]]; } t[3] = SBox[temp]; t[0] ^= rc[i - 1]; } for (r = 0; r < 4; r++) w[i][r][j] = w[i - 1][r][j] ^ t[r]; } } unsigned char* cipher(unsigned char* input, unsigned char* output, unsigned char w[][4][4]) { unsigned char state[4][4]; int i, r, c; for (r = 0; r < 4; r++) for (c = 0; c < 4; c++) state[r][c] = input[c * 4 + r]; addRoundKey(state, w[0]); for (i = 1; i <= 10; i++) { subBytes(state); shiftRows(state); if (i != 10) mixColumns(state); addRoundKey(state, w[i]); } for (r = 0; r < 4; r++) for (c = 0; c < 4; c++) output[c * 4 + r] = state[r][c]; return output; } unsigned char* invCipher(unsigned char* input, unsigned char* output, unsigned char w[][4][4]) { unsigned char state[4][4]; int i, r, c; for (r = 0; r < 4; r++) for (c = 0; c < 4; c++) state[r][c] = input[c * 4 + r]; addRoundKey(state, w[10]); for (i = 9; i >= 0; i--) { invShiftRows(state); invSubBytes(state); addRoundKey(state, w[i]); if (i) invMixColumns(state); } for (r = 0; r < 4; r++) for (c = 0; c < 4; c++) output[c * 4 + r] = state[r][c]; return (output); } unsigned char FFmul(unsigned char a, unsigned char b) { unsigned char bw[4]; unsigned char res = 0; int i; bw[0] = b; for (i = 1; i < 4; i++) { bw[i] = bw[i - 1] << 1; if (bw[i - 1] & 0x80) bw[i] ^= 0x1b; } for (i = 0; i < 4; i++) if ((a >> i) & 0x01) res ^= bw[i]; return res; } void subBytes(unsigned char state[][4]) { int r, c; for (r = 0; r < 4; r++) for (c = 0; c < 4; c++) state[r][c] = SBox[state[r][c]]; } void shiftRows(unsigned char state[][4]) { unsigned char t[4]; int r, c; for (r = 1; r < 4; r++) { for (c = 0; c < 4; c++) t[c] = state[r][(c + r) % 4]; for (c = 0; c < 4; c++) state[r][c] = t[c]; } } void mixColumns(unsigned char state[][4]) { unsigned char t[4]; int r, c; for (c = 0; c < 4; c++) { for (r = 0; r < 4; r++) t[r] = state[r][c]; for (r = 0; r < 4; r++) state[r][c] = FFmul(0x02, t[r]) ^ FFmul(0x03, t[(r + 1) % 4]) ^ FFmul(0x01, t[(r + 2) % 4]) ^ FFmul(0x01, t[(r + 3) % 4]); } } void invSubBytes(unsigned char state[][4]) { int r, c; for (r = 0; r < 4; r++) for (c = 0; c < 4; c++) state[r][c] = InvSBox[state[r][c]]; } void invShiftRows(unsigned char state[][4]) { unsigned char t[4]; int r, c; for (r = 1; r < 4; r++) { for (c = 0; c < 4; c++) t[c] = state[r][(c - r + 4) % 4]; for (c = 0; c < 4; c++) state[r][c] = t[c]; } } void invMixColumns(unsigned char state[][4]) { unsigned char t[4]; int r, c; for (c = 0; c < 4; c++) { for (r = 0; r < 4; r++) t[r] = state[r][c]; for (r = 0; r < 4; r++) state[r][c] = FFmul(0x0e, t[r]) ^ FFmul(0x0b, t[(r + 1) % 4]) ^ FFmul(0x0d, t[(r + 2) % 4]) ^ FFmul(0x09, t[(r + 3) % 4]); } } void addRoundKey(unsigned char state[][4], unsigned char k[][4]) { int r, c; for (c = 0; c < 4; c++) for (r = 0; r < 4; r++) state[r][c] ^= k[r][c]; } /**************************************************************/ int AES_128_CFB_Encrypt(unsigned char* key, unsigned char* iv, unsigned char* inData, int inLen, unsigned char* outData) { bool firstRound = true; int r = 0; int rounds = 0; int start = 0; int end = 0; int outLen = 0; unsigned char input[16] = {0}; unsigned char output[16] = {0}; unsigned char plainText[16] = {0}; unsigned char cipherText[16] = {0}; static unsigned char w[11][4][4] = {0}; memset(outData, 0, inLen); keyExpansion(key, w); if (inLen % 16 == 0) rounds = inLen / 16; else rounds = inLen / 16 + 1; for (r = 0; r < rounds; r++) { start = r * 16; end = r * 16 + 16; if (end > inLen) end = inLen; memset(plainText, 0, 16); memcpy(plainText, inData + start, end - start); if (firstRound == true) { cipher(iv, output, w); firstRound = false; } else cipher(input, output, w); int i; for (i = 0; i < 16; i++) if ((end - start) - 1 < i) cipherText[i] = 0 ^ output[i]; else cipherText[i] = plainText[i] ^ output[i]; for (i = 0; i < end - start; i++) outData[outLen++] = cipherText[i]; memcpy(input, cipherText, 16); } return outLen; } int AES_128_CFB_Decrypt(unsigned char* key, unsigned char* iv, unsigned char* inData, int inLen, unsigned char* outData) { bool firstRound = true; int r = 0; int rounds = 0; int start = 0; int end = 0; int outLen = 0; unsigned char input[16] = {0}; unsigned char output[16] = {0}; unsigned char cipherText[16] = {0}; unsigned char plainText[16] = {0}; static unsigned char w[11][4][4] = {0}; memset(outData, 0, inLen); keyExpansion(key, w); if (inLen % 16 == 0) rounds = inLen / 16; else rounds = inLen / 16 + 1; for (r = 0; r < rounds; r++) { start = r * 16; end = start + 16; if (end > inLen) end = inLen; memset(cipherText, 0, 16); memcpy(cipherText, inData + start, end - start); if (firstRound == true) { cipher(iv, output, w); firstRound = false; } else cipher(input, output, w); int i; for (i = 0; i < 16; i++) if (end - start - 1 < i) plainText[i] = output[i] ^ 0; else plainText[i] = output[i] ^ cipherText[i]; for (i = 0; i < end - start; i++) outData[outLen++] = plainText[i]; memcpy(input, cipherText, 16); } return outLen; } biometric-authentication/src/drivers/community-multidevice/Makefile.am0000644000175000017500000000002213517470404025324 0ustar fengfengSUBDIRS = drivers biometric-authentication/src/drivers/community-multidevice/community_ops.c0000644000175000017500000006672613757133715026377 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "community_ops.h" /* * 驱动初始化函数 */ int community_ops_driver_init(bio_dev *dev) { bio_print_debug ("bio_drv_demo_ops_driver_init start\n"); // 私有结构体 driver_info *priv = (driver_info *)dev->dev_priv; // 私有结构体超时时间成员变量设置初值为:框架通用的操作超时时间 priv->timeoutMS = bio_get_ops_timeout_ms (); // 私有结构体控制标志成员变量设置初值为:CONTROL_FLAG_IDLE priv->ctrlFlag = CONTROL_FLAG_IDLE; priv->cancellable = NULL; // 获取通用的context set_fp_common_context (dev); bio_print_debug ("bio_drv_demo_ops_driver_init end\n"); return 0; } /* * 设备检测函数 */ int community_ops_discover(bio_dev *dev) { bio_print_debug ("bio_drv_demo_ops_discover start\n"); int ret = 0; if ((strcmp(getenv("BIO_PRINT_LEVEL"), "7") == 0) && (strcmp(getenv("BIO_PRINT_COLOR"), "1") == 0)) setenv ("G_MESSAGES_DEBUG", "all", 0); // 探测设备 ret = device_discover (dev); if ( ret < 0 ) { bio_print_info (_("No %s fingerprint device detected\n"), dev->device_name); return -1; } if ( ret == 0 ) { bio_print_info (_("No %s fingerprint device detected\n"), dev->device_name); return 0; } bio_print_debug ("bio_drv_demo_ops_discover end\n"); return ret; } /* * 驱动释放函数 */ void community_ops_free(bio_dev *dev) { bio_print_debug ("bio_drv_demo_ops_free start\n"); driver_info *priv = (driver_info *)dev->dev_priv; key_t key; shared_number *share; // 申请一个key key = ftok ("/tmp/biometric_shared_file", 1234); priv->shmid = shmget (key, sizeof(shared_number), 0); priv->shmaddr = shmat (priv->shmid, NULL, 0); share = (shared_number *)(priv->shmaddr); share->d_count--; if (share->d_count == 0) { // 资源释放 g_object_unref (priv->ctx); priv->devices = NULL; priv->device = NULL; // 解映射 shmdt (priv->shmaddr); // 释放共享内存 shmctl (priv->shmid, IPC_RMID, NULL); } // 关闭文件描述符 close (priv->fd); bio_print_debug ("bio_drv_demo_ops_free end\n"); } /* * 设备打开函数 */ int community_ops_open(bio_dev *dev) { bio_print_debug ("bio_drv_demo_ops_open start\n"); // 私有结构体 driver_info *priv = (driver_info *)dev->dev_priv; priv->asyn_flag = ASYN_FALG_RUNNING; // 私有结构体控制变量成员设置为:CONTROL_FLAG_RUNNING priv->ctrlFlag = CONTROL_FLAG_RUNNING; if (dev->enable == false) { bio_set_dev_status (dev, DEVS_COMM_DISABLE); //设备状态设置为:设备被禁用 bio_set_ops_result (dev, OPS_COMM_ERROR); //操作结果设置为:通用操作错误 bio_set_notify_abs_mid (dev, NOTIFY_COMM_DISABLE); //提示消息设置为:设备不可用 return -1; } bio_set_dev_status (dev, DEVS_OPEN_DOING); //设备状态设置为:正在打开设备 // 创建一个GCancellable priv->cancellable = g_cancellable_new (); // 启动异步操作打开设备 fp_device_open (priv->device, NULL, (GAsyncReadyCallback)on_device_opened, dev); while (1) { usleep (100); if (priv->asyn_flag == ASYN_FLAG_DONE) { break; } else { if (priv->timeused > priv->timeoutMS) { // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if(priv->asyn_flag == ASYN_FLAG_DONE) { bio_set_ops_abs_result (dev, OPS_OPEN_FAIL); // 设置操作结果:打开设备失败 bio_set_notify_abs_mid (dev, NOTIFY_OPEN_FAIL); // 用户提醒消息:打开设备失败 bio_set_dev_status (dev, DEVS_COMM_IDLE); // 设备状态:空闲状态 return -1; } } } } priv->timeused += EM1600DEV_FINGER_CHECK_INTERVAL_MS; usleep (EM1600DEV_FINGER_CHECK_INTERVAL_MS * 1000); } } // 设置状态 bio_set_dev_status (dev, DEVS_COMM_IDLE); //当前状态设置为:空闲状态 bio_set_ops_abs_result (dev, OPS_OPEN_SUCCESS); //操作结果设置为:打开设备成功 bio_set_notify_abs_mid (dev, NOTIFY_OPEN_SUCCESS); //提示消息设置为:打开设备成功 bio_print_debug ("bio_drv_demo_ops_open end\n"); return 0; } /* * 设备关闭函数 */ void community_ops_close(bio_dev *dev) { bio_print_debug ("bio_drv_demo_ops_close start\n"); // 私有结构体 driver_info *priv = (driver_info *)dev->dev_priv; priv->asyn_flag = ASYN_FALG_RUNNING; if (dev->enable == false) { bio_set_dev_status (dev, DEVS_COMM_DISABLE); //设备状态设置为:设备被禁用 bio_set_ops_result (dev, OPS_COMM_ERROR); //操作结果设置为:通用操作错误 bio_set_notify_abs_mid (dev, NOTIFY_COMM_DISABLE); //提示消息设置为:设备不可用 } // 异步关闭 fp_device_close (priv->device, NULL, (GAsyncReadyCallback)on_device_closed, dev); while (1) { usleep (100); if (priv->asyn_flag == ASYN_FLAG_DONE) { break; } else { if (priv->timeused > priv->timeoutMS) { // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if(priv->asyn_flag == ASYN_FLAG_DONE) { bio_set_ops_abs_result (dev, OPS_CLOSE_FAIL); // 设置操作结果:关闭设备失败 bio_set_notify_abs_mid (dev, NOTIFY_CLOSE_FAIL); // 用户提醒消息:关闭设备失败 bio_set_dev_status (dev, DEVS_COMM_IDLE); // 设备状态:空闲状态 return; } } } } priv->timeused += EM1600DEV_FINGER_CHECK_INTERVAL_MS; usleep (EM1600DEV_FINGER_CHECK_INTERVAL_MS * 1000); } } priv->ctrlFlag = CONTROL_FLAG_IDLE; bio_print_debug ("bio_drv_demo_ops_close end\n"); return; } /* * 特征捕获函数,用来捕获生物特征信息 */ char *community_ops_capture(bio_dev *dev, OpsActions action) { bio_print_debug ("bio_drv_demo_ops_capture start\n"); capture_data *captureData = malloc(sizeof(capture_data)); captureData->dev = dev; captureData->feature_data = NULL; captureData->feature_encode = NULL; //设备驱动不启用 if (dev->enable == false) { bio_set_dev_status (dev, DEVS_COMM_DISABLE); //设备状态设置为:设备被禁用 bio_set_ops_result (dev, OPS_COMM_ERROR); //操作结果设置为:通用操作错误 bio_set_notify_abs_mid (dev, NOTIFY_COMM_DISABLE); //提示消息设置为:设备不可用 return NULL; } bio_set_dev_status (dev, DEVS_CAPTURE_DOING); //设备状态设置为:正在捕获信息 if (dev->bioinfo.eigtype == EigT_Data) { // 原始数据 captureData->feature_data = finger_capture (captureData); if (captureData->feature_data == NULL) return NULL; bio_set_dev_status (dev, DEVS_COMM_IDLE); //当前状态设置为:空闲状态 bio_set_ops_result (dev, OPS_CAPTURE_SUCCESS); //操作结果设置为:捕获成功 bio_set_notify_abs_mid (dev, NOTIFY_CAPTURE_SUCCESS); //提示消息设置为:捕获成功 bio_print_debug ("bio_drv_demo_ops_capture end 1\n"); return captureData->feature_data; } else if (dev->bioinfo.eigtype == EigT_Eigenvalue || dev->bioinfo.eigtype == EigT_Eigenvector) { //特征值或者特征向量非纯字符串 captureData->feature_data = finger_capture(captureData); if (captureData->feature_data == NULL) return NULL; // 64编码 bio_base64_encode ((guchar *)captureData->feature_data, captureData->feature_encode, (sizeof(captureData->feature_encode))); bio_set_dev_status (dev, DEVS_COMM_IDLE); //当前状态设置为:空闲状态 bio_set_ops_result (dev, OPS_CAPTURE_SUCCESS); //操作结果设置为:捕获成功 bio_set_notify_abs_mid (dev, NOTIFY_CAPTURE_SUCCESS); //提示消息设置为:捕获成功 bio_print_debug ("bio_drv_demo_ops_capture end 2\n"); return captureData->feature_encode; } else { bio_set_dev_status (dev, DEVS_COMM_IDLE); //当前状态设置为:空闲状态 bio_set_ops_result (dev, OPS_CAPTURE_FAIL); //操作结果设置为:捕获失败 bio_set_notify_abs_mid (dev, NOTIFY_CAPTURE_FAIL); //提示消息设置为:捕获失败 bio_print_debug ("bio_drv_demo_ops_capture end 3\n"); return NULL; } } /* * 特征录入函数,用来录入用户的生物特征信息 */ int community_ops_enroll(bio_dev *dev, OpsActions action, int uid, int idx, char *bio_idx_name) { bio_print_debug ("bio_drv_demo_ops_enroll start\n"); // 用于获取可用索引 if (idx == -1) idx = bio_common_get_empty_index (dev, uid, 0, -1); //设备驱动不启用 if (dev->enable == false) { bio_set_dev_status (dev, DEVS_COMM_DISABLE); //设备状态设置为:设备被禁用 bio_set_ops_result (dev, OPS_COMM_ERROR); //操作结果设置为:通用操作错误 bio_set_notify_abs_mid (dev, NOTIFY_COMM_DISABLE); //提示消息设置为:设备不可用 return -1; } bio_set_dev_status (dev, DEVS_ENROLL_DOING); //设备状态设置为:正在录入 driver_info *priv = (driver_info *)dev->dev_priv; FpPrint *print_template = NULL; g_autoptr(GError) error = NULL; enroll_data *enrollData ; enrollData = (enroll_data *)malloc(sizeof(enroll_data)); enrollData->dev = dev; enrollData->uid = uid; enrollData->idx = idx; enrollData->bio_idx_name = bio_idx_name; priv->asyn_flag = ASYN_FALG_RUNNING; priv->timeused = 0; // 生成指纹模板 print_template = print_create_template (priv->device, 1, dev); snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "enroll start ! Please press your finger.\n"); bio_set_notify_abs_mid (dev, MID_EXTENDED_MESSAGE); bio_print_debug ("%s\n", bio_get_notify_mid_mesg(dev)); // 启动异步操作以进行打印 fp_device_enroll (priv->device, print_template, priv->cancellable, on_enroll_progress, enrollData, NULL, (GAsyncReadyCallback)on_enroll_completed, enrollData); while (1) { usleep (100); // 异步结束 if (priv->asyn_flag == ASYN_FLAG_DONE){ break; } else { if (priv->timeused > priv->timeoutMS) { // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if(priv->asyn_flag == ASYN_FLAG_DONE) { bio_set_ops_abs_result (enrollData->dev, OPS_ENROLL_TIMEOUT); // 设置操作结果:录入超时 bio_set_notify_abs_mid (enrollData->dev, NOTIFY_ENROLL_TIMEOUT); // 用户提醒消息:录入超时 bio_set_dev_status (enrollData->dev, DEVS_COMM_IDLE); // 设备状态:空闲状态 return -1; } } } } priv->timeused += EM1600DEV_FINGER_CHECK_INTERVAL_MS; usleep (EM1600DEV_FINGER_CHECK_INTERVAL_MS * 1000); } // 状态被中断 if (priv->ctrlFlag == CONTROL_FLAG_STOPING) { bio_set_ops_result (enrollData->dev, OPS_COMM_STOP_BY_USER); bio_set_notify_mid (enrollData->dev, NOTIFY_COMM_STOP_BY_USER); bio_set_dev_status (enrollData->dev, DEVS_COMM_IDLE); priv->ctrlFlag = CONTROL_FLAG_STOPPED; // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if (priv->asyn_flag == ASYN_FLAG_DONE) return -1; } } } } bio_print_debug ("bio_drv_demo_ops_enroll end\n"); return 0; } /* * 特征验证函数,使用当前生物特征与指定特征对比,判断是否是同一个特征 */ int community_ops_verify(bio_dev *dev, OpsActions action, int uid, int idx) { bio_print_debug ("bio_drv_demo_ops_verify start\n"); if (dev->enable == FALSE) { // 设备不可用 bio_set_dev_status(dev, DEVS_COMM_DISABLE); return -1; } bio_set_dev_status (dev, DEVS_VERIFY_DOING); // 设备状态:正在验证 driver_info *priv = (driver_info *)dev->dev_priv; feature_info *info_list = NULL; FpPrint *verify_print = NULL; const guchar *stored_data = NULL; guchar *template_data = NULL; guchar *feature_data = NULL; gsize stored_len; g_autoptr(GError) error = NULL; priv->asyn_flag = ASYN_FALG_RUNNING; priv->timeused = 0; // 连接数据库 sqlite3 *db = bio_sto_connect_db (); // 从数据库中获取特征列表 info_list = bio_sto_get_feature_info (db, uid, dev->bioinfo.biotype, dev->device_name, idx, idx); // 打印特征列表 print_feature_info (info_list); // 断开数据库 bio_sto_disconnect_db (db); feature_sample *sample = info_list->sample; template_data = buf_alloc (sample->no); feature_data = buf_alloc (sample->no); stored_data = buf_alloc (sample->no); stored_len = sample->no; // base64解码 bio_base64_decode (sample->data, feature_data); // 解密 community_internal_aes_decrypt (feature_data, sample->no, priv->aes_key, template_data); stored_data = (const guchar *)template_data; // 将数据库中的值反序列化 verify_print = fp_print_deserialize (stored_data, stored_len, &error); if (error) { g_warning ("Error deserializing data: %s", error->message); return -1; } // 回收资源 free (template_data); // 回收特征数据项 bio_sto_free_feature_info_list (info_list); snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "verify start ! Please press your finger.\n"); bio_set_notify_abs_mid (dev, MID_EXTENDED_MESSAGE); bio_print_debug ("%s\n", bio_get_notify_mid_mesg(dev)); // 异步验证 fp_device_verify (priv->device, verify_print, priv->cancellable, on_match_cb_verify, dev, NULL, (GAsyncReadyCallback) on_verify_completed, dev); while (1) { usleep (100); // 异步结束 if (priv->asyn_flag == ASYN_FLAG_DONE) { break; } else { if(priv->timeused > priv->timeoutMS) { // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if(priv->asyn_flag == ASYN_FLAG_DONE) { bio_set_ops_abs_result (dev, OPS_VERIFY_TIMEOUT); // 设置操作结果:验证超时 bio_set_notify_abs_mid (dev, NOTIFY_VERIFY_TIMEOUT); // 用户提醒消息:验证超时 bio_set_dev_status (dev, DEVS_COMM_IDLE); // 设备状态:空闲状态 return -1; } } } } priv->timeused += EM1600DEV_FINGER_CHECK_INTERVAL_MS; usleep (EM1600DEV_FINGER_CHECK_INTERVAL_MS * 1000); } // 状态被中断 if (priv->ctrlFlag == CONTROL_FLAG_STOPING) { bio_set_ops_result (dev, OPS_COMM_STOP_BY_USER); bio_set_notify_mid (dev, NOTIFY_COMM_STOP_BY_USER); bio_set_dev_status (dev, DEVS_COMM_IDLE); priv->ctrlFlag = CONTROL_FLAG_STOPPED; // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if (priv->asyn_flag == ASYN_FLAG_DONE) return -1; } } } } bio_set_dev_status (dev, DEVS_COMM_IDLE); bio_print_debug ("bio_drv_demo_ops_verify end\n"); return 0; } /* * 特征识别函数,使用当前生物特征与指定范围的特征比对,识别出当前特征与指定范围内的哪个特征匹配 */ int community_ops_identify(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end) { bio_print_debug ("bio_drv_demo_ops_identify start\n"); GPtrArray *prints = NULL; identify_data *identifyData = malloc(sizeof(identify_data)); identifyData->dev = dev; identifyData->uid = uid; identifyData->idx_start = idx_start; identifyData->idx_end = idx_end; // 设备不可用 if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); return -1; } bio_set_dev_status (dev, OPS_TYPE_IDENTIFY); // 设备状态设置为:正在识别指定特征 // 验证特征操作放在此处 driver_info *priv = (driver_info *)dev->dev_priv; // 异步控制标志 priv->asyn_flag = ASYN_FALG_RUNNING; priv->timeused = 0; // 创建指纹集 prints = create_prints(dev, uid, idx_start, idx_end); snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "identify start ! Please press your finger.\n"); bio_set_notify_abs_mid (dev, MID_EXTENDED_MESSAGE); bio_print_debug ("%s\n", bio_get_notify_mid_mesg(dev)); // 异步识别 fp_device_identify (priv->device, prints, priv->cancellable, on_match_cb_identify, identifyData, NULL, (GAsyncReadyCallback)on_device_identify, dev); while (1) { usleep (100); // 异步结束 if (priv->asyn_flag == ASYN_FLAG_DONE) { break; } else { if (priv->timeused > priv->timeoutMS) { // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if(priv->asyn_flag == ASYN_FLAG_DONE) { bio_set_ops_abs_result (identifyData->dev, OPS_IDENTIFY_TIMEOUT); // 设置操作结果:识别超时 bio_set_notify_abs_mid (identifyData->dev, NOTIFY_IDENTIFY_TIMEOUT); // 用户提醒消息:识别超时 bio_set_dev_status (identifyData->dev, DEVS_COMM_IDLE); // 设备状态:空闲状态 return -1; } } } } priv->timeused += EM1600DEV_FINGER_CHECK_INTERVAL_MS; usleep (EM1600DEV_FINGER_CHECK_INTERVAL_MS * 1000); } // 状态被中断 if (priv->ctrlFlag == CONTROL_FLAG_STOPING) { bio_set_ops_result (identifyData->dev, OPS_COMM_STOP_BY_USER); bio_set_notify_mid (identifyData->dev, NOTIFY_COMM_STOP_BY_USER); bio_set_dev_status (identifyData->dev, DEVS_COMM_IDLE); priv->ctrlFlag = CONTROL_FLAG_STOPPED; // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if (priv->asyn_flag == ASYN_FLAG_DONE) return -1; } } } } bio_set_dev_status (dev, DEVS_COMM_IDLE); bio_print_debug ("bio_drv_demo_ops_identify end\n"); return identifyData->uid; } /* * 特征搜索函数,使用当前生物特征与指定范围的特征比对,搜索出指定范围内所有匹配的特征 */ feature_info *community_ops_search(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end) { bio_print_debug ("bio_drv_demo_ops_search start\n"); GPtrArray *prints = NULL; search_data *searchData = malloc(sizeof(search_data)); searchData->dev = dev; searchData->uid = uid; searchData->idx_start = idx_start; searchData->idx_end = idx_end; searchData->index = 0; searchData->found = NULL; searchData->found_head.next = NULL; // found_head的下一个特征信息指向空 searchData->found = &(searchData->found_head); // found指针指向found_head // 设备不可用 if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); return NULL; } bio_set_dev_status (dev, OPS_TYPE_SEARCH); // 设备状态设置为:正在搜索指定特征 // 验证特征操作放在此处 driver_info *priv = (driver_info *)dev->dev_priv; snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "search start ! Please press your finger.\n"); bio_set_notify_abs_mid (dev, MID_EXTENDED_MESSAGE); bio_print_debug ("%s\n", bio_get_notify_mid_mesg(dev)); while (priv->ctrlFlag != CONTROL_FLAG_DONE) { // 异步控制标志位 priv->asyn_flag = ASYN_FALG_RUNNING; priv->timeused = 0; // 创建指纹集 prints = create_prints(dev, uid, searchData->index, idx_end); // 异步识别 fp_device_identify (priv->device, prints, priv->cancellable, on_match_cb_search, searchData, NULL, (GAsyncReadyCallback)on_device_identify, dev); while (1) { usleep (100); // 异步结束 if (priv->asyn_flag == ASYN_FLAG_DONE){ break; } else { if (priv->timeused > priv->timeoutMS) { // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if (priv->asyn_flag == ASYN_FLAG_DONE) { bio_set_ops_abs_result (dev, OPS_SEARCH_TIMEOUT); // 设置操作结果:搜索超时 bio_set_notify_abs_mid (dev, NOTIFY_SEARCH_TIMEOUT); // 用户提醒消息:搜索超时 bio_set_dev_status (dev, DEVS_COMM_IDLE); // 设备状态:空闲状态 return NULL; } } } } priv->timeused += EM1600DEV_FINGER_CHECK_INTERVAL_MS; usleep (EM1600DEV_FINGER_CHECK_INTERVAL_MS * 1000); } // 状态被中断 if (priv->ctrlFlag == CONTROL_FLAG_STOPING) { bio_set_ops_result(dev, OPS_COMM_STOP_BY_USER); bio_set_notify_mid(dev, NOTIFY_COMM_STOP_BY_USER); bio_set_dev_status(dev, DEVS_COMM_IDLE); priv->ctrlFlag = CONTROL_FLAG_STOPPED; // 取消libfprint库异步操作 g_cancellable_cancel (priv->cancellable); // 判断取消是否成功 if (g_cancellable_is_cancelled (priv->cancellable)) { while (1) { usleep (100); if (priv->asyn_flag == ASYN_FLAG_DONE) return NULL; } } } } searchData->index = searchData->index + 1; } if (searchData->found) { snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "_search fingerprint template successful"); bio_set_ops_abs_result (searchData->dev, OPS_SEARCH_MATCH); bio_set_notify_abs_mid (searchData->dev, NOTIFY_SEARCH_MATCH); bio_set_notify_abs_mid (searchData->dev, MID_EXTENDED_MESSAGE); bio_print_info("%s\n", bio_get_notify_mid_mesg(searchData->dev)); } else { snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "_search fingerprint template fail"); bio_set_ops_abs_result (searchData->dev, OPS_SEARCH_NO_MATCH); bio_set_notify_abs_mid (searchData->dev, NOTIFY_SEARCH_NO_MATCH); bio_set_notify_abs_mid (searchData->dev, MID_EXTENDED_MESSAGE); bio_print_info ("%s\n", bio_get_notify_mid_mesg(searchData->dev)); } bio_set_dev_status (dev, DEVS_COMM_IDLE); bio_print_debug ("bio_drv_demo_ops_search end\n"); return searchData->found; } /* * 特征清理(删除)函数,删除指定范围内的所有特征 */ int community_ops_clean(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end) { bio_print_debug ("bio_drv_demo_ops_clean start\n"); if (dev->enable == FALSE) { // 设备不可用 bio_set_dev_status(dev, DEVS_COMM_DISABLE); return 0; } bio_set_dev_status (dev, DEVS_CLEAN_DOING); // 设备状态设置为:正在清理特征数据 sqlite3 *db; int ret = 0; // 连接数据库 db = bio_sto_connect_db (); // 从数据库中删除特征 ret = bio_sto_clean_feature_info (db, uid, dev->bioinfo.biotype, dev->device_name, idx_start, idx_end); // 断开数据库 bio_sto_disconnect_db (db); if (ret == 0) { bio_set_ops_abs_result (dev, OPS_CLEAN_SUCCESS); // 操作结果设置为:清理特征成功 bio_set_notify_abs_mid (dev, NOTIFY_CLEAN_SUCCESS); // 用户提示设置为:清理特征成功 } else { bio_set_ops_result (dev, OPS_CLEAN_FAIL); // 操作结果设置为:清理特征失败 bio_set_notify_abs_mid (dev, NOTIFY_CLEAN_FAIL); // 用户提示设置为:清理特征失败 } bio_set_dev_status (dev, DEVS_COMM_IDLE); return ret; } /* * 获取指定设备的特征列表 */ feature_info *community_ops_get_feature_list(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end) { bio_print_debug ("bio_drv_demo_ops_get_feature_list start\n"); feature_info *found = NULL; driver_info *priv = (driver_info *)dev->dev_priv; if (dev->enable == FALSE) { // 设备不可用 bio_set_dev_status(dev, DEVS_COMM_DISABLE); return NULL; } bio_set_dev_status (dev, OPS_TYPE_GET_FLIST); // 设备状态设置为:正在获取特征列表 // 连接数据库 sqlite3 *db = bio_sto_connect_db (); // 从数据库中获取特征列表 found = bio_sto_get_feature_info (db, uid, dev->bioinfo.biotype, dev->device_name, idx_start, idx_end); // 打印特征列表 print_feature_info (found); // 断开数据库 bio_sto_disconnect_db (db); // 设置状态 snprintf (priv->extra_info, EXTRA_INFO_LENGTH, "_get_feature_list fingerprint template seccessful"); bio_set_dev_status (dev, DEVS_COMM_IDLE); bio_set_ops_abs_result (dev, OPS_GET_FLIST_SUCCESS); bio_set_notify_abs_mid (dev, MID_EXTENDED_MESSAGE); bio_print_info ("%s\n", bio_get_notify_mid_mesg(dev)); bio_set_dev_status (dev, DEVS_COMM_IDLE); return found; } /* * 中止设备的当前操作 */ int community_ops_stop_by_user(bio_dev *dev, int waiting_ms) { bio_print_debug ("bio_drv_demo_ops_stop_by_user start\n"); bio_print_info (("_Device %s[%d] received interrupt request\n"), dev->device_name, dev->driver_id); if (bio_get_dev_status(dev) == DEVS_COMM_IDLE) // 如果设备为空闲状态 return 0; driver_info *priv = (driver_info *)dev->dev_priv; int timeout = bio_get_ops_timeout_ms(); // 获取通用超时时间 int timeused = 0; priv->asyn_flag = ASYN_FALG_RUNNING; if (waiting_ms < timeout) timeout = waiting_ms; // 设置状态位,用于通知用户中断 priv->ctrlFlag = CONTROL_FLAG_STOPING; snprintf (priv->extra_info, EXTRA_INFO_LENGTH, ("_Device %s[%d] received interrupt request\n"), dev->device_name, dev->driver_id); bio_set_notify_abs_mid (dev, MID_EXTENDED_MESSAGE); while ((priv->ctrlFlag != CONTROL_FLAG_STOPPED) && (priv->ctrlFlag != CONTROL_FLAG_DONE) && (priv->ctrlFlag != CONTROL_FLAG_IDLE) && (timeused < timeout)) { timeused += EM1600DEV_FINGER_CHECK_INTERVAL_MS; usleep(EM1600DEV_FINGER_CHECK_INTERVAL_MS * 1000); } if ((priv->ctrlFlag == CONTROL_FLAG_STOPPED) || (priv->ctrlFlag == CONTROL_FLAG_DONE) || (priv->ctrlFlag == CONTROL_FLAG_IDLE)) { return 0; } return -1; } /* * 获取设备状态的文本消息 */ const char *community_ops_get_dev_status_mesg(bio_dev *dev) { bio_print_debug ("bio_drv_demo_ops_get_dev_status_mesg end\n"); return NULL; } /* * 获取操作结果的文本消息 */ const char *community_ops_get_ops_result_mesg(bio_dev *dev) { bio_print_debug ("bio_drv_demo_ops_get_ops_result_mesg end\n"); return NULL; } /* * 获取面向用户的提示消息 */ const char *community_ops_get_notify_mid_mesg(bio_dev *dev) { bio_print_debug ("bio_drv_demo_ops_get_notify_mid_mesg start\n"); driver_info *priv = (driver_info *)dev->dev_priv; switch (bio_get_notify_mid(dev)) { case MID_EXTENDED_MESSAGE: return priv->extra_info; default: return NULL; } } void *community_ops_attach(bio_dev *dev) { } void *community_ops_detach(bio_dev *dev) { } biometric-authentication/src/drivers/community-multidevice/close.h0000644000175000017500000000527613755706021024567 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef CLOSE_H #define CLOSE_H #include #include #include #include #include #include "driver_type.h" #include "driver_internal.h" #include "aes_128_cfb.h" #include "community_define.h" #include #include #include #include // 创建指纹模板 FpPrint *print_create_template(FpDevice *device, FpFinger finger, bio_dev *dev); // 设备打开后的回调函数 void on_device_opened(FpDevice *device, GAsyncResult *res, void *user_data); // 设备录入后的回调函数 void on_enroll_completed(FpDevice *device, GAsyncResult *res, void *user_data); // 设备录入过程回调函数 void on_enroll_progress(FpDevice *device, gint completed_stages, FpPrint *print, gpointer user_data, GError *error); // 关闭设备完成回调函数 void on_device_closed(FpDevice *device, GAsyncResult *res, void *user_data); // 捕获函数完成的回调函数 void on_capture_completed(FpDevice *device, GAsyncResult *res, void *user_data); // 验证完成回调函数 void on_verify_completed(FpDevice *dev, GAsyncResult *res, void *user_data); // 识别完成回调函数 void on_device_identify(FpDevice *dev, GAsyncResult *res, void *user_data); // 创建指纹列表 GPtrArray *create_prints(bio_dev *dev, int uid, int idx_start, int idx_end); // 验证函数结果函数 void on_match_cb_verify(FpDevice *device, FpPrint *match, FpPrint *print, gpointer user_data, GError *error); // 识别函数结果函数(搜索) void on_match_cb_search(FpDevice *device, FpPrint *match, FpPrint *print, gpointer user_data, GError *error); // 识别函数结果函数(识别) void on_match_cb_identify(FpDevice *device, FpPrint *match, FpPrint *print, gpointer user_data, GError *error); #endif // CLOSE_H biometric-authentication/src/drivers/community-multidevice/driver_internal.h0000644000175000017500000000364213755706021026644 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef DRIVE_INTERNAL_H #define DRIVE_INTERNAL_H #include #include #include #include #include #include #include #include #include #include #include #include "driver_type.h" #include "close.h" #include "aes_128_cfb.h" #include "community_define.h" #include "community_ops.h" #include #include #include #include // 探测设备 int device_discover(bio_dev *dev); int set_fp_common_context(bio_dev *dev); void *buf_alloc(unsigned long size); void buf_clean(void *buf, unsigned long size); char *finger_capture(capture_data *user_data); int community_para_config(bio_dev *dev, GKeyFile *conf); int community_internal_aes_encrypt(unsigned char *in, int len, unsigned char *key, unsigned char *out); int community_internal_aes_decrypt(unsigned char *in, int len, unsigned char *key, unsigned char *out); #endif // DRIVE_INTERNAL_H biometric-authentication/src/drivers/community-multidevice/driver_type.h0000644000175000017500000000537013755706021026011 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef DRIVE_TYPE_H #define DRIVE_TYPE_H #include #include #include #include #include #include // 状态控制标志定义 #define CONTROL_FLAG_IDLE 0 #define CONTROL_FLAG_RUNNING 1 #define CONTROL_FLAG_STOPING 2 #define CONTROL_FLAG_STOPPED 3 #define CONTROL_FLAG_DONE 4 // 异步控制标志 #define ASYN_FLAG_DONE 0 #define ASYN_FALG_RUNNING 1 // 扩展提示信息的长度 #define EXTRA_INFO_LENGTH 1024 // 检测时间间隔 #define EM1600DEV_FINGER_CHECK_INTERVAL_MS 100 #define DEFAULT_AES_KEY "This is UKUI default AES key." #define DEFAULT_AES_KEY_MAX_LEN (256 / 8) typedef struct _enroll_data { bio_dev *dev; int uid; int idx; char *bio_idx_name; }enroll_data; typedef struct _capture_data { bio_dev *dev; char *feature_data; char *feature_encode; }capture_data; typedef struct _identify_data { bio_dev *dev; int uid; int idx_start; int idx_end; }identify_data; typedef struct _search_data { bio_dev *dev; int uid; int idx_start; int idx_end; int index; feature_info *found; feature_info found_head; }search_data; // 定义操作提示 enum demo_notify_mid { MID_EXTENDED_MESSAGE = NOTIFY_COMM_MAX + 1, // 定义扩展信息 }; // 驱动私有结构体 // 设备驱动私有结构体,指向设备驱动还需要的额外结构体 typedef struct driver_info_t driver_info; struct driver_info_t { int timeoutMS; int timeused; int ctrlFlag; char extra_info[EXTRA_INFO_LENGTH]; GPtrArray *devices; FpDevice *device; FpContext *ctx; int asyn_flag; GCancellable *cancellable; unsigned char *aes_key; char *community_driver_id; int shmid; void *shmaddr; int fd; }; typedef struct shared_number_t shared_number; struct shared_number_t { GPtrArray *devices; FpDevice *device; FpContext *ctx; int d_count; }; #endif // DRIVE_TYPE_H biometric-authentication/src/drivers/community-multidevice/community_ops.h0000644000175000017500000000516613757133715026373 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef DRIVE_REALIZATION_H #define DRIVE_REALIZATION_H #include #include #include #include #include #include #include #include #include #include #include #include "driver_type.h" #include "driver_internal.h" #include "close.h" #include "aes_128_cfb.h" #include "community_define.h" #include #include #include #include int community_ops_driver_init(bio_dev *dev); void community_ops_free(bio_dev *dev); int community_ops_discover(bio_dev *dev); int community_ops_open(bio_dev *dev); void community_ops_close(bio_dev *dev); char *community_ops_capture(bio_dev *dev, OpsActions action); int community_ops_enroll(bio_dev *dev, OpsActions action, int uid, int idx, char * bio_idx_name); int community_ops_verify(bio_dev *dev, OpsActions action, int uid, int idx); int community_ops_identify(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end); feature_info *community_ops_search(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end); int community_ops_clean(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end); feature_info *community_ops_get_feature_list(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end); int community_ops_stop_by_user(bio_dev *dev, int waiting_ms); const char *community_ops_get_dev_status_mesg(bio_dev *dev); const char *community_ops_get_ops_result_mesg(bio_dev *dev); const char *community_ops_get_notify_mid_mesg(bio_dev *dev); void *community_ops_attach(bio_dev *dev); void *community_ops_detach(bio_dev *dev); #endif // DRIVE_REALIZATION_H biometric-authentication/src/drivers/Makefile.am0000644000175000017500000000005013517470404020771 0ustar fengfengNULL = SUBDIRS = community-multidevice biometric-authentication/src/biometric-authenticationd.h0000644000175000017500000000444213517470404022577 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef AUTH_DAEMON_H #define AUTH_DAEMON_H #include #include #include "lib/biometric_common.h" #include "biometric-generated.h" #include "dbus_comm.h" #define PID_DIR_NUM 2 #define PID_DIR_0 "/run/user/0/" #define PID_DIR_1 "/tmp/" #define AUTH_SERVER_NAME "biometric-authentication" #define MAX_PID_STRING_LEN 64 #define SIGNAL_DEV_CHANGED STATUS_TYPE_DEVICE #define SIGNAL_OPS_CHANGED STATUS_TYPE_OPERATION #define SIGNAL_NOTIFY_CHANGED STATUS_TYPE_NOTIFY #define MAX_DEVICES BIO_DRVID_DYNAMIC_MAX extern GList * bio_drv_list; extern GList * bio_dev_list; typedef enum { /** * Successful execution. * For verify and identify, it also means successful verification. * 执行成功。 * 对于verify和identify还表示验证成功。 */ RetOpsSuccess = 0, /** * 执行成功。 * 对于verify和identify还表示验证不成功 */ RetOpsNoMatch, /** * An error was encountered during execution * 执行过程中遇到错误 */ RetOpsError, /** * Device busy * 设备忙 */ RetDeviceBusy, /** * No such device * 无该设备 */ RetNoSuchDevice, /** * Permission denied * 没有权限 */ RetPermissionDenied, }RetCode; char* mesg_nodev; char* mesg_devbusy; pthread_mutex_t dev_dbus_mutex[MAX_DEVICES]; #ifndef DOMAIN_NAME #define DOMAIN_NAME "biometric-authentication" #endif #ifndef LOCALEDIR #define LOCALEDIR "/usr/local/share/locale/" #endif #endif // AUTH_DAEMON_H biometric-authentication/src/biometric-authenticationd.c0000644000175000017500000011771413755706021022602 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "biometric-dbus-common.h" #include "biometric-authenticationd.h" #include "biometric-generated.h" #include "dbus_comm.h" static GMainLoop *pLoop = NULL; static Biometric *pSkeleton = NULL; static PolkitAuthority *pAuthority = NULL; char* mesg_nodev; char* mesg_devbusy; struct timeval timestamp_dev_status[MAX_DEVICES] = {0}; struct timeval timestamp_ops_result[MAX_DEVICES] = {0}; struct timeval timestamp_notify_mid[MAX_DEVICES] = {0}; static gboolean gdbus_check_app_api_version(Biometric *object, GDBusMethodInvocation *invocation, int major, int minor, int function) { int ret = 0; ret = bio_check_app_api_version(major, minor, function); biometric_complete_check_app_api_version(object, invocation, ret); return true; } bio_dev * get_dev_by_drvid(int drvid) { GList * l = bio_get_dev_list(); bio_dev * dev = NULL; if (l == NULL) { return NULL; } while (l != NULL) { dev = l->data; if (dev->driver_id == drvid) { break; } l = l->next; } if (dev->driver_id == drvid) return dev; else return NULL; } static gboolean gdbus_get_drv_list(Biometric *object, GDBusMethodInvocation *invocation) { int count = 0; GList * l = bio_get_drv_list(); GVariant * sta; GVariantBuilder* _builder = g_variant_builder_new(G_VARIANT_TYPE("av")); while (l != NULL) { bio_dev * dev = l->data; GVariant * _item = g_variant_new("(issiiiiiiiiii)", dev->driver_id, dev->device_name, dev->full_name, dev->enable, dev->dev_num, dev->bioinfo.biotype, dev->bioinfo.stotype, dev->bioinfo.eigtype, dev->bioinfo.vertype, dev->bioinfo.idtype, dev->bioinfo.bustype, bio_get_dev_status(dev), bio_get_ops_result(dev), bio_get_notify_mid(dev)); g_variant_builder_add(_builder, "v", _item); l = l->next; count += 1; } sta = g_variant_builder_end(_builder); g_variant_builder_unref(_builder); biometric_complete_get_drv_list(object, invocation, count, sta); return true; } static gboolean gdbus_get_dev_list(Biometric *object, GDBusMethodInvocation *invocation) { int count = 0; GList * l = bio_get_dev_list(); GVariant * sta; GVariantBuilder* _builder = g_variant_builder_new(G_VARIANT_TYPE("av")); while (l != NULL) { bio_dev * dev = l->data; GVariant * _item = g_variant_new("(issiiiiiiiiii)", dev->driver_id, dev->device_name, dev->full_name, dev->enable, dev->dev_num, dev->bioinfo.biotype, dev->bioinfo.stotype, dev->bioinfo.eigtype, dev->bioinfo.vertype, dev->bioinfo.idtype, dev->bioinfo.bustype, bio_get_dev_status(dev), bio_get_ops_result(dev), bio_get_notify_mid(dev)); g_variant_builder_add(_builder, "v", _item); l = l->next; count += 1; } sta = g_variant_builder_end(_builder); g_variant_builder_unref(_builder); biometric_complete_get_dev_list(object, invocation, count, sta); return true; } void gdbus_get_feature_list_pt(GSList * argv) { int count = 0; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; int *p5; p0 = g_slist_nth_data(argv, 0); p1 = g_slist_nth_data(argv, 1); p2 = g_slist_nth_data(argv, 2); p3 = g_slist_nth_data(argv, 3); p4 = g_slist_nth_data(argv, 4); p5 = g_slist_nth_data(argv, 5); Biometric *object = (Biometric *)*p0; GDBusMethodInvocation *invocation = (GDBusMethodInvocation *)*p1; int drvid = (int)*p2; int uid = (int)*p3; int idx_start = (int)*p4; int idx_end = (int)*p5; bio_dev * dev = get_dev_by_drvid(drvid); GVariant * flv_null; GVariantBuilder* _builder = g_variant_builder_new(G_VARIANT_TYPE("av")); flv_null = g_variant_builder_end(_builder); if (dev == NULL) { biometric_complete_get_feature_list(object, invocation, 0, flv_null); return; } if (pthread_mutex_trylock(&dev_dbus_mutex[drvid]) != 0) { biometric_complete_get_feature_list(object, invocation, 0, flv_null); return; } g_variant_builder_unref(_builder); g_variant_unref(flv_null); feature_info * flist = NULL; flist = bio_ops_get_feature_list(dev, uid, idx_start, idx_end); pthread_mutex_unlock(&dev_dbus_mutex[drvid]); int ops_result = bio_get_ops_result(dev); if (ops_result != OPS_GET_FLIST_SUCCESS) { _builder = g_variant_builder_new(G_VARIANT_TYPE("av")); flv_null = g_variant_builder_end(_builder); biometric_complete_get_feature_list(object, invocation, -RetOpsError, flv_null); return; } // 构建特征信息列表 feature_info * l = flist; GVariant * flv; _builder = g_variant_builder_new(G_VARIANT_TYPE("av")); while (l != NULL) { GVariant * _item = g_variant_new("(iisis)", l->uid, l->biotype, bio_new_string(l->driver), l->index, bio_new_string(l->index_name)); g_variant_builder_add(_builder, "v", _item); l = l->next; count += 1; } flv = g_variant_builder_end(_builder); g_variant_builder_unref(_builder); if (flist != NULL) bio_sto_free_feature_info(flist); biometric_complete_get_feature_list(object, invocation, count, flv); free(p0); free(p1); free(p2); free(p3); free(p4); free(p5); g_slist_free(argv); } static gboolean gdbus_get_feature_list(Biometric *object, GDBusMethodInvocation *invocation, const int drvid, const int uid, const int idx_start, const int idx_end) { int err = 0; pthread_t thr; GSList *argv = NULL; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; int *p5; p0 = malloc(sizeof(void *)); memcpy(p0, &object, sizeof(void *)); argv = g_slist_append(argv, p0); p1 = malloc(sizeof(void *)); memcpy(p1, &invocation, sizeof(void *)); argv = g_slist_append(argv, p1); p2 = malloc(sizeof(const int)); memcpy(p2, &drvid, sizeof(const int)); argv = g_slist_append(argv, p2); p3 = malloc(sizeof(const int)); memcpy(p3, &uid, sizeof(const int)); argv = g_slist_append(argv, p3); p4 = malloc(sizeof(const int)); memcpy(p4, &idx_start, sizeof(const int)); argv = g_slist_append(argv, p4); p5 = malloc(sizeof(const int)); memcpy(p5, &idx_end, sizeof(const int)); argv = g_slist_append(argv, p5); err = pthread_create(&thr, NULL, (void *)gdbus_get_feature_list_pt, argv); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } return true; } void gdbus_update_status_pt(GSList * argv) { int ret = -1; int enable = -1; int dev_num = 0; int dev_status = -1; int ops_result = -1; int notify_mid = -1; Biometric **p0; GDBusMethodInvocation **p1; int *p2; p0 = g_slist_nth_data(argv,0); p1 = g_slist_nth_data(argv,1); p2 = g_slist_nth_data(argv,2); Biometric *object = (Biometric *)*p0; GDBusMethodInvocation *invocation = (GDBusMethodInvocation *)*p1; int drvid = (int)*p2; bio_dev * dev = get_dev_by_drvid(drvid); if (dev != NULL) { enable = dev->enable; dev_num = dev->dev_num; dev_status = bio_get_dev_status(dev); ops_result = bio_get_ops_result(dev); notify_mid = bio_get_notify_mid(dev); ret = -RetOpsSuccess; } else ret = -RetNoSuchDevice; biometric_complete_update_status(object, invocation, ret, enable, dev_num, dev_status, ops_result, notify_mid, timestamp_dev_status[drvid].tv_sec, timestamp_dev_status[drvid].tv_usec, timestamp_ops_result[drvid].tv_sec, timestamp_ops_result[drvid].tv_usec, timestamp_notify_mid[drvid].tv_sec, timestamp_notify_mid[drvid].tv_usec); free(p0); free(p1); free(p2); g_slist_free(argv); } static gboolean gdbus_update_status(Biometric *object, GDBusMethodInvocation *invocation, const int drvid) { int err = 0; pthread_t thr; GSList *argv = NULL; Biometric **p0; GDBusMethodInvocation **p1; int *p2; p0 = malloc(sizeof(void *)); memcpy(p0, &object, sizeof(void *)); argv = g_slist_append(argv, p0); p1 = malloc(sizeof(void *)); memcpy(p1, &invocation, sizeof(void *)); argv = g_slist_append(argv, p1); p2 = malloc(sizeof(const int)); memcpy(p2, &drvid, sizeof(const int)); argv = g_slist_append(argv, p2); err = pthread_create(&thr, NULL, (void *)gdbus_update_status_pt, argv); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } return true; } static gboolean gdbus_get_dev_mesg(Biometric *object, GDBusMethodInvocation *invocation, const int drvid) { bio_dev * dev = get_dev_by_drvid(drvid); if (dev == NULL) { struct timeval now; gettimeofday(&now, NULL); biometric_complete_get_dev_mesg(object, invocation, mesg_nodev, now.tv_sec, now.tv_usec); return true; } biometric_complete_get_dev_mesg(object, invocation, bio_get_dev_status_mesg(dev), timestamp_dev_status[drvid].tv_sec, timestamp_dev_status[drvid].tv_usec); return true; } static gboolean gdbus_get_ops_mesg(Biometric *object, GDBusMethodInvocation *invocation, const int drvid) { bio_dev * dev = get_dev_by_drvid(drvid); if (dev == NULL) { struct timeval now; gettimeofday(&now, NULL); biometric_complete_get_ops_mesg(object, invocation, mesg_nodev, now.tv_sec, now.tv_usec); return true; } biometric_complete_get_ops_mesg(object, invocation, bio_get_ops_result_mesg(dev), timestamp_ops_result[drvid].tv_sec, timestamp_ops_result[drvid].tv_usec); return true; } static gboolean gdbus_get_notify_mesg(Biometric *object, GDBusMethodInvocation *invocation, const int drvid) { bio_dev * dev = get_dev_by_drvid(drvid); if (dev == NULL) { struct timeval now; gettimeofday(&now, NULL); biometric_complete_get_notify_mesg(object, invocation, mesg_nodev, now.tv_sec, now.tv_usec); return true; } biometric_complete_get_notify_mesg(object, invocation, bio_get_notify_mid_mesg(dev), timestamp_notify_mid[drvid].tv_sec, timestamp_notify_mid[drvid].tv_usec); return true; } void gdbus_enroll_pt(GSList * argv) { int ret = -1; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; char *p5; p0 = g_slist_nth_data(argv,0); p1 = g_slist_nth_data(argv,1); p2 = g_slist_nth_data(argv,2); p3 = g_slist_nth_data(argv,3); p4 = g_slist_nth_data(argv,4); p5 = g_slist_nth_data(argv,5); Biometric *object = (Biometric *)*p0; GDBusMethodInvocation *invocation = (GDBusMethodInvocation *)*p1; int drvid = (int)*p2; int uid = (int)*p3; int idx = (int)*p4; char * idx_name = p5; gboolean auth_ret = FALSE; int auth_uid = 0; get_dbus_caller_uid(invocation, &auth_uid); if (auth_uid == uid) auth_ret = authority_check_by_polkit(pAuthority, invocation, POLKIT_ENROLL_OWN_ACTION_ID); else auth_ret = authority_check_by_polkit(pAuthority, invocation, POLKIT_ENROLL_ADMIN_ACTION_ID); if (!auth_ret) { biometric_complete_enroll(object, invocation, -RetPermissionDenied); return; } bio_dev * dev = get_dev_by_drvid(drvid); if (dev == NULL) { biometric_complete_enroll(object, invocation, -RetNoSuchDevice); return; } if (pthread_mutex_trylock(&dev_dbus_mutex[drvid]) != 0) { biometric_complete_enroll(object, invocation, -RetDeviceBusy); return; } if (idx == -1) { idx = bio_common_get_empty_index(dev, uid, 0, -1); bio_print_debug(_("Framework automatically assigns the free index '%d'" " to driver %s user %d\n"), idx, dev->device_name, uid); } ret = bio_ops_enroll(dev, uid, idx, (char *)idx_name); pthread_mutex_unlock(&dev_dbus_mutex[drvid]); if (bio_get_ops_result(dev) % 100 == OPS_COMM_SUCCESS) { bio_print_info(_("Enroll Result: Success\n")); ret = -RetOpsSuccess; } else { bio_print_info(_("Enroll Result: Fail\n")); ret = -RetOpsError; } biometric_complete_enroll(object, invocation, ret); free(p0); free(p1); free(p2); free(p3); free(p4); free(p5); g_slist_free(argv); } static gboolean gdbus_enroll(Biometric *object, GDBusMethodInvocation *invocation, const int drvid, const int uid, const int idx, const char * idx_name) { int err = 0; pthread_t thr; GSList *argv = NULL; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; char *p5; p0 = malloc(sizeof(void *)); memcpy(p0, &object, sizeof(void *)); argv = g_slist_append(argv, p0); p1 = malloc(sizeof(void *)); memcpy(p1, &invocation, sizeof(void *)); argv = g_slist_append(argv, p1); p2 = malloc(sizeof(const int)); memcpy(p2, &drvid, sizeof(const int)); argv = g_slist_append(argv, p2); p3 = malloc(sizeof(const int)); memcpy(p3, &uid, sizeof(const int)); argv = g_slist_append(argv, p3); p4 = malloc(sizeof(const int)); memcpy(p4, &idx, sizeof(const int)); argv = g_slist_append(argv, p4); p5 = bio_new_string((char *)idx_name); argv = g_slist_append(argv, p5); err = pthread_create(&thr, NULL, (void *)gdbus_enroll_pt, argv); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } return true; } void gdbus_verify_pt(GSList * argv) { int ret = -1; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; p0 = g_slist_nth_data(argv,0); p1 = g_slist_nth_data(argv,1); p2 = g_slist_nth_data(argv,2); p3 = g_slist_nth_data(argv,3); p4 = g_slist_nth_data(argv,4); Biometric *object = (Biometric *)*p0; GDBusMethodInvocation *invocation = (GDBusMethodInvocation *)*p1; int drvid = (int)*p2; int uid = (int)*p3; int idx = (int)*p4; bio_dev * dev = get_dev_by_drvid(drvid); if (dev == NULL) { biometric_complete_verify(object, invocation, -RetNoSuchDevice); return; } if (pthread_mutex_trylock(&dev_dbus_mutex[drvid]) != 0) { biometric_complete_verify(object, invocation, -RetDeviceBusy); return; } ret = bio_ops_verify(dev, uid, idx); pthread_mutex_unlock(&dev_dbus_mutex[drvid]); int ops_result; ops_result = bio_get_ops_result(dev); switch (ops_result) { case OPS_VERIFY_MATCH: bio_print_info(_("Verify Result: Match\n")); ret = -RetOpsSuccess; break; case OPS_VERIFY_NO_MATCH: bio_print_info(_("Verify Result: No Match\n")); ret = -RetOpsNoMatch; break; default: ret = -RetOpsError; } biometric_complete_verify(object, invocation, ret); free(p0); free(p1); free(p2); free(p3); free(p4); g_slist_free(argv); } static gboolean gdbus_verify (Biometric *object, GDBusMethodInvocation *invocation, const int drvid, const int uid, const int idx) { int err = 0; pthread_t thr; GSList *argv = NULL; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; p0 = malloc(sizeof(void *)); memcpy(p0, &object, sizeof(void *)); argv = g_slist_append(argv, p0); p1 = malloc(sizeof(void *)); memcpy(p1, &invocation, sizeof(void *)); argv = g_slist_append(argv, p1); p2 = malloc(sizeof(const int)); memcpy(p2, &drvid, sizeof(const int)); argv = g_slist_append(argv, p2); p3 = malloc(sizeof(const int)); memcpy(p3, &uid, sizeof(const int)); argv = g_slist_append(argv, p3); p4 = malloc(sizeof(const int)); memcpy(p4, &idx, sizeof(const int)); argv = g_slist_append(argv, p4); err = pthread_create(&thr, NULL, (void *)gdbus_verify_pt, argv); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } return true; } void gdbus_identify_pt(GSList * argv) { int ret = -1; int uid_ret = -1; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; int *p5; p0 = g_slist_nth_data(argv, 0); p1 = g_slist_nth_data(argv, 1); p2 = g_slist_nth_data(argv, 2); p3 = g_slist_nth_data(argv, 3); p4 = g_slist_nth_data(argv, 4); p5 = g_slist_nth_data(argv, 5); Biometric *object = (Biometric *)*p0; GDBusMethodInvocation *invocation = (GDBusMethodInvocation *)*p1; int drvid = (int)*p2; int uid = (int)*p3; int idx_start = (int)*p4; int idx_end = (int)*p5; bio_dev * dev = get_dev_by_drvid(drvid); if (dev == NULL) { biometric_complete_identify(object, invocation, -RetNoSuchDevice, -1); return; } if (pthread_mutex_trylock(&dev_dbus_mutex[drvid]) != 0) { biometric_complete_identify(object, invocation, -RetDeviceBusy, -1); return; } uid_ret = bio_ops_identify(dev, uid, idx_start, idx_end); pthread_mutex_unlock(&dev_dbus_mutex[drvid]); int ops_result; ops_result = bio_get_ops_result(dev); switch (ops_result) { case OPS_IDENTIFY_MATCH: bio_print_info(_("Identify Result: UID = %d\n"), uid_ret); ret = -RetOpsSuccess; break; case OPS_IDENTIFY_NO_MATCH: bio_print_info(_("Identify Result: No Match\n")); ret = -RetOpsNoMatch; break; default: ret = -RetOpsError; } biometric_complete_identify(object, invocation, ret, uid_ret); free(p0); free(p1); free(p2); free(p3); free(p4); free(p5); g_slist_free(argv); } static gboolean gdbus_identify(Biometric *object, GDBusMethodInvocation *invocation, const int drvid, const int uid, const int idx_start, const int idx_end) { int err = 0; pthread_t thr; GSList *argv = NULL; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; int *p5; p0 = malloc(sizeof(void *)); memcpy(p0, &object, sizeof(void *)); argv = g_slist_append(argv, p0); p1 = malloc(sizeof(void *)); memcpy(p1, &invocation, sizeof(void *)); argv = g_slist_append(argv, p1); p2 = malloc(sizeof(const int)); memcpy(p2, &drvid, sizeof(const int)); argv = g_slist_append(argv, p2); p3 = malloc(sizeof(const int)); memcpy(p3, &uid, sizeof(const int)); argv = g_slist_append(argv, p3); p4 = malloc(sizeof(const int)); memcpy(p4, &idx_start, sizeof(const int)); argv = g_slist_append(argv, p4); p5 = malloc(sizeof(const int)); memcpy(p5, &idx_end, sizeof(const int)); argv = g_slist_append(argv, p5); err = pthread_create(&thr, NULL, (void *)gdbus_identify_pt, argv); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } return true; } void gdbus_capture_pt(GSList * argv) { int ret = -1; Biometric **p0; GDBusMethodInvocation **p1; int *p2; p0 = g_slist_nth_data(argv, 0); p1 = g_slist_nth_data(argv, 1); p2 = g_slist_nth_data(argv, 2); Biometric *object = (Biometric *)*p0; GDBusMethodInvocation *invocation = (GDBusMethodInvocation *)*p1; int drvid = (int)*p2; bio_dev * dev = get_dev_by_drvid(drvid); if (dev == NULL) { biometric_complete_capture(object, invocation, -RetNoSuchDevice, bio_new_string(NULL)); return; } if (pthread_mutex_trylock(&dev_dbus_mutex[drvid]) != 0) { biometric_complete_capture(object, invocation, -RetDeviceBusy, bio_new_string(NULL)); return; } char * caps = NULL; caps = bio_ops_capture(dev); pthread_mutex_unlock(&dev_dbus_mutex[drvid]); if (bio_get_ops_result(dev) % 100 == OPS_COMM_SUCCESS) { bio_print_info(_("Capture Result: %.*s\n"), 32, caps); ret = -RetOpsSuccess; } else { bio_print_info(_("Capture Result: ERROR\n")); ret = -RetOpsError; free(caps); } biometric_complete_capture(object, invocation, ret, caps); free(p0); free(p1); free(p2); g_slist_free(argv); } static gboolean gdbus_capture(Biometric *object, GDBusMethodInvocation *invocation, const int drvid) { int err = 0; pthread_t thr; GSList *argv = NULL; Biometric **p0; GDBusMethodInvocation **p1; int *p2; p0 = malloc(sizeof(void *)); memcpy(p0, &object, sizeof(void *)); argv = g_slist_append(argv, p0); p1 = malloc(sizeof(void *)); memcpy(p1, &invocation, sizeof(void *)); argv = g_slist_append(argv, p1); p2 = malloc(sizeof(const int)); memcpy(p2, &drvid, sizeof(const int)); argv = g_slist_append(argv, p2); err = pthread_create(&thr, NULL, (void *)gdbus_capture_pt, argv); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } return true; } void gdbus_search_pt(GSList * argv) { int count= 0; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; int *p5; p0 = g_slist_nth_data(argv, 0); p1 = g_slist_nth_data(argv, 1); p2 = g_slist_nth_data(argv, 2); p3 = g_slist_nth_data(argv, 3); p4 = g_slist_nth_data(argv, 4); p5 = g_slist_nth_data(argv, 5); Biometric *object = (Biometric *)*p0; GDBusMethodInvocation *invocation = (GDBusMethodInvocation *)*p1; int drvid = (int)*p2; int uid = (int)*p3; int idx_start = (int)*p4; int idx_end = (int)*p5; bio_dev * dev = get_dev_by_drvid(drvid); GVariant * flv_null; GVariantBuilder* _builder = g_variant_builder_new(G_VARIANT_TYPE("av")); flv_null = g_variant_builder_end(_builder); if (dev == NULL) { biometric_complete_search(object, invocation, -RetNoSuchDevice, flv_null); return; } if (pthread_mutex_trylock(&dev_dbus_mutex[drvid]) != 0) { biometric_complete_search(object, invocation, -RetDeviceBusy, flv_null); return; } g_variant_builder_unref(_builder); g_variant_unref(flv_null); feature_info * flist = NULL; flist = bio_ops_search(dev, uid, idx_start, idx_end); pthread_mutex_unlock(&dev_dbus_mutex[drvid]); int ops_result; ops_result = bio_get_ops_result(dev); if (ops_result != OPS_SEARCH_MATCH) { _builder = g_variant_builder_new(G_VARIANT_TYPE("av")); flv_null = g_variant_builder_end(_builder); if (ops_result == OPS_SEARCH_NO_MATCH) biometric_complete_search(object, invocation, -RetOpsSuccess, flv_null); else biometric_complete_search(object, invocation, -RetOpsError, flv_null); } // 构建特征信息列表 feature_info * l = flist; GVariant * flv; _builder = g_variant_builder_new(G_VARIANT_TYPE("av")); while (l != NULL) { GVariant * _item = g_variant_new("(iis)", l->uid, l->index, bio_new_string(l->index_name)); g_variant_builder_add(_builder, "v", _item); l = l->next; count += 1; } flv = g_variant_builder_end(_builder); g_variant_builder_unref(_builder); if (flist != NULL) bio_sto_free_feature_info(flist); biometric_complete_search(object, invocation, count, flv); free(p0); free(p1); free(p2); free(p3); free(p4); free(p5); g_slist_free(argv); } static gboolean gdbus_search(Biometric *object, GDBusMethodInvocation *invocation, const int drvid, const int uid, const int idx_start, const int idx_end) { int err = 0; pthread_t thr; GSList *argv = NULL; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; int *p5; p0 = malloc(sizeof(void *)); memcpy(p0, &object, sizeof(void *)); argv = g_slist_append(argv, p0); p1 = malloc(sizeof(void *)); memcpy(p1, &invocation, sizeof(void *)); argv = g_slist_append(argv, p1); p2 = malloc(sizeof(const int)); memcpy(p2, &drvid, sizeof(const int)); argv = g_slist_append(argv, p2); p3 = malloc(sizeof(const int)); memcpy(p3, &uid, sizeof(const int)); argv = g_slist_append(argv, p3); p4 = malloc(sizeof(const int)); memcpy(p4, &idx_start, sizeof(const int)); argv = g_slist_append(argv, p4); p5 = malloc(sizeof(const int)); memcpy(p5, &idx_end, sizeof(const int)); argv = g_slist_append(argv, p5); err = pthread_create(&thr, NULL, (void *)gdbus_search_pt, argv); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } return true; } int gdbus_clean_by_single_dev(bio_dev * dev, int uid, int idx_start, int idx_end) { int ret = 0; if (dev == NULL || get_dev_by_drvid(dev->driver_id) == NULL) { return -RetNoSuchDevice; } if (pthread_mutex_trylock(&dev_dbus_mutex[dev->driver_id]) != 0) { return -RetDeviceBusy; } ret = bio_ops_clean(dev, uid, idx_start, idx_end); pthread_mutex_unlock(&dev_dbus_mutex[dev->driver_id]); if (bio_get_ops_result(dev) % 100 == OPS_COMM_SUCCESS) { bio_print_info(_("%s Clean Result: Success\n"), dev->device_name); return -RetOpsSuccess; } else { bio_print_info(_("%s Clean Result: Failed\n"), dev->device_name); return -RetOpsError; } return ret; } void gdbus_clean_pt(GSList * argv) { int ret = 0; int single_ret = 0; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; int *p5; p0 = g_slist_nth_data(argv, 0); p1 = g_slist_nth_data(argv, 1); p2 = g_slist_nth_data(argv, 2); p3 = g_slist_nth_data(argv, 3); p4 = g_slist_nth_data(argv, 4); p5 = g_slist_nth_data(argv, 5); Biometric *object = (Biometric *)*p0; GDBusMethodInvocation *invocation = (GDBusMethodInvocation *)*p1; int drvid = (int)*p2; int uid = (int)*p3; int idx_start = (int)*p4; int idx_end = (int)*p5; gboolean auth_ret = FALSE; int auth_uid = 0; get_dbus_caller_uid(invocation, &auth_uid); if (auth_uid == uid) auth_ret = authority_check_by_polkit(pAuthority, invocation, POLKIT_CLEAN_OWN_ACTION_ID); else auth_ret = authority_check_by_polkit(pAuthority, invocation, POLKIT_CLEAN_ADMIN_ACTION_ID); if (!auth_ret) { biometric_complete_enroll(object, invocation, -RetPermissionDenied); return; } if (drvid != -1) { bio_dev * dev = get_dev_by_drvid(drvid); ret = gdbus_clean_by_single_dev(dev, uid, idx_start, idx_end); } else { GList * l = bio_get_drv_list(); single_ret = 0; ret = 0; while (l != NULL) { single_ret = gdbus_clean_by_single_dev(l->data, uid, idx_start, idx_end); if (ret == 0) ret = single_ret; l = l->next; } if (ret != 0) ret = -RetOpsError; // 系统层清理进行彻底的清理,免受当前不可用设备遗留的生物特征信息影响 bio_print_info(_("System level cleaning of the specified range of biometric " "features (all drivers)\n")); sqlite3 * db; db = bio_sto_connect_db(); single_ret = bio_sto_clean_feature_info(db, uid, -1, NULL, idx_start, idx_end); bio_sto_disconnect_db(db); if (single_ret == 0) bio_print_info(_("System level Clean Result: Success\n")); else { bio_print_info(_("System level Clean Result: Failed\n")); ret = -RetOpsError; } } biometric_complete_clean(object, invocation, ret); free(p0); free(p1); free(p2); free(p3); free(p4); free(p5); g_slist_free(argv); } static gboolean gdbus_clean(Biometric *object, GDBusMethodInvocation *invocation, const int drvid, const int uid, const int idx_start, const int idx_end) { int err = 0; pthread_t thr; GSList *argv = NULL; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; int *p5; p0 = malloc(sizeof(void *)); memcpy(p0, &object, sizeof(void *)); argv = g_slist_append(argv, p0); p1 = malloc(sizeof(void *)); memcpy(p1, &invocation, sizeof(void *)); argv = g_slist_append(argv, p1); p2 = malloc(sizeof(const int)); memcpy(p2, &drvid, sizeof(const int)); argv = g_slist_append(argv, p2); p3 = malloc(sizeof(const int)); memcpy(p3, &uid, sizeof(const int)); argv = g_slist_append(argv, p3); p4 = malloc(sizeof(const int)); memcpy(p4, &idx_start, sizeof(const int)); argv = g_slist_append(argv, p4); p5 = malloc(sizeof(const int)); memcpy(p5, &idx_end, sizeof(const int)); argv = g_slist_append(argv, p5); err = pthread_create(&thr, NULL, (void *)gdbus_clean_pt, argv); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } return true; } void gdbus_feature_rename_pt(GSList * argv) { int ret = -RetOpsSuccess; Biometric ** p0; GDBusMethodInvocation ** p1; int * p2; int * p3; int * p4; char * p5; p0 = g_slist_nth_data(argv, 0); p1 = g_slist_nth_data(argv, 1); p2 = g_slist_nth_data(argv, 2); p3 = g_slist_nth_data(argv, 3); p4 = g_slist_nth_data(argv, 4); p5 = g_slist_nth_data(argv, 5); Biometric *object = (Biometric *)*p0; GDBusMethodInvocation *invocation = (GDBusMethodInvocation *)*p1; int drvid = (int)*p2; int uid = (int)*p3; int idx = (int)*p4; char * new_name = p5; bio_dev * dev = get_dev_by_drvid(drvid); if (dev == NULL) { biometric_complete_stop_ops(object, invocation, -RetNoSuchDevice); return; } if (pthread_mutex_trylock(&dev_dbus_mutex[drvid]) != 0) { biometric_complete_stop_ops(object, invocation, -RetDeviceBusy); return; } bio_print_debug("Rename %s feature, UID = %d, INDEX = %d, NewName = %s\n", dev->device_name, uid, idx, new_name); ret = bio_ops_feature_rename(dev, uid, idx, new_name); pthread_mutex_unlock(&dev_dbus_mutex[drvid]); bio_print_info("Rename result = %d\n", ret); int ops_result; ops_result = bio_get_ops_result(dev); if (ops_result == OPS_RENAME_SUCCESS) biometric_complete_rename(object, invocation, -RetOpsSuccess); else biometric_complete_rename(object, invocation, -RetOpsError); free(p0); free(p1); free(p2); free(p3); free(p4); free(p5); g_slist_free(argv); } static gboolean gdbus_feature_rename(Biometric *object, GDBusMethodInvocation *invocation, const int drvid, const int uid, int idx, const char * new_name) { int err = 0; pthread_t thr; GSList *argv = NULL; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; int *p4; char * p5; p0 = malloc(sizeof(void *)); memcpy(p0, &object, sizeof(void *)); argv = g_slist_append(argv, p0); p1 = malloc(sizeof(void *)); memcpy(p1, &invocation, sizeof(void *)); argv = g_slist_append(argv, p1); p2 = malloc(sizeof(const int)); memcpy(p2, &drvid, sizeof(const int)); argv = g_slist_append(argv, p2); p3 = malloc(sizeof(const int)); memcpy(p3, &uid, sizeof(const int)); argv = g_slist_append(argv, p3); p4 = malloc(sizeof(const int)); memcpy(p4, &idx, sizeof(const int)); argv = g_slist_append(argv, p4); p5 = bio_new_string((char *)new_name); argv = g_slist_append(argv, p5); err = pthread_create(&thr, NULL, (void *)gdbus_feature_rename_pt, argv); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } return true; } void gdbus_stop_ops_pt(GSList * argv) { int ret = -1; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; p0 = g_slist_nth_data(argv, 0); p1 = g_slist_nth_data(argv, 1); p2 = g_slist_nth_data(argv, 2); p3 = g_slist_nth_data(argv, 3); Biometric *object = (Biometric *)*p0; GDBusMethodInvocation *invocation = (GDBusMethodInvocation *)*p1; int drvid = (int)*p2; int waiting_sec = (int)*p3; bio_dev * dev = get_dev_by_drvid(drvid); if (dev == NULL) { biometric_complete_stop_ops(object, invocation, -RetNoSuchDevice); return; } bio_print_debug("===========\n"); ret = bio_ops_stop_ops(dev, waiting_sec); bio_print_info("ret = %d\n", ret); if (ret != 0) ret = -RetOpsError; biometric_complete_stop_ops(object, invocation, ret); free(p0); free(p1); free(p2); free(p3); g_slist_free(argv); } static gboolean gdbus_stop_ops(Biometric *object, GDBusMethodInvocation *invocation, const int drvid, const int waiting_sec) { int err = 0; pthread_t thr; GSList *argv = NULL; Biometric **p0; GDBusMethodInvocation **p1; int *p2; int *p3; p0 = malloc(sizeof(void *)); memcpy(p0, &object, sizeof(void *)); argv = g_slist_append(argv, p0); p1 = malloc(sizeof(void *)); memcpy(p1, &invocation, sizeof(void *)); argv = g_slist_append(argv, p1); p2 = malloc(sizeof(const int)); memcpy(p2, &drvid, sizeof(const int)); argv = g_slist_append(argv, p2); p3 = malloc(sizeof(const int)); memcpy(p3, &waiting_sec, sizeof(const int)); argv = g_slist_append(argv, p3); err = pthread_create(&thr, NULL, (void *)gdbus_stop_ops_pt, argv); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } return true; } static void gdbus_signal_status_changed(int drvid, int type) { switch (type) { case STATUS_TYPE_DEVICE: gettimeofday(×tamp_dev_status[drvid], NULL); break; case STATUS_TYPE_OPERATION: gettimeofday(×tamp_ops_result[drvid], NULL); break; case STATUS_TYPE_NOTIFY: gettimeofday(×tamp_notify_mid[drvid], NULL); break; default: break; } biometric_emit_status_changed(pSkeleton, drvid, type); } static void gdbus_usb_device_hot_plug_callback(int drvid, int action, int dev_num_now) { biometric_emit_usbdevice_hot_plug(pSkeleton, drvid, action, dev_num_now); } static void bus_acquired_cb(GDBusConnection *connection, const gchar *bus_name, gpointer user_data) { GError *pError = NULL; /** Second step: Try to get a connection to the given bus. */ pSkeleton = biometric_skeleton_new(); /** Third step: Attach to dbus signals. */ g_signal_connect(pSkeleton, "handle-check-app-api-version", G_CALLBACK(gdbus_check_app_api_version), NULL); g_signal_connect(pSkeleton, "handle-get-drv-list", G_CALLBACK(gdbus_get_drv_list), NULL); g_signal_connect(pSkeleton, "handle-get-dev-list", G_CALLBACK(gdbus_get_dev_list), NULL); g_signal_connect(pSkeleton, "handle-get-feature-list", G_CALLBACK(gdbus_get_feature_list), NULL); g_signal_connect(pSkeleton, "handle-update-status", G_CALLBACK(gdbus_update_status), NULL); g_signal_connect(pSkeleton, "handle-get-dev-mesg", G_CALLBACK(gdbus_get_dev_mesg), NULL); g_signal_connect(pSkeleton, "handle-get-ops-mesg", G_CALLBACK(gdbus_get_ops_mesg), NULL); g_signal_connect(pSkeleton, "handle-get-notify-mesg", G_CALLBACK(gdbus_get_notify_mesg), NULL); g_signal_connect(pSkeleton, "handle-enroll", G_CALLBACK(gdbus_enroll), NULL); g_signal_connect(pSkeleton, "handle-verify", G_CALLBACK(gdbus_verify), NULL); g_signal_connect(pSkeleton, "handle-identify", G_CALLBACK(gdbus_identify), NULL); g_signal_connect(pSkeleton, "handle-capture", G_CALLBACK(gdbus_capture), NULL); g_signal_connect(pSkeleton, "handle-search", G_CALLBACK(gdbus_search), NULL); g_signal_connect(pSkeleton, "handle-clean", G_CALLBACK(gdbus_clean), NULL); g_signal_connect(pSkeleton, "handle-rename", G_CALLBACK(gdbus_feature_rename), NULL); g_signal_connect(pSkeleton, "handle-stop-ops", G_CALLBACK(gdbus_stop_ops), NULL); bio_status_changed_callback = gdbus_signal_status_changed; bio_usb_device_hot_plug_callback = gdbus_usb_device_hot_plug_callback; /** Fourth step: Export interface skeleton. */ (void) g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(pSkeleton), connection, UKUI_GDBUS_BIO_OBJECT_PATH, &pError); if(pError != NULL){ bio_print_error(_("Error: Failed to export object. Reason: %s\n"), pError->message); g_error_free(pError); g_main_loop_quit(pLoop); } } static void name_acquired_cb(GDBusConnection *connection, const gchar *bus_name, gpointer user_data) { bio_print_notice(_("name_acquired_cb called, Acquired bus name: %s\n"), UKUI_GDBUS_BIO_BUS_NAME); } static void name_lost_cb(GDBusConnection *connection, const gchar *bus_name, gpointer user_data) { bio_print_info("bus_name = %s\n", bus_name); if(connection == NULL) { bio_print_error(_("name_lost_cb called, Error: Failed to connect to dbus\n")); } else { bio_print_error(_("name_lost_cb called, Error: Failed to obtain bus name: %s\n"), UKUI_GDBUS_BIO_BUS_NAME); } g_main_loop_quit(pLoop); } void* run(void* para) { bio_print_info(_("run called in the server\n")); /** Start the Main Event Loop which manages all available sources of events */ g_main_loop_run( pLoop ); return ((void*)0); } int thread_create(void) { int err; pthread_t thr; err = pthread_create(&thr, NULL, run, NULL); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } else { bio_print_info(_("New thread created: %s\n"), strerror(err)); } return err; } bool InitBioDBusCommServer(void) { bool bRet = TRUE; /** init for usage of "g" types */ // g_type_init(); bio_print_notice(_("InitDBusCommunicationServer: Server started\n")); /** create main loop, but do not start it. */ pLoop = g_main_loop_new(NULL, FALSE); /** first step: connect to dbus */ (void)g_bus_own_name(UKUI_GDBUS_BIO_BUS, UKUI_GDBUS_BIO_BUS_NAME, G_BUS_NAME_OWNER_FLAGS_REPLACE|G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, &bus_acquired_cb, &name_acquired_cb, &name_lost_cb, NULL, NULL); pAuthority = polkit_authority_get_sync (NULL, NULL); return bRet; } int InitBioDevice() { int ret = 0; GList * drv_list = NULL; ret = bio_init(); if (ret != 0) return -1; /* * Initialize driver list and device list. * * The initialization driver list only loads the driver and initializes * the associated configuration. * * Initializing the device list will detect the device. * * 初始化驱动链表、设备链表 * 初始化驱动链表只加载驱动和初始化相关配置 * 初始化设备链表会探测设备 */ drv_list = bio_driver_list_init(); bio_device_list_init(drv_list); bio_print_drv_list(BIO_PRINT_LEVEL_NOTICE); bio_print_dev_list(BIO_PRINT_LEVEL_NOTICE); return 0; } void UnInitBioDevice() { GList * l = NULL; int i = 0; l = bio_get_dev_list(); for (i = 0; l != NULL; i++) { bio_dev * dev = l->data; dev->ops_close(dev); l = l->next; } bio_free_dev_list(); bio_free_drv_list(); bio_close(); } void ReInitBioDevice() { UnInitBioDevice(); InitBioDevice(); } void monitor_usb_hotplug(void* para) { int rc =0; while (1) { rc = libusb_handle_events (NULL); if (rc < 0) bio_print_error(_("libusb_handle_events failed: %s\n"), libusb_error_name(rc)); } } int main() { int i = 0; int ret = 0; int uid = getuid(); int pid = getpid(); char * pid_dir_list[PID_DIR_NUM] = {PID_DIR_0, PID_DIR_1}; char * pid_dir = NULL; char pid_file[MAX_PATH_LEN] = {0}; char pid_string[MAX_PID_STRING_LEN] = {0}; if (uid != 0) { bio_print_error(_("The biometric authentication server failed to start, " "requiring administrator permission to start\n")); return -1; } for (i = 0; i < PID_DIR_NUM; i++) { struct stat dir_stat; if (access(pid_dir_list[i], F_OK) == 0) { stat(pid_dir_list[i], &dir_stat); if (S_ISDIR(dir_stat.st_mode)) { pid_dir = pid_dir_list[i]; break; } } } if (pid_dir == NULL) pid_dir = "/"; snprintf(pid_file, MAX_PATH_LEN, "%s/%s.pid", pid_dir, AUTH_SERVER_NAME); int pid_file_fd = open(pid_file, O_CREAT | O_TRUNC | O_RDWR, 0644); if (pid_file_fd < 0) { bio_print_error(_("Can not open PID file: %s\n"), pid_file); return -1; } ret = flock(pid_file_fd, LOCK_EX | LOCK_NB); if (ret < 0) { bio_print_error(_("Biometric authentication server is running, " "Do not restart it repeatedly\n")); return -1; } snprintf(pid_string, MAX_PID_STRING_LEN, "%d\n", pid); ret = write(pid_file_fd, pid_string, strlen(pid_string)); if (ret != strlen(pid_string)) { bio_print_warning(_("There is an exception to write PID file: %s\n"), pid_file); } setlocale (LC_ALL, ""); bindtextdomain(DOMAIN_NAME, LOCALEDIR); textdomain(DOMAIN_NAME); mesg_nodev = _("No such device"); mesg_devbusy = _("Device busy"); ret = InitBioDevice(); if (ret != 0) { bio_print_error(_("Initial biometric recognition framework failed\n")); return -1; } int err; pthread_t thr; err = pthread_create(&thr, NULL, (void *)monitor_usb_hotplug, NULL); if (err != 0) { bio_print_error(_("Can't create thread: %s\n"), strerror(err)); } else { bio_print_info(_("New thread created: %s\n"), strerror(err)); } for (i = 0; i < MAX_DEVICES; i++) { pthread_mutex_init(&dev_dbus_mutex[i], NULL); gettimeofday(×tamp_dev_status[i], NULL); gettimeofday(×tamp_ops_result[i], NULL); gettimeofday(×tamp_notify_mid[i], NULL); } InitBioDBusCommServer(); g_main_loop_run(pLoop); g_main_loop_unref(pLoop); UnInitBioDevice(); flock(pid_file_fd, LOCK_UN); close(pid_file_fd); return 0; } biometric-authentication/src/Makefile.am0000644000175000017500000000264513517470404017327 0ustar fengfengNULL = SUBDIRS = lib drivers utils DESC_XML = $(top_srcdir)/data/org.ukui.Biometric.xml GENERATED_CH = biometric-generated libexec_PROGRAMS = biometric-authenticationd COMM_CFS = -Wall -g -I$(top_srcdir)/src/lib COMM_LIBS = -Llib -lbiometric COMM_LDFS = -Wl,-z,now DOMAIN_NAME = -DDOMAIN_NAME=\""$(PACKAGE)"\" LOCALEDIR_CFS = -DLOCALEDIR=\""$(localedir)"\" biometric_authenticationd_SOURCES = \ biometric-authenticationd.h biometric-authenticationd.c \ biometric-dbus-common.h biometric-dbus-common.c \ biometric-generated.h biometric-generated.c \ dbus_comm.h \ $(NULL) biometric_authenticationd_INCLUDE = biometric_common.h biometric_version.h biometric_authenticationd_CFLAGS = $(COMM_CFS) $(LOCALEDIR_CFS) \ $(GLIB_2_CFLAGS) $(GIO_2_CFLAGS) $(GIO_UNIX_2_CFLAGS) $(GTK_3_CFLAGS) \ $(GOBJECT_2_CFLAGS) $(LIBUSB_1_CFLAGS) $(SQLITE3_CFLAGS) $(POLKIT_CFLAGS) \ $(NULL) biometric_authenticationd_LDADD = $(COMM_LIBS) \ $(GLIB_2_LIBS) $(GIO_2_LIBS) $(GIO_UNIX_2_LIBS) $(GTK_3_LIBS) \ $(GOBJECT_2_LIBS) $(LIBUSB_1_LIBS) $(SQLITE3_LIBS) $(POLKIT_LIBS) \ $(NULL) biometric_authenticationd_LDFLAGS = $(COMM_LDFS) biometric-authenticationd.h: biometric-generated.h biometric-authenticationd.c: biometric-generated.c biometric-generated.h biometric-generated.c: $(DESC_XML) gdbus-codegen --interface-prefix org.ukui. --generate-c-code $(GENERATED_CH) $(DESC_XML) clean-local: rm -rf biometric-generated.h biometric-generated.c biometric-authentication/src/utils/0000755000175000017500000000000013527404024016420 5ustar fengfengbiometric-authentication/src/utils/biometric-config-tool/0000755000175000017500000000000013755706021022620 5ustar fengfengbiometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-set-key.h0000644000175000017500000000217613755706021030551 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRICCONFIGTOOLSETKEY_H #define BIOMETRICCONFIGTOOLSETKEY_H #include //gboolean force_override; //gboolean ignore_exist; //gboolean key_is_exist; gboolean biometric_config_set_key (int argc, char **argv, GError **error); #endif // BIOMETRICCONFIGTOOLSETKEY_H biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-remove-key.c0000644000175000017500000000525413755706021031246 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include "biometric_config.h" #include "biometric-config-tool-main.h" #include "biometric-config-tool-remove-key.h" extern GKeyFile * bio_config_file; extern gboolean driver_ignore; GOptionEntry remove_key_entries[] = { { "ignore", 'i', 0, G_OPTION_ARG_NONE, &driver_ignore, N_("Ignore nonexistent drivers"), NULL}, { NULL } }; gboolean biometric_config_remove_key (int argc, char **argv, GError **error) { int i = 0; GOptionContext *context; context = g_option_context_new (_("DriverName Key")); g_option_context_add_main_entries (context, remove_key_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, error)) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); g_printerr (_("Error parsing commandline options: %s\n"), (*error)->message); exit (1); } if (argc != 3) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); GError *error = NULL; g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("The number of parameters is incorrect")); g_printerr (_("Error parsing commandline options: %s\n"), error->message); g_error_free (error); exit (1); } if ((!g_key_file_has_group (bio_config_file, argv[1])) && (!driver_ignore)) { g_printerr (_("Driver %s does not exist, if you need to ignore the " "problem, use -i parameter\n"), argv[i]); exit (1); } for (i = 2; i < argc; i++) { g_key_file_remove_key (bio_config_file, argv[1], argv[i], NULL); } if (!g_key_file_save_to_file (bio_config_file, DRIVERS_CONFIG_FILE, error)) { g_printerr (_("Write configuration failure: %s\n"), (*error)->message); exit (1); } return TRUE; } biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c0000644000175000017500000000550013755706021032051 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include "biometric_config.h" #include "biometric-config-tool-main.h" #include "biometric-config-tool-disable-driver.h" extern GKeyFile * bio_config_file; extern gboolean driver_ignore; GOptionEntry disable_driver_entries[] = { { "ignore", 'i', 0, G_OPTION_ARG_NONE, &driver_ignore, N_("Ignore nonexistent drivers"), NULL}, { NULL } }; gboolean biometric_config_disable_driver (int argc, char **argv, GError **error) { int i = 0; GOptionContext *context; context = g_option_context_new (_("Driver1 [Driver2 ...]")); g_option_context_add_main_entries (context, disable_driver_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, error)) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); g_printerr (_("Error parsing commandline options: %s\n"), (*error)->message); exit (1); } if (argc < 2) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); GError *error = NULL; g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("The number of parameters is incorrect")); g_printerr (_("Error parsing commandline options: %s\n"), error->message); g_error_free (error); exit (1); } for (i = 1; i < argc; i++) if ((!g_key_file_has_group (bio_config_file, argv[i])) && (!driver_ignore)) { g_printerr (_("Driver %s does not exist, if you need to ignore the " "problem, use -i parameter\n"), argv[i]); exit (1); } for (i = 1; i < argc; i++) { if (g_key_file_has_group (bio_config_file, argv[i])) { g_key_file_set_boolean (bio_config_file, argv[i], "Enable", FALSE); } } if (!g_key_file_save_to_file (bio_config_file, DRIVERS_CONFIG_FILE, error)) { g_printerr (_("Write configuration failure: %s\n"), (*error)->message); exit (1); } return TRUE; } biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c0000644000175000017500000000535313755706021031751 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include "biometric_config.h" #include "biometric-config-tool-main.h" #include "biometric-config-tool-remove-driver.h" extern GKeyFile * bio_config_file; extern gboolean driver_ignore; GOptionEntry remove_driver_entries[] = { { "ignore", 'i', 0, G_OPTION_ARG_NONE, &driver_ignore, N_("Ignore nonexistent drivers"), NULL}, { NULL } }; gboolean biometric_config_remove_driver (int argc, char **argv, GError **error) { int i = 0; GOptionContext *context; context = g_option_context_new (_("Driver1 [Driver2 ...]")); g_option_context_add_main_entries (context, remove_driver_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, error)) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); g_printerr (_("Error parsing commandline options: %s\n"), (*error)->message); exit (1); } if (argc < 2) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); GError *error = NULL; g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("The number of parameters is incorrect")); g_printerr (_("Error parsing commandline options: %s\n"), error->message); g_error_free (error); exit (1); } for (i = 1; i < argc; i++) if ((!g_key_file_has_group (bio_config_file, argv[i])) && (!driver_ignore)) { g_printerr (_("Driver %s does not exist, if you need to ignore the " "problem, use -i parameter\n"), argv[i]); exit (1); } for (i = 1; i < argc; i++) { g_key_file_remove_group (bio_config_file, argv[i], NULL); } if (!g_key_file_save_to_file (bio_config_file, DRIVERS_CONFIG_FILE, error)) { g_printerr (_("Write configuration failure: %s\n"), (*error)->message); exit (1); } return TRUE; } biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-remove-driver.h0000644000175000017500000000214313755706021031750 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRICCONFIGTOOLREMOVEDRIVER_H #define BIOMETRICCONFIGTOOLREMOVEDRIVER_H #include //gboolean driver_ignore; gboolean biometric_config_remove_driver (int argc, char **argv, GError **error); #endif // BIOMETRICCONFIGTOOLREMOVEDRIVER_H biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-disable-driver.h0000644000175000017500000000214713755706021032062 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRICCONFIGTOOLDISABLEDRIVER_H #define BIOMETRICCONFIGTOOLDISABLEDRIVER_H #include //gboolean driver_ignore; gboolean biometric_config_disable_driver (int argc, char **argv, GError **error); #endif // BIOMETRICCONFIGTOOLDISABLEDRIVER_H biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-set-key.c0000644000175000017500000000666113755706021030547 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include "biometric_config.h" #include "biometric-config-tool-main.h" #include "biometric-config-tool-set-key.h" extern gboolean force_override; extern gboolean ignore_exist; extern gboolean key_is_exist; extern GKeyFile * bio_config_file; GOptionEntry set_key_entries[] = { { "force", 'f', 0, G_OPTION_ARG_NONE, &force_override, N_("Forcibly overrides the existing key"), NULL}, { "ignore", 'i', 0, G_OPTION_ARG_NONE, &ignore_exist, N_("Ignore this setting if the key already exists"), NULL}, { NULL } }; gboolean biometric_config_set_key (int argc, char **argv, GError **error) { char * driver_name = NULL; char * key = NULL; char * value = NULL; GOptionContext *context; context = g_option_context_new (_("DriverName Key Value")); g_option_context_add_main_entries (context, set_key_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, error)) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); g_printerr (_("Error parsing commandline options: %s\n"), (*error)->message); exit (1); } if (argc != 4) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); GError *error = NULL; g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("The number of parameters is incorrect")); g_printerr (_("Error parsing commandline options: %s\n"), error->message); g_error_free (error); exit (1); } driver_name = argv[1]; key = argv[2]; if (argc == 3) value = ""; else value = argv[3]; if (!g_key_file_has_group (bio_config_file, driver_name)) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); g_printerr (_("Driver %s does not exist\n"), driver_name); exit (1); } else { key_is_exist = g_key_file_has_key (bio_config_file, driver_name, key, NULL); if (key_is_exist && ignore_exist) return TRUE; if (key_is_exist && !force_override) { g_printerr (_("The key already exists and is not forcibly " "overwritten, ignoring the setting operation\n" "If you want to ignore this error, use the " "\"-i\" parameter\n")); exit (1); } g_key_file_set_value (bio_config_file, driver_name, key, value); if (!g_key_file_save_to_file (bio_config_file, DRIVERS_CONFIG_FILE, error)) { g_printerr (_("Write configuration failure: %s\n"), (*error)->message); exit (1); } } return TRUE; } biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-add-driver.c0000644000175000017500000000612513755706021031202 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include "biometric_config.h" #include "biometric-config-tool-main.h" #include "biometric-config-tool-add-driver.h" extern GKeyFile * bio_config_file; extern gboolean force_override; extern gboolean driver_disable; GOptionEntry add_driver_entries[] = { { "force", 'f', 0, G_OPTION_ARG_NONE, &force_override, N_("When there is a driver of the same name, force to override it"), NULL}, { "disable", 'd', 0, G_OPTION_ARG_NONE, &driver_disable, N_("Only add driver and Not enable driver"), NULL}, { NULL } }; gboolean biometric_config_add_driver (int argc, char **argv, GError **error) { char * driver_name = NULL; char * driver_path = NULL; GOptionContext *context; context = g_option_context_new (_("DriverName DriverFilePath")); g_option_context_add_main_entries (context, add_driver_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, error)) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); g_printerr (_("Error parsing commandline options: %s\n"), (*error)->message); exit (1); } if (argc != 3) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); GError *error = NULL; g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("The number of parameters is incorrect")); g_printerr (_("Error parsing commandline options: %s\n"), error->message); g_error_free (error); exit (1); } driver_name = argv[1]; driver_path = argv[2]; if (g_key_file_has_group (bio_config_file, driver_name) && (!force_override)) { g_printerr (_("This driver already exists, using the -f parameter if you " "need to override the configuration\n")); exit (1); } else { g_key_file_set_boolean (bio_config_file, driver_name, "Enable", !driver_disable); g_key_file_set_value (bio_config_file, driver_name, "Driver", driver_path); if (!g_key_file_save_to_file (bio_config_file, DRIVERS_CONFIG_FILE, error)) { g_printerr (_("Write configuration failure: %s\n"), (*error)->message); exit (1); } } return TRUE; } biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-remove-key.h0000644000175000017500000000212713755706021031247 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRICCONFIGTOOLREMOVEKEY_H #define BIOMETRICCONFIGTOOLREMOVEKEY_H #include //gboolean driver_ignore; gboolean biometric_config_remove_key (int argc, char **argv, GError **error); #endif // BIOMETRICCONFIGTOOLREMOVEKEY_H biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-main.c0000644000175000017500000001504513755706021030106 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include "biometric_config.h" #include "biometric-config-tool-main.h" #include "biometric-config-tool-add-driver.h" #include "biometric-config-tool-remove-driver.h" #include "biometric-config-tool-enable-driver.h" #include "biometric-config-tool-disable-driver.h" #include "biometric-config-tool-set-key.h" #include "biometric-config-tool-remove-key.h" GKeyFile * bio_config_file; gboolean force_override; gboolean driver_disable; gboolean driver_ignore; gboolean ignore_exist; gboolean key_is_exist; typedef struct { const char *name; const char *description; gboolean (*fn)(int argc, char **argv, GError **error); } BiometricConfigCommand; static BiometricConfigCommand commands[] = { { "add-driver", N_("Add driver"), biometric_config_add_driver }, { "remove-driver", N_("Remove drive"), biometric_config_remove_driver }, { "enable-driver", N_("Enable driver"), biometric_config_enable_driver }, { "disable-driver", N_("Disable driver"), biometric_config_disable_driver }, { "set-key", N_("Set the key value of the specified driver"), biometric_config_set_key }, { "remove-key", N_("remove the key value of the specified driver"), biometric_config_remove_key }, { NULL } }; GOptionEntry global_entries[] = { { NULL } }; int config_init() { bio_config_file = g_key_file_new(); GError *err = NULL; g_key_file_load_from_file(bio_config_file, DRIVERS_CONFIG_FILE, G_KEY_FILE_KEEP_COMMENTS, &err); if (err != NULL) { // 若配置文件不存在,继续执行 if (err->code == 4) { g_error_free(err); return 0; } g_printerr ("Loading configuration file error[%d]: %s\n", err->code, err->message); g_error_free(err); err = NULL; return -1; } return 0; } void config_free() { g_key_file_free(bio_config_file); } GKeyFile * get_config() { return bio_config_file; } static GOptionContext * biometric_config_option_context_new_with_commands (BiometricConfigCommand *commands) { GOptionContext *context; GString *description; context = g_option_context_new (_("BuiltinCommands")); // g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); description = g_string_new (_("Builtin commands: ")); while (commands->name != NULL) { if (commands->fn != NULL) { g_string_append_printf (description, "\n %s", commands->name); if (commands->description) g_string_append_printf (description, "%*s%s", (int) (20 - strlen (commands->name)), "", _(commands->description)); } else { g_string_append_printf (description, "\n%s", commands->name); } commands++; } g_string_append_printf (description, "\n"); g_option_context_set_description (context, description->str); g_string_free (description, TRUE); return context; } static int biometric_config_usage(BiometricConfigCommand *commands, gboolean is_error) { GOptionContext *context; g_autofree char *help = NULL; context = biometric_config_option_context_new_with_commands (commands); g_option_context_add_main_entries (context, global_entries, NULL); help = g_option_context_get_help (context, FALSE, NULL); if (is_error) g_printerr ("%s", help); else g_print ("%s", help); g_option_context_free (context); return is_error ? 1 : 0; } static BiometricConfigCommand * extract_command (int *argc, char **argv, const char **command_name_out) { BiometricConfigCommand *command; const char *command_name = NULL; int in, out; for (in = 1, out = 1; in < *argc; in++, out++) { if (argv[in][0] != '-') { if (command_name == NULL) { command_name = argv[in]; out--; continue; } } argv[out] = argv[in]; } *argc = out; argv[out] = NULL; command = commands; while (command->name) { if (command->fn != NULL && g_strcmp0 (command_name, command->name) == 0) break; command++; } *command_name_out = command_name; return command; } static int biometric_config_run (int argc, char **argv, GError **res_error) { BiometricConfigCommand *command; GError *error = NULL; g_autofree char *prgname = NULL; gboolean success = FALSE; const char *command_name = NULL; command = extract_command (&argc, argv, &command_name); if (!command->fn) { GOptionContext *context; g_autofree char *help = NULL; context = biometric_config_option_context_new_with_commands (commands); if (command_name != NULL) { g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Unknown command %s"), command_name); } else { g_option_context_add_main_entries (context, global_entries, NULL); if (g_option_context_parse (context, &argc, &argv, &error)) { g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Missing builtin command")); } } help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); g_option_context_free (context); goto out; } prgname = g_strdup_printf ("%s %s", g_get_prgname (), command_name); g_set_prgname (prgname); if (!command->fn (argc, argv, &error)) goto out; success = TRUE; out: g_assert (success || error); if (error) { g_propagate_error (res_error, error); return 1; } return 0; } int main (int argc, char **argv) { GError *error = NULL; int ret; setlocale (LC_ALL, ""); bindtextdomain (DOMAIN_NAME, LOCALEDIR); textdomain (DOMAIN_NAME); g_set_prgname (argv[0]); config_init(); ret = biometric_config_run (argc, argv, &error); if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) biometric_config_usage(commands, TRUE); if (error != NULL) { g_printerr (_("Error parsing commandline options: %s\n"), error->message); g_error_free (error); } config_free(); return ret; } biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-enable-driver.h0000644000175000017500000000214313755706021031701 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRICCONFIGTOOLENABLEDRIVER_H #define BIOMETRICCONFIGTOOLENABLEDRIVER_H #include //gboolean driver_ignore; gboolean biometric_config_enable_driver (int argc, char **argv, GError **error); #endif // BIOMETRICCONFIGTOOLENABLEDRIVER_H biometric-authentication/src/utils/biometric-config-tool/Makefile.am0000644000175000017500000000213113517470404024650 0ustar fengfengNULL = bin_PROGRAMS = biometric-config-tool DOMAIN_NAME_CFS = -DLIBBIOMETRIC_DOMAIN_NAME=\""$(PACKAGE)"\" LOCALEDIR_CFS = -DLOCALEDIR=\""$(localedir)"\" COMM_CFS = -Wall -g $(LOCALEDIR_CFS) $(DOMAIN_NAME_CFS) -I$(top_srcdir)/src/lib COMM_LDFS = -Wl,-z,now biometric_config_tool_SOURCES = biometric-config-tool-main.c biometric-config-tool-main.h \ biometric-config-tool-add-driver.c biometric-config-tool-add-driver.h \ biometric-config-tool-remove-driver.c biometric-config-tool-remove-driver.h \ biometric-config-tool-enable-driver.c biometric-config-tool-enable-driver.h \ biometric-config-tool-disable-driver.c biometric-config-tool-disable-driver.h \ biometric-config-tool-set-key.c biometric-config-tool-set-key.h \ biometric-config-tool-remove-key.c biometric-config-tool-remove-key.h \ $(NULL) biometric_config_tool_INCLUDE = biometric_config.h biometric_config_tool_CFLAGS = $(COMM_CFS) \ $(GLIB_2_CFLAGS) $(GIO_2_CFLAGS) $(GIO_UNIX_2_CFLAGS) \ $(NULL) biometric_config_tool_LDADD = $(GLIB_2_LIBS) $(GIO_2_LIBS) $(GIO_UNIX_2_LIBS) \ $(NULL) biometric_config_tool_LDFLAGS = $(COMM_LDFS) biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-add-driver.h0000644000175000017500000000216313755706021031205 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRICCONFIGTOOLADDDRIVER_H #define BIOMETRICCONFIGTOOLADDDRIVER_H #include //gboolean force_override; //gboolean driver_disable; gboolean biometric_config_add_driver (int argc, char **argv, GError **error); #endif // BIOMETRICCONFIGTOOLADDDRIVER_H biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c0000644000175000017500000000547613755706021031710 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include "biometric_config.h" #include "biometric-config-tool-main.h" #include "biometric-config-tool-enable-driver.h" extern GKeyFile * bio_config_file; extern gboolean driver_ignore; GOptionEntry enable_driver_entries[] = { { "ignore", 'i', 0, G_OPTION_ARG_NONE, &driver_ignore, N_("Ignore nonexistent drivers"), NULL}, { NULL } }; gboolean biometric_config_enable_driver (int argc, char **argv, GError **error) { int i = 0; GOptionContext *context; context = g_option_context_new (_("Driver1 [Driver2 ...]")); g_option_context_add_main_entries (context, enable_driver_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, error)) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); g_printerr (_("Error parsing commandline options: %s\n"), (*error)->message); exit (1); } if (argc < 2) { char * help; help = g_option_context_get_help (context, FALSE, NULL); g_printerr ("%s", help); GError *error = NULL; g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("The number of parameters is incorrect")); g_printerr (_("Error parsing commandline options: %s\n"), error->message); g_error_free (error); exit (1); } for (i = 1; i < argc; i++) if ((!g_key_file_has_group (bio_config_file, argv[i])) && (!driver_ignore)) { g_printerr (_("Driver %s does not exist, if you need to ignore the " "problem, use -i parameter\n"), argv[i]); exit (1); } for (i = 1; i < argc; i++) { if (g_key_file_has_group (bio_config_file, argv[i])) { g_key_file_set_boolean (bio_config_file, argv[i], "Enable", TRUE); } } if (!g_key_file_save_to_file (bio_config_file, DRIVERS_CONFIG_FILE, error)) { g_printerr (_("Write configuration failure: %s\n"), (*error)->message); exit (1); } return TRUE; } biometric-authentication/src/utils/biometric-config-tool/biometric-config-tool-main.h0000644000175000017500000000225713755706021030114 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRICCONFIG_H #define BIOMETRICCONFIG_H #include #include //#include "biometric_intl.h" //GKeyFile * bio_config_file; #ifndef DOMAIN_NAME #define DOMAIN_NAME "biometric-authentication" #endif #ifndef LOCALEDIR #define LOCALEDIR "/usr/local/share/locale/" #endif #endif // BIOMETRICCONFIG_H biometric-authentication/src/utils/biometric-auth-client/0000755000175000017500000000000013755706021022615 5ustar fengfengbiometric-authentication/src/utils/biometric-auth-client/biometric-auth-client.in0000644000175000017500000006464213755706021027351 0ustar fengfeng#!/usr/bin/python3 # -*- coding: UTF-8 -*- import sys import signal import pwd import getpass import gettext from optparse import OptionParser from prettytable import PrettyTable import dbus import dbus.mainloop.glib from gi.repository import GLib # if sys.getdefaultencoding() != 'utf-8': # reload(sys) # sys.setdefaultencoding('utf-8') DOMAIN_NAME = "BIO_DOMAIN_NAME" LOCALEDIR = "BIO_LOCALEDIR" gettext.bindtextdomain(DOMAIN_NAME, LOCALEDIR) gettext.textdomain(DOMAIN_NAME) _ = gettext.gettext UKUI_GDBUS_BIO_BUS_NAME = 'org.ukui.Biometric' UKUI_GDBUS_BIO_OBJECT_PATH = '/org/ukui/Biometric' DBUS_OPS_TIMEOUT = 300 RetOpsSuccess = 0 RetOpsNoMatch = -1 RetOpsError = -2 RetDeviceBusy = -3 RetNoSuchDevice = -4 RetPermissionDenied = -5 OPS_TYPE_COMM = 0 OPS_TYPE_OPEN = 1 OPS_TYPE_ENROLL = 2 OPS_TYPE_VERIFY = 3 OPS_TYPE_IDENTIFY = 4 OPS_TYPE_CAPTURE = 5 OPS_TYPE_SEARCH = 6 OPS_TYPE_CLEAN = 7 OPS_TYPE_GET_FLIST = 8 OPS_TYPE_RENAME = 9 OPS_TYPE_CLOSE = 10 ExitNormal = 0 ExitParamError = 1 ExitDBusNotExist = 2 ExitStopOpsFailed = 3 ExitAppApiNotMatch = 4 APP_API_MAJOR = 0 APP_API_MINOR = 11 APP_API_FUNC = 1 DrvEnableList = [_("Disable"), _("Enable")] DrvBioTypeList = [_("Finger Print"), _("Finger Vein"), _("Iris"), _("Face"), _("Voice Print")] DrvStoTypeList = [_("Device"), _("OS"), _("Device and OS")] DrvEigTypeList = [_("Original Data"), _("Eigen Value"), _("Eigen Vector")] DrvVerTypeList = [_("Hardware"), _("Software"), _("Mix"), _("Other")] DrvIdTypeList = [_("Hardware"), _("Software"), _("Mix"), _("Other")] DrvBusTypeList = [0 for i in range(102)] DrvBusTypeList[0:3] = [_("Serial"), _("USB"), _("PCIE")] DrvBusTypeList[100] = _("Any") DrvBusTypeList[101] = _("Other") DrvOpsList = [_("Common"), _("Open"), _("Enroll"), _("Verify"), _("Identify"), _("Capture"), _("Search"), _("Clean"), _("GetFeatureList"), _("Rename"), _("Close")] mainUsage = _("Usage:\n" " biometric-auth-client BuiltinCommands ..." "\n" "\n" "BuiltinCommands:\n" " get-driver-list Get Driver List\n" " get-device-list Get Device List\n" " get-feature-list Get Feature List\n" " enroll Enroll Feature\n" " verify Verify Feature\n" " capture Capture Feature\n" " search Search Feature\n" " clean Clean Feature\n" " rename Rename Feature\n" "\n" "Options:\n" " -h, --help show this help message and exit\n") notifyMSG = "" msgLines = 0 retCode = 0 opsDrvID = 0 opsType = OPS_TYPE_COMM stopOpsTimeout = 5 loop = GLib.MainLoop() def getUidByUname(uname): for uinfo in pwd.getpwall(): if uinfo[0] == uname: return uinfo[2] return -1 def getUnameByUID(uid): for uinfo in pwd.getpwall(): if uinfo[2] == uid: return uinfo[0] return _("non-existent user") def getNotifyMsg(drvid): notifyMsgBus = dbus.SystemBus() proxy = notifyMsgBus.get_object('org.ukui.Biometric', UKUI_GDBUS_BIO_OBJECT_PATH) bioIF = dbus.Interface(proxy, dbus_interface=UKUI_GDBUS_BIO_BUS_NAME) mGetList = bioIF.get_dbus_method("GetNotifyMesg", dbus_interface=None) mReturn = mGetList(drvid) msgString = mReturn[0] return msgString def outputMsg(drvid): global msgLines global notifyMSG if msgLines != 0: print(("\033[%dA" % (msgLines)), end='') print("\r\033[K\r", end='') notifyMSG = getNotifyMsg(drvid) msgLines = len(notifyMSG.split('\n')) - 1 print(notifyMSG, end='') sys.stdout.flush() def statusChangedHandler(drvid, statusType): if drvid == opsDrvID and statusType == 2: outputMsg(drvid) def ops_handle_retcode_reply(ret): global retCode retCode = ret if ret == RetDeviceBusy: print(_("The device is busy, please try again later")) if ret == RetNoSuchDevice: print(_("No such device")) if ret == RetPermissionDenied: print(_("No permission to perform this operation")) sys.stdout.flush() loop.quit() def ops_handle_capture_reply(ret, eigen_base64): global retCode retCode = ret if ret == RetDeviceBusy: print(_("The device is busy, please try again later")) if ret == RetNoSuchDevice: print(_("No such device")) if ret == RetPermissionDenied: print(_("No permission to perform this operation")) if ret == RetOpsSuccess: print(_("Character string: %s\n") % (eigen_base64)) loop.quit() def ops_handle_search_reply(count, feature_list): global retCode retCode = count if count == RetDeviceBusy: print(_("The device is busy, please try again later")) if count == RetNoSuchDevice: print(_("No such device")) if count == RetPermissionDenied: print(_("No permission to perform this operation")) if count > 0: drvTable = PrettyTable([_("No."), _("User ID"), _("User Name"), _("Feature Index"), _("Feature Name")]) no = 0 for feature_info in feature_list: no = no + 1 uid = feature_info[0] index = feature_info[1] index_name = feature_info[2] user_name = getUnameByUID(uid) drvTable.add_row([no, uid, user_name, index, index_name]) if msgLines != 0: print("\033[%dA" % (msgLines), end='') print("\r\033[K\r", end='') print(_("List of features found:")) print(drvTable.get_string()) loop.quit() def ops_handle_get_feature_list_reply(count, feature_list): global retCode retCode = count if count == RetDeviceBusy: print(_("The device is busy, please try again later")) if count == RetNoSuchDevice: print(_("No such device")) if count == RetPermissionDenied: print(_("No permission to perform this operation")) if count >= 0: drvTable = PrettyTable([_("No."), _("User ID"), _("User Name"), _("Biometric Type"), _("Driver Name"), _("Feature Index"), _("Feature Name")]) no = 0 for feature_info in feature_list: no = no + 1 uid = feature_info[0] user_name = getUnameByUID(uid) biotype = DrvBioTypeList[feature_info[1]] driver_name = feature_info[2] index = feature_info[3] index_name = feature_info[4] drvTable.add_row([no, uid, user_name, biotype, driver_name, index, index_name]) if msgLines != 0: print(("\033[%dA" % (msgLines)), end='') print("\r\033[K\r", end='') print(_("List of features found:")) print(drvTable.get_string()) loop.quit() def ops_handle_error(err): print(str(err)) loop.quit() def getDrvOrDevList(argList, getType): if getType == "driver": method = "GetDrvList" else: method = "GetDevList" usage = "%s %s [-afbsevi]" % (sys.argv[0], sys.argv[1]) opt = OptionParser(usage) opt.add_option("-a", action="store_true", dest="showAll", default=False, help=_("Show all fields (Highest priority)")) opt.add_option("-f", action="store_true", dest="showFullName", default=False, help=_("Show 'Driver Full Name' fields")) opt.add_option("-b", action="store_true", dest="showBioType", default=False, help=_("Show 'Biometric Type' fields")) opt.add_option("-s", action="store_true", dest="showStoType", default=False, help=_("Show 'Storge Type' fields")) opt.add_option("-e", action="store_true", dest="showEigType", default=False, help=_("Show 'Eigen Type' fields")) opt.add_option("-v", action="store_true", dest="showVerType", default=False, help=_("Show 'Verify Type' fields")) opt.add_option("-i", action="store_true", dest="showIdType", default=False, help=_("Show 'Identify Type' fields")) options = opt.parse_args(args=argList) drvTable = PrettyTable([_("No."), _("Driver ID"), _("Driver Name"), _("Driver Full Name"), _("Status"), _("Biometric Type"), _("Storge Type"), _("Eigen Type"), _("Verify Type"), _("Identify Type"), _("Bus Type")]) bus = dbus.SystemBus() try: proxy = bus.get_object('org.ukui.Biometric', UKUI_GDBUS_BIO_OBJECT_PATH) except dbus.DBusException: print(_("Biometric identification backend framework service is not started")) sys.exit(ExitDBusNotExist) bioIF = dbus.Interface(proxy, dbus_interface=UKUI_GDBUS_BIO_BUS_NAME) api_check = bioIF.CheckAppApiVersion(APP_API_MAJOR, APP_API_MINOR, APP_API_FUNC) if api_check > 0: sys.stderr.write(_("Client APP_API is newer than biometric identification framework service." " Please upgrade framework service or degrade client.\n")) sys.exit(ExitAppApiNotMatch) if api_check < 0: sys.stderr.write(_("Client APP_API is older than biometric identification framework service." " Please degrade framework service or upgrade client.\n")) sys.exit(ExitAppApiNotMatch) mGetList = bioIF.get_dbus_method(method, dbus_interface=None) mReturn = mGetList() drvList = mReturn[1] no = 0 for drvInfo in drvList: no = no + 1 drvID = drvInfo[0] drvName = drvInfo[1] drvFullName = drvInfo[2] drvEnable = drvInfo[3] drvBioType = drvInfo[5] drvStoType = drvInfo[6] drvEigType = drvInfo[7] drvVerType = drvInfo[8] drvIdType = drvInfo[9] drvBusType = drvInfo[10] drvTable.add_row([no, drvID, drvName, drvFullName, DrvEnableList[drvEnable], DrvBioTypeList[drvBioType], DrvStoTypeList[drvStoType], DrvEigTypeList[drvEigType], DrvVerTypeList[drvVerType], DrvIdTypeList[drvIdType], DrvBusTypeList[drvBusType]]) outputFields = [_("No."), _("Driver ID"), _("Driver Name"), _("Status"), _("Bus Type")] if options[0].showAll: options[0].showFullName = True options[0].showBioType = True options[0].showStoType = True options[0].showEigType = True options[0].showVerType = True options[0].showIdType = True if options[0].showFullName: outputFields.append(_("Driver Full Name")) outputFields.append(_("Status")) if options[0].showBioType: outputFields.append(_("Biometric Type")) if options[0].showStoType: outputFields.append(_("Storge Type")) if options[0].showEigType: outputFields.append(_("Eigen Type")) if options[0].showVerType: outputFields.append(_("Verify Type")) if options[0].showIdType: outputFields.append(_("Identify Type")) outputFields.append(_("Bus Type")) return drvTable.get_string(fields=outputFields) def doGetDrvList(argList): drvlist = getDrvOrDevList(argList, "driver") print(drvlist) sys.exit(ExitNormal) def doGetDevList(argList): devlist = getDrvOrDevList(argList, "device") print(devlist) sys.exit(ExitNormal) def doEnroll(argList): _ = gettext.gettext global opsType global opsDrvID opsType = OPS_TYPE_ENROLL usage = _("%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME") % (sys.argv[0], sys.argv[1]) opt = OptionParser(usage) opt.add_option("-u", action="store", type="string", dest="user_name", default=None, help=_("User Name (Default is current user: %s)") % getpass.getuser()) opt.add_option("-d", action="store", type="int", dest="driver_id", default=-1, help=_("Driver(or Device) ID")) opt.add_option("-n", action="store", type="string", dest="feature_name", default=None, help=_("Feature Name")) options = opt.parse_args(args=argList) if options[0].user_name is None: options[0].user_name = getpass.getuser() uid = getUidByUname(options[0].user_name) opsDrvID = options[0].driver_id fname = options[0].feature_name if uid == -1 or opsDrvID == -1 or fname is None: sys.stderr.write(_("Input parameter error\n")) sys.stderr.write(opt.get_usage()) sys.exit(ExitParamError) dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() try: proxy = bus.get_object('org.ukui.Biometric', UKUI_GDBUS_BIO_OBJECT_PATH) except dbus.DBusException: print(_("Biometric identification backend framework service is not started")) sys.exit(ExitDBusNotExist) bus.add_signal_receiver(statusChangedHandler, dbus_interface="org.ukui.Biometric", signal_name="StatusChanged") bioIF = dbus.Interface(proxy, dbus_interface=UKUI_GDBUS_BIO_BUS_NAME) api_check = bioIF.CheckAppApiVersion(APP_API_MAJOR, APP_API_MINOR, APP_API_FUNC) if api_check > 0: sys.stderr.write(_("Client APP_API is newer than biometric identification framework service." " Please upgrade framework service or degrade client.\n")) sys.exit(ExitAppApiNotMatch) if api_check < 0: sys.stderr.write(_("Client APP_API is older than biometric identification framework service." " Please degrade framework service or upgrade client.\n")) sys.exit(ExitAppApiNotMatch) bioIF.Enroll(opsDrvID, uid, -1, fname, timeout=DBUS_OPS_TIMEOUT, reply_handler=ops_handle_retcode_reply, error_handler=ops_handle_error) loop.run() if retCode >= RetOpsError: outputMsg(opsDrvID) print() sys.exit(retCode) def doVerify(argList): global opsType global opsDrvID opsType = OPS_TYPE_VERIFY usage = _("%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX") % (sys.argv[0], sys.argv[1]) opt = OptionParser(usage) opt.add_option("-u", action="store", type="string", dest="user_name", default=None, help=_("User Name (Default is current user: %s)") % getpass.getuser()) opt.add_option("-d", action="store", type="int", dest="driver_id", default=-1, help=_("Driver(or Device) ID")) opt.add_option("-i", action="store", type="int", dest="index", default=-1, help=_("Feature Index")) options = opt.parse_args(args=argList) if options[0].user_name is None: options[0].user_name = getpass.getuser() uid = getUidByUname(options[0].user_name) opsDrvID = options[0].driver_id index = options[0].index if uid == -1 or opsDrvID == -1 or index == -1: sys.stderr.write(_("Input parameter error\n")) sys.stderr.write(opt.get_usage()) sys.exit(ExitParamError) dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() try: proxy = bus.get_object('org.ukui.Biometric', UKUI_GDBUS_BIO_OBJECT_PATH) except dbus.DBusException: print(_("Biometric identification backend framework service is not started")) sys.exit(ExitDBusNotExist) bus.add_signal_receiver(statusChangedHandler, dbus_interface="org.ukui.Biometric", signal_name="StatusChanged") bioIF = dbus.Interface(proxy, dbus_interface=UKUI_GDBUS_BIO_BUS_NAME) api_check = bioIF.CheckAppApiVersion(APP_API_MAJOR, APP_API_MINOR, APP_API_FUNC) if api_check > 0: sys.stderr.write(_("Client APP_API is newer than biometric identification framework service." " Please upgrade framework service or degrade client.\n")) sys.exit(ExitAppApiNotMatch) if api_check < 0: sys.stderr.write(_("Client APP_API is older than biometric identification framework service." " Please degrade framework service or upgrade client.\n")) sys.exit(ExitAppApiNotMatch) bioIF.Verify(opsDrvID, uid, index, timeout=DBUS_OPS_TIMEOUT, reply_handler=ops_handle_retcode_reply, error_handler=ops_handle_error) loop.run() if retCode >= RetOpsError: outputMsg(opsDrvID) print() sys.exit(retCode) def doCapture(argList): global opsType global opsDrvID opsType = OPS_TYPE_CAPTURE usage = _("%s %s -d DRIVER_ID") % (sys.argv[0], sys.argv[1]) opt = OptionParser(usage) opt.add_option("-d", action="store", type="int", dest="driver_id", default=-1, help=_("Driver(or Device) ID")) options = opt.parse_args(args=argList) opsDrvID = options[0].driver_id if opsDrvID == -1: sys.stderr.write(_("Input parameter error\n")) sys.stderr.write(opt.get_usage()) sys.exit(ExitParamError) dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() try: proxy = bus.get_object('org.ukui.Biometric', UKUI_GDBUS_BIO_OBJECT_PATH) except dbus.DBusException: print(_("Biometric identification backend framework service is not started")) sys.exit(ExitDBusNotExist) bus.add_signal_receiver(statusChangedHandler, dbus_interface="org.ukui.Biometric", signal_name="StatusChanged") bioIF = dbus.Interface(proxy, dbus_interface=UKUI_GDBUS_BIO_BUS_NAME) api_check = bioIF.CheckAppApiVersion(APP_API_MAJOR, APP_API_MINOR, APP_API_FUNC) if api_check > 0: sys.stderr.write(_("Client APP_API is newer than biometric identification framework service." " Please upgrade framework service or degrade client.\n")) sys.exit(ExitAppApiNotMatch) if api_check < 0: sys.stderr.write(_("Client APP_API is older than biometric identification framework service." " Please degrade framework service or upgrade client.\n")) sys.exit(ExitAppApiNotMatch) bioIF.Capture(opsDrvID, timeout=DBUS_OPS_TIMEOUT, reply_handler=ops_handle_capture_reply, error_handler=ops_handle_error) loop.run() if retCode >= RetOpsError: outputMsg(opsDrvID) print() sys.exit(retCode) def doSearch(argList): global opsType global opsDrvID opsType = OPS_TYPE_SEARCH usage = _("%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]") % (sys.argv[0], sys.argv[1]) opt = OptionParser(usage) opt.add_option("-u", action="store", type="string", dest="user_name", default=None, help=_("User Name (Not set to search for all users)")) opt.add_option("-d", action="store", type="int", dest="driver_id", default=-1, help=_("Driver(or Device) ID")) opt.add_option("-s", action="store", type="int", dest="index_start", default=0, help=_("Start of Feature Index (default 0)")) opt.add_option("-e", action="store", type="int", dest="index_end", default=-1, help=_("End of Feature Index (default -1, means search all)")) options = opt.parse_args(args=argList) if options[0].user_name is None: uid = -1 else: uid = getUidByUname(options[0].user_name) opsDrvID = options[0].driver_id index_start = options[0].index_start index_end = options[0].index_end if opsDrvID <= -1 or index_start < 0 or index_end < -1: sys.stderr.write(_("Input parameter error\n")) sys.stderr.write(opt.get_usage()) sys.exit(ExitParamError) dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() try: proxy = bus.get_object('org.ukui.Biometric', UKUI_GDBUS_BIO_OBJECT_PATH) except dbus.DBusException: print(_("Biometric identification backend framework service is not started")) sys.exit(ExitDBusNotExist) bus.add_signal_receiver(statusChangedHandler, dbus_interface="org.ukui.Biometric", signal_name="StatusChanged") bioIF = dbus.Interface(proxy, dbus_interface=UKUI_GDBUS_BIO_BUS_NAME) api_check = bioIF.CheckAppApiVersion(APP_API_MAJOR, APP_API_MINOR, APP_API_FUNC) if api_check > 0: sys.stderr.write(_("Client APP_API is newer than biometric identification framework service." " Please upgrade framework service or degrade client.\n")) sys.exit(ExitAppApiNotMatch) if api_check < 0: sys.stderr.write(_("Client APP_API is older than biometric identification framework service." " Please degrade framework service or upgrade client.\n")) sys.exit(ExitAppApiNotMatch) bioIF.Search(opsDrvID, uid, index_start, index_end, timeout=DBUS_OPS_TIMEOUT, reply_handler=ops_handle_search_reply, error_handler=ops_handle_error) loop.run() if retCode >= RetOpsError: outputMsg(opsDrvID) print() sys.exit(retCode) def doClean(argList): global opsType global opsDrvID opsType = OPS_TYPE_CLEAN usage = _("%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX") % (sys.argv[0], sys.argv[1]) opt = OptionParser(usage) opt.add_option("-u", action="store", type="string", dest="user_name", default=None, help=_("User Name (Default is current user: %s)") % getpass.getuser()) opt.add_option("-d", action="store", type="int", dest="driver_id", default=-1, help=_("Driver(or Device) ID")) opt.add_option("-i", action="store", type="int", dest="index", default=-2, help=_("The Feature Index You Want To Delete (-1 means delete all)")) options = opt.parse_args(args=argList) if options[0].user_name is None: options[0].user_name = getpass.getuser() uid = getUidByUname(options[0].user_name) opsDrvID = options[0].driver_id index = options[0].index if uid == -1 or opsDrvID <= -1 or index <= -2: sys.stderr.write(_("Input parameter error\n")) sys.stderr.write(opt.get_usage()) sys.exit(ExitParamError) index_start = index index_end = index if index == -1: index_start = 0 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() try: proxy = bus.get_object('org.ukui.Biometric', UKUI_GDBUS_BIO_OBJECT_PATH) except dbus.DBusException: print(_("Biometric identification backend framework service is not started")) sys.exit(ExitDBusNotExist) bus.add_signal_receiver(statusChangedHandler, dbus_interface="org.ukui.Biometric", signal_name="StatusChanged") bioIF = dbus.Interface(proxy, dbus_interface=UKUI_GDBUS_BIO_BUS_NAME) api_check = bioIF.CheckAppApiVersion(APP_API_MAJOR, APP_API_MINOR, APP_API_FUNC) if api_check > 0: sys.stderr.write(_("Client APP_API is newer than biometric identification framework service." " Please upgrade framework service or degrade client.\n")) sys.exit(ExitAppApiNotMatch) if api_check < 0: sys.stderr.write(_("Client APP_API is older than biometric identification framework service." " Please degrade framework service or upgrade client.\n")) sys.exit(ExitAppApiNotMatch) bioIF.Clean(opsDrvID, uid, index_start, index_end, timeout=DBUS_OPS_TIMEOUT, reply_handler=ops_handle_retcode_reply, error_handler=ops_handle_error) loop.run() if retCode >= RetOpsError: outputMsg(opsDrvID) print() sys.exit(retCode) def doGetFeatureList(argList): global opsType global opsDrvID opsType = OPS_TYPE_GET_FLIST usage = _("%s %s [-u USER_NAME] -d DRIVER_ID") % (sys.argv[0], sys.argv[1]) opt = OptionParser(usage) opt.add_option("-u", action="store", type="string", dest="user_name", default=None, help=_("User Name (Default is current user: %s)") % getpass.getuser()) opt.add_option("-d", action="store", type="int", dest="driver_id", default=-1, help=_("Driver(or Device) ID")) options = opt.parse_args(args=argList) if options[0].user_name is None: options[0].user_name = getpass.getuser() uid = getUidByUname(options[0].user_name) opsDrvID = options[0].driver_id if uid == -1 or opsDrvID <= -1: sys.stderr.write(_("Input parameter error\n")) sys.stderr.write(opt.get_usage()) sys.exit(ExitParamError) dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() try: proxy = bus.get_object('org.ukui.Biometric', UKUI_GDBUS_BIO_OBJECT_PATH) except dbus.DBusException: print(_("Biometric identification backend framework service is not started")) sys.exit(ExitDBusNotExist) bus.add_signal_receiver(statusChangedHandler, dbus_interface="org.ukui.Biometric", signal_name="StatusChanged") bioIF = dbus.Interface(proxy, dbus_interface=UKUI_GDBUS_BIO_BUS_NAME) api_check = bioIF.CheckAppApiVersion(APP_API_MAJOR, APP_API_MINOR, APP_API_FUNC) if api_check > 0: sys.stderr.write(_("Client APP_API is newer than biometric identification framework service." " Please upgrade framework service or degrade client.\n")) sys.exit(ExitAppApiNotMatch) if api_check < 0: sys.stderr.write(_("Client APP_API is older than biometric identification framework service." " Please degrade framework service or upgrade client.\n")) sys.exit(ExitAppApiNotMatch) bioIF.GetFeatureList(opsDrvID, uid, 0, -1, timeout=DBUS_OPS_TIMEOUT, reply_handler=ops_handle_get_feature_list_reply, error_handler=ops_handle_error) loop.run() if retCode >= RetOpsError: outputMsg(opsDrvID) print() sys.exit(retCode) def doRename(argList): global opsType global opsDrvID opsType = OPS_TYPE_RENAME usage = _("%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME") % (sys.argv[0], sys.argv[1]) opt = OptionParser(usage) opt.add_option("-u", action="store", type="string", dest="user_name", default=None, help=_("User Name (Default is current user: %s)") % getpass.getuser()) opt.add_option("-d", action="store", type="int", dest="driver_id", default=-1, help=_("Driver(or Device) ID")) opt.add_option("-i", action="store", type="int", dest="index", default=-1, help=_("The Feature Index that needs to be renamed")) opt.add_option("-n", action="store", type="string", dest="new_name", default=None, help=_("New Feature Name")) options = opt.parse_args(args=argList) if options[0].user_name is None: options[0].user_name = getpass.getuser() uid = getUidByUname(options[0].user_name) opsDrvID = options[0].driver_id index = options[0].index new_name = options[0].new_name if uid == -1 or opsDrvID <= -1 or index <= -1 or new_name is None: sys.stderr.write(_("Input parameter error\n")) sys.stderr.write(opt.get_usage()) sys.exit(ExitParamError) dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() try: proxy = bus.get_object('org.ukui.Biometric', UKUI_GDBUS_BIO_OBJECT_PATH) except dbus.DBusException: print(_("Biometric identification backend framework service is not started")) sys.exit(ExitDBusNotExist) bus.add_signal_receiver(statusChangedHandler, dbus_interface="org.ukui.Biometric", signal_name="StatusChanged") bioIF = dbus.Interface(proxy, dbus_interface=UKUI_GDBUS_BIO_BUS_NAME) api_check = bioIF.CheckAppApiVersion(APP_API_MAJOR, APP_API_MINOR, APP_API_FUNC) if api_check > 0: sys.stderr.write(_("Client APP_API is newer than biometric identification framework service." " Please upgrade framework service or degrade client.\n")) sys.exit(ExitAppApiNotMatch) if api_check < 0: sys.stderr.write(_("Client APP_API is older than biometric identification framework service." " Please degrade framework service or upgrade client.\n")) sys.exit(ExitAppApiNotMatch) bioIF.Rename(opsDrvID, uid, index, new_name, timeout=DBUS_OPS_TIMEOUT, reply_handler=ops_handle_retcode_reply, error_handler=ops_handle_error) loop.run() if retCode >= RetOpsError: outputMsg(opsDrvID) print() sys.exit(retCode) def doStopOps(signum, frame): notifyMsgBus = dbus.SystemBus() proxy = notifyMsgBus.get_object('org.ukui.Biometric', UKUI_GDBUS_BIO_OBJECT_PATH) bioIF = dbus.Interface(proxy, dbus_interface=UKUI_GDBUS_BIO_BUS_NAME) ret = bioIF.StopOps(opsDrvID, stopOpsTimeout) loop.quit() if ret != RetOpsSuccess: print(_("The abort operation failed and the current operation will continue in the background.")) print(_("The device may have to wait a while before being used.")) print(_("The wait problem can be solved by restarting the biometrics backend framework service.")) sys.exit(ExitStopOpsFailed) def main(): if len(sys.argv) < 2: sys.stdout.write(mainUsage) sys.exit(ExitParamError) signal.signal(signal.SIGINT, doStopOps) signal.signal(signal.SIGTERM, doStopOps) if sys.argv[1] == "get-driver-list": doGetDrvList(sys.argv[2:]) if sys.argv[1] == "get-device-list": doGetDevList(sys.argv[2:]) if sys.argv[1] == "enroll": doEnroll(sys.argv[2:]) if sys.argv[1] == "verify": doVerify(sys.argv[2:]) if sys.argv[1] == "capture": doCapture(sys.argv[2:]) if sys.argv[1] == "search": doSearch(sys.argv[2:]) if sys.argv[1] == "clean": doClean(sys.argv[2:]) if sys.argv[1] == "get-feature-list": doGetFeatureList(sys.argv[2:]) if sys.argv[1] == "rename": doRename(sys.argv[2:]) if sys.argv[1] == "-h" or sys.argv[1] == "--help": sys.stdout.write(mainUsage) sys.exit(ExitNormal) sys.stderr.write(mainUsage + '\n') sys.stderr.write(_("Unknown Builtin Commands: %s\n") % (sys.argv[1])) sys.exit(ExitParamError) if __name__ == "__main__": main() biometric-authentication/src/utils/biometric-auth-client/Makefile.am0000644000175000017500000000063513517470404024654 0ustar fengfengNULL = clientdir = $(prefix)/bin/ dist_client_SCRIPTS = biometric-auth-client DOMAIN_NAME = $(PACKAGE) LOCALEDIR = $(localedir) biometric-auth-client: cp biometric-auth-client.in biometric-auth-client sed -i 's#BIO_DOMAIN_NAME#$(DOMAIN_NAME)#g' biometric-auth-client sed -i 's#BIO_LOCALEDIR#$(LOCALEDIR)#g' biometric-auth-client chmod a+x biometric-auth-client clean-local: rm -rf biometric-auth-client biometric-authentication/src/utils/biometric-device-discover/0000755000175000017500000000000013527404024023446 5ustar fengfengbiometric-authentication/src/utils/biometric-device-discover/community-multidevice/0000755000175000017500000000000013755706021030007 5ustar fengfeng././@LongLink0000644000000000000000000000017100000000000011602 Lustar rootrootbiometric-authentication/src/utils/biometric-device-discover/community-multidevice/community_multidevice_discover_tool.cbiometric-authentication/src/utils/biometric-device-discover/community-multidevice/community_multide0000644000175000017500000001073713755706021033511 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "community_multidevice_discover_tool.h" device_info device_info_list[COMMUNITY_MULTIDEVICE_MAX_ID]; bool has_prefix (char *str, char *prefix) { char *p1 = NULL; char *p2 = NULL; if (str == NULL || prefix == NULL) return false; p1 = str; p2 = prefix; while ((*p1 != '\0') && (*p2 != '\0') && (*p1 == *p2)) { p1++; p2++; } if (*p2 == '\0') return true; else return false; } bool is_device_exist (char *device_name) { int i = 0; for (i = 0; i < COMMUNITY_MULTIDEVICE_MAX_ID; i++) { if (strcmp(device_name, device_info_list[i].drv_id) == 0) return device_info_list[i].exist; } return false; } void device_info_list_init() { int i; for (i = 0; i < COMMUNITY_MULTIDEVICE_MAX_ID; i++) { device_info_list[i].exist = false; } device_info_list[0].drv_id = ""; device_info_list[UPEKTS_ID].drv_id = UPEKTS_NAME; device_info_list[URU4000_ID].drv_id = URU4000_NAME; device_info_list[AES4000_ID].drv_id = AES4000_NAME; device_info_list[AES2501_ID].drv_id = AES2501_NAME; device_info_list[UPEKTC_ID].drv_id = UPEKTC_NAME; device_info_list[AES1610_ID].drv_id = AES1610_NAME; device_info_list[FDU2000_ID].drv_id = FDU2000_NAME; device_info_list[VCOM5S_ID].drv_id = VCOM5S_NAME; device_info_list[UPEKSONLY_ID].drv_id = UPEKSONLY_NAME; device_info_list[VFS101_ID].drv_id = VFS101_NAME; device_info_list[VFS301_ID].drv_id = VFS301_NAME; device_info_list[AES2550_ID].drv_id = AES2550_NAME; device_info_list[AES1660_ID].drv_id = AES1660_NAME; device_info_list[AES2660_ID].drv_id = AES2660_NAME; device_info_list[AES3500_ID].drv_id = AES3500_NAME; device_info_list[UPEKTC_IMG_ID].drv_id = UPEKTC_IMG_NAME; device_info_list[ETES603_ID].drv_id = ETES603_NAME; device_info_list[VFS5011_ID].drv_id = VFS5011_NAME; device_info_list[VFS0050_ID].drv_id = VFS0050_NAME; device_info_list[ELAN_ID].drv_id = ELAN_NAME; } int main(int argc, char **argv) { driver_info *drv_info = malloc(sizeof(driver_info)); drv_info->ctx = NULL; drv_info->devices = NULL; drv_info->device = NULL; char *base_name = NULL; char *drv_name = NULL; int ret = -1; int i = 0; int j = 0; base_name = basename(argv[0]); // 初始化 device_info_list_init(); // 创建新的FpContext drv_info->ctx = fp_context_new (); // 获取设备集 drv_info->devices = fp_context_get_devices (drv_info->ctx); if (!(drv_info->devices)) { printf ("Impossible to get devices"); return ret; } // 检测到的设备,将exist设置为true for (i = 0; i < drv_info->devices->len; i++) { // 从设备集中通过索引选择设备 drv_info->device = g_ptr_array_index (drv_info->devices, i); // 获取驱动ID const char *drv_id = fp_device_get_driver (drv_info->device); for(j = 0; j < COMMUNITY_MULTIDEVICE_MAX_ID; j++) { if(strcmp(drv_id, device_info_list[j].drv_id) == 0) device_info_list[j].exist = true; } } // 输入参数不是:community-multidevice-discover-tool if (strcmp(base_name, PROGAM_NAME) != 0) { // 参数是:usb- if (has_prefix(base_name, "usb-")) drv_name = base_name + strlen("usb-"); else drv_name = base_name; // 判断设备是否存在 if (is_device_exist(drv_name)) { printf("%s\n", drv_name); ret++; } return ret; }else { // 输入参数是:community-multidevice-discover-tool // 只输入一个参数 if (argc == 1) { for (i = 0; i < COMMUNITY_MULTIDEVICE_MAX_ID; i++) if (device_info_list[i].exist) { printf("%s\n", device_info_list[i].drv_id); ret++; } return ret; } // 输入多个参数 for (i = 1; i < argc; i++) if (is_device_exist(argv[i])) { printf("%s\n", argv[i]); ret++; } } return ret; } ././@LongLink0000644000000000000000000000017100000000000011602 Lustar rootrootbiometric-authentication/src/utils/biometric-device-discover/community-multidevice/community_multidevice_discover_tool.hbiometric-authentication/src/utils/biometric-device-discover/community-multidevice/community_multide0000644000175000017500000000270213755706021033502 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * chenziyi * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef COMMUNITY_MULTIDEVICE_DISCOVER_TOOL_H #define COMMUNITY_MULTIDEVICE_DISCOVER_TOOL_H #include #include #include #include #include #include #define PROGAM_NAME "community-multidevice-discover-tool" typedef struct device_info_t device_info; struct device_info_t { char *drv_id; bool exist; }; typedef struct driver_info_t driver_info; struct driver_info_t { GPtrArray *devices; FpDevice *device; FpContext *ctx; }; #endif // COMMUNITY_MULTIDEVICE_DISCOVER_TOOL_H biometric-authentication/src/utils/biometric-device-discover/community-multidevice/Makefile.am0000644000175000017500000000314313755706021032044 0ustar fengfengNULL = AUTOMAKE_OPTIONS = subdir-objects if HAS_BIO_DRIVER_DIR drv_dir = $(BIO_DRIVER_DIR) else drv_dir = $(datadir)/biometric-authentication/driver/ endif discover_tools_dir = $(drv_dir)/../discover-tools/extra/ discover_toolsdir = $(discover_tools_dir) discover_tools_PROGRAMS = community-multidevice-discover-tool DOMAIN_NAME = -DBIOMETRIC_DRIVER_COMMUNITY_MULTIDEVICE_DOMAIN_NAME=\""$(PACKAGE)"\" LOCALEDIR_CFS = -DLOCALEDIR=\""$(localedir)"\" COMM_CFS = -Wall -g -fpic \ -I$(top_srcdir)/src/ -I$(top_srcdir)/src/drivers/community-multidevice/ \ $(LOCALEDIR_CFS) $(DOMAIN_NAME) $(NULL) COMM_LIBS = -L$(top_srcdir)/src/ COMM_LDFS = -Wl,-z,now community_multidevice_discover_tool_SOURCES = \ community_multidevice_discover_tool.c \ $(NULL) community_multidevice_discover_tool_INCLUDE = \ community_multidevice_discover_tool.h \ community_define.h \ $(NULL) community_multidevice_discover_tool_CFLAGS = $(COMM_CFS) \ $(LIBFPRINT_CFLAGS) $(GLIB_2_CFLAGS) $(LIBUSB_1_CFLAGS) $(SQLITE3_CFLAGS) \ $(NULL) community_multidevice_discover_tool_LDADD = $(COMM_LIBS) \ $(LIBFPRINT_LIBS) $(GLIB_2_LIBS) $(LIBUSB_1_LIBS) $(SQLITE3_LIBS) \ $(NULL) community_multidevice_discover_tool_LDFLAGS = $(COMM_LDFS) install-exec-local: mkdir -p $(DESTDIR)/$(drv_dir)/../discover-tools/ DRIVER_LIST="upekts uru4000 aes4000 aes2501 upektc aes1610 fdu2000 vcom5s \ upeksonly vfs101 vfs301 aes2550 aes1660 aes2660 aes3500 \ upektc_img etes603 vfs5011 vfs0050 elan"; \ for driver in $${DRIVER_LIST}; do \ ln -sf extra/community-multidevice-discover-tool \ $(DESTDIR)/$(drv_dir)/../discover-tools/usb-$${driver}; \ done biometric-authentication/src/utils/biometric-device-discover/biometric-device-discover.in0000644000175000017500000000533013517470404031031 0ustar fengfeng#!/bin/bash ENO_INVAL=2 ENO_PERM=1 discover_tools_dir=DISCOVER_TOOLS_DIR discover_list=`ls ${discover_tools_dir} 2>/dev/null` drv_list="" device_type="all" write_flag="false" short_flag="false" function help() { echo "Discover biometric device, need root authority" echo "Usage: biometric-device-discover [option]" echo "" echo "Options:" echo " -t device type (\"serial\", \"usb\", \"pcie\" or \"all\")" echo " -w Write the discover results to configuration file" echo " -h Show this help" } while getopts "t:wsh" arg #选项后面的冒号表示该选项需要参数 do case $arg in t) device_type=${OPTARG} case ${device_type} in all) ;; serial) ;; usb) ;; pcie) ;; *) echo "Unkonw device type: ${device_type}" exit ${ENO_INVAL} ;; esac echo "Device type is ${device_type}" #参数存在$optarg中 ;; w) echo "Write the discover results to configuration file" write_flag="true" ;; s) echo "Use short output" short_flag="true" ;; h) help exit 0 ;; ?) #当有不认识的选项的时候arg为? #echo "Unkonw argument ${OPTARG}" help >&2 exit ${ENO_INVAL} ;; esac done user=`whoami` if [ "${user}X" != "rootX" ]; then echo "Discover biometric device need root authority" >&2 exit ${ENO_NOAUTH} fi if [ "${device_type}X" = "allX" ]; then device_type_list="serial usb pcie" else device_type_list=${device_type} fi for device_type in ${device_type_list}; do drv_list="" for bio_drv in ${discover_list}; do if [[ "${bio_drv}" =~ "${device_type}-" ]]; then drv_list="${drv_list} ${bio_drv##${device_type}-}" fi done drv_list=${drv_list## } # 移除前导空格 if [ "${drv_list}X" != "X" ]; then echo "${device_type} driver [${drv_list}] has discover tools" fi for driver in ${drv_list}; do dev_node_list=`/usr/lib/biometric-authentication/discover-tools/${device_type}-${driver} 2>/dev/null` echo -n " Discover ${driver} device: " if [ "${dev_node_list}X" != "X" ]; then if [ ${write_flag} = "true" ]; then biometric-config-tool add-driver -f -d ${driver} /usr/lib/biometric-authentication/drivers/${driver}.so fi for dev_node in ${dev_node_list}; do echo "${dev_node}, enable ${driver} driver" if [ ${write_flag} == "true" ]; then if [ ${device_type} == "serial" ]; then biometric-config-tool set-key -f ${driver} Path ${dev_node} fi biometric-config-tool enable-driver ${driver} fi done else echo -n "not found" if [ ${write_flag} == "true" -a ${device_type} == "serial" ]; then echo ", remove ${driver} driver" biometric-config-tool remove-driver -i ${driver} else echo fi fi done done biometric-authentication/src/utils/biometric-device-discover/Makefile.am0000644000175000017500000000135413517470404025511 0ustar fengfengNULL = SUBDIRS = community-multidevice discoverdir = $(prefix)/bin/ dist_discover_SCRIPTS = biometric-device-discover discover_tools_dir = $(libexecdir)/discover-tools DOMAIN_NAME = -DLIBBIOMETRIC_DOMAIN_NAME=\""$(PACKAGE)"\" LOCALEDIR_CFS = -DLOCALEDIR=\""$(localedir)"\" COMM_CFS = -Wall -g -fpic \ -I$(top_srcdir)/src/lib $(LOCALEDIR_CFS) $(DOMAIN_NAME) $(NULL) COMM_LDFS = -L$(top_srcdir)/src/lib -lbiometric if HAS_BIO_DRIVER_DIR COMM_CFS += -DBIO_DRIVER_DIR=$(discover_tools) endif biometric-device-discover: sed 's|^discover_tools_dir.*$$|discover_tools_dir=$(discover_tools_dir)|g' \ biometric-device-discover.in > biometric-device-discover chmod a+x biometric-device-discover clean-local: rm -rf biometric-device-discover biometric-authentication/src/utils/Makefile.am0000644000175000017500000000013013517470404020452 0ustar fengfengNULL = SUBDIRS = biometric-auth-client biometric-config-tool biometric-device-discover biometric-authentication/src/lib/0000755000175000017500000000000013755706021016033 5ustar fengfengbiometric-authentication/src/lib/biometric_common.c0000644000175000017500000014566113755706021021541 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include "biometric_intl.h" #include "biometric_common.h" #include "biometric_config.h" #include "biometric_version.h" /* 定义全局变量 */ static int bio_ops_timeout_ms = BIO_OPS_DEFAULT_TIMEOUT * 1000; /** 操作的超时时间,单位:毫秒 **/ GList * bio_drv_list = NULL; GList * bio_dev_list = NULL; BIO_STATUS_CHANGED_CALLBACK bio_status_changed_callback = NULL; BIO_USB_DEVICE_HOT_PLUG_CALLBACK bio_usb_device_hot_plug_callback = NULL; /********** 声明内部函数 **********/ bio_dev * bio_dev_new(); void bio_dev_free(bio_dev * dev); void* get_plugin_ops(void *handle, char *func_name); static int bio_usb_hotplug_callback_attach(libusb_context *ctx, libusb_device *usbdev, libusb_hotplug_event event, void *user_data); static int bio_usb_hotplug_callback_detach(libusb_context *ctx, libusb_device *usbdev, libusb_hotplug_event event, void *user_data); feature_info * bio_common_get_feature_list(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end); int bio_comm_feature_rename_by_db(bio_dev *dev, int uid, int idx, char * new_name); void bio_status_changed_common_callback(int drvid, int type); void bio_usb_device_hot_plug_common_callbak(int drvid, int action, int dev_num_now); void bio_dev_glist_data_free(bio_dev * dev, gpointer p2); /********** 外部函数实现 **********/ char * bio_new_string(char * old_str){ char * str = NULL; if (old_str == NULL) { str = malloc(1); if (str != NULL) *str = '\0'; } else { int l = strlen(old_str) + 1; str = malloc(l); if (str != NULL) strncpy(str, old_str, l); } return str; } int bio_base64_encode(unsigned char * bin_data, char * base64, int bin_len ) { int i, j; unsigned char current; const char * base64char = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; for ( i = 0, j = 0 ; i < bin_len ; i += 3 ) { current = (bin_data[i] >> 2) ; current &= (unsigned char)0x3F; base64[j++] = base64char[(int)current]; current = ( (unsigned char)(bin_data[i] << 4 ) ) & ( (unsigned char)0x30 ) ; if ( i + 1 >= bin_len ) { base64[j++] = base64char[(int)current]; base64[j++] = '='; base64[j++] = '='; break; } current |= ( (unsigned char)(bin_data[i+1] >> 4) ) & ( (unsigned char) 0x0F ); base64[j++] = base64char[(int)current]; current = ( (unsigned char)(bin_data[i+1] << 2) ) & ( (unsigned char)0x3C ) ; if ( i + 2 >= bin_len ) { base64[j++] = base64char[(int)current]; base64[j++] = '='; break; } current |= ( (unsigned char)(bin_data[i+2] >> 6) ) & ( (unsigned char) 0x03 ); base64[j++] = base64char[(int)current]; current = ( (unsigned char)bin_data[i+2] ) & ( (unsigned char)0x3F ) ; base64[j++] = base64char[(int)current]; } base64[j] = '\0'; return strlen(base64); } int bio_base64_decode(char * base64, unsigned char * bin_data) { int i, j; unsigned char k; unsigned char temp[4]; const char * base64char = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; for ( i = 0, j = 0; base64[i] != '\0' ; i += 4 ) { memset( temp, 0xFF, sizeof(temp) ); for ( k = 0 ; k < 64 ; k ++ ) { if ( base64char[k] == base64[i] ) temp[0]= k; } for ( k = 0 ; k < 64 ; k ++ ) { if ( base64char[k] == base64[i+1] ) temp[1]= k; } for ( k = 0 ; k < 64 ; k ++ ) { if ( base64char[k] == base64[i+2] ) temp[2]= k; } for ( k = 0 ; k < 64 ; k ++ ) { if ( base64char[k] == base64[i+3] ) temp[3]= k; } bin_data[j++] = ((unsigned char)(((unsigned char)(temp[0] << 2))&0xFC)) | ((unsigned char)((unsigned char)(temp[1]>>4)&0x03)); if ( base64[i+2] == '=' ) break; bin_data[j++] = ((unsigned char)(((unsigned char)(temp[1] << 4))&0xF0)) | ((unsigned char)((unsigned char)(temp[2]>>2)&0x0F)); if ( base64[i+3] == '=' ) break; bin_data[j++] = ((unsigned char)(((unsigned char)(temp[2] << 6))&0xF0)) | ((unsigned char)(temp[3]&0x3F)); } return j; } void bio_print_drv_list(int print_level) { GList *l = bio_drv_list; GString *print_list = g_string_new(_("Current driver list:")); while (l != NULL) { bio_dev * dev = l->data; if (dev->enable) g_string_sprintfa(print_list, "%s[T] -> " , dev->device_name); else g_string_sprintfa(print_list, "%s[F] -> " , dev->device_name); l = l->next; } g_string_append(print_list, "NULL"); switch (print_level) { case BIO_PRINT_LEVEL_ERROR: bio_print_error("%s\n", print_list->str); break; case BIO_PRINT_LEVEL_WARN: bio_print_warning("%s\n", print_list->str); break; case BIO_PRINT_LEVEL_NOTICE: bio_print_notice("%s\n", print_list->str); break; case BIO_PRINT_LEVEL_INFO: bio_print_info("%s\n", print_list->str); break; case BIO_PRINT_LEVEL_DEBUG: default: bio_print_debug("%s\n", print_list->str); break; } g_string_free(print_list, TRUE); } void bio_print_dev_list(int print_level) { GList *l = bio_dev_list; GString *print_list = g_string_new(_("Current device list:")); while (l != NULL) { bio_dev * dev = l->data; if (dev->enable) g_string_sprintfa(print_list, "%s[%d] -> " , dev->device_name, dev->dev_num); l = l->next; } g_string_append(print_list, "NULL"); switch (print_level) { case BIO_PRINT_LEVEL_ERROR: bio_print_error("%s\n", print_list->str); break; case BIO_PRINT_LEVEL_WARN: bio_print_warning("%s\n", print_list->str); break; case BIO_PRINT_LEVEL_NOTICE: bio_print_notice("%s\n", print_list->str); break; case BIO_PRINT_LEVEL_INFO: bio_print_info("%s\n", print_list->str); break; case BIO_PRINT_LEVEL_DEBUG: default: bio_print_debug("%s\n", print_list->str); break; } g_string_free(print_list, TRUE); } GList * bio_get_drv_list() { return bio_drv_list; } GList * bio_get_dev_list() { return bio_dev_list; } void bio_free_drv_list() { bio_free_driver(bio_drv_list); } void bio_free_dev_list() { bio_free_device(bio_dev_list); } int bio_dev_is_enable(bio_dev * dev, GKeyFile * conf) { GError * err = NULL; if (dev->device_name == NULL) return FALSE; gboolean enable = g_key_file_get_boolean(conf, dev->device_name, "Enable", &err); if (err != NULL) { bio_print_error(_("Error[%d]: %s\n"), err->code, err->message); g_error_free(err); err = NULL; } else bio_print_debug("IsEnable = %s\n", (enable)?"true":"false"); return enable; } int bio_dev_set_serial_path(bio_dev * dev, GKeyFile * conf) { char * path = NULL; GError * err = NULL; memset(dev->serial_info.path, 0, MAX_PATH_LEN); if (dev->device_name == NULL) return -1; path = g_key_file_get_string(conf, dev->device_name, "Path", &err); if (err != NULL) { bio_print_error(_("Error[%d]: %s\n"), err->code, err->message); g_error_free(err); free(path); return -1; } else bio_print_debug("Serial Path = %s\n", path); if (path[0] == '\0') { bio_print_notice("Serial Path is Enpty!\n"); free(path); return -1; } sprintf(dev->serial_info.path, "%s", path); free(path); return 0; } GList * bio_driver_list_init(void) { GKeyFile * conf = NULL; gchar ** drv_list_conf = NULL; gsize driver_count = 0; bio_dev * p = NULL; conf = get_bio_conf(); if (conf == NULL) { bio_print_error(_("can't find \"bioconf\" struct, " "maybe someone forget use \"bio_conf_init()\" before\n")); return NULL; } drv_list_conf = g_key_file_get_groups(conf, &driver_count); int i = 0; GError *err = NULL; for (i = 0; i < driver_count; i++) { if ( drv_list_conf[i][0] != '\0') { p = bio_dev_new(); if (p == NULL) { bio_print_error(_("Unable to allocate memory\n")); return NULL; } /* 加载配置文件中指定的驱动文件 */ gchar *path = g_key_file_get_string(conf, drv_list_conf[i], "Driver", &err); if (err != NULL) { bio_print_error(_("Error[%d]: %s\n"), err->code, err->message); g_error_free(err); err = NULL; bio_free_driver(bio_drv_list); return NULL; } if (path[0] == '\0') { bio_print_error(_("No define driver in [%s]\n"), drv_list_conf[i]); bio_free_driver(bio_drv_list); return NULL; } dlerror(); p->plugin_handle = dlopen(path, RTLD_NOW); if (p->plugin_handle == NULL) { bio_print_error("%s\n", dlerror()); dlerror(); continue; } bio_print_debug(_("Loaded Driver: %s\n"), path); /* 填充用于描述驱动与设备的bio_dev结构体 */ p->ops_configure = get_plugin_ops(p->plugin_handle, "ops_configure"); /* 执行驱动的参数处理函数 */ int r = p->ops_configure(p, conf); if (r != 0) { bio_print_error(_("%s driver configure failed\n"), p->device_name); dlclose(p->plugin_handle); free(p); continue; } /* 检测驱动版本兼容性 */ bio_print_debug(_("%s driver DRV_API version: %d.%d.%d\n"), p->device_name, p->drv_api_version.major, p->drv_api_version.minor, p->drv_api_version.function); int version_check = 0; version_check = bio_check_drv_api_version(p->drv_api_version.major, p->drv_api_version.minor, p->drv_api_version.function); if (version_check != 0) { if (version_check > 0) bio_print_error(_("Detected Compatibility issues: %s driver " "version is higher than biometric framework\n"), p->device_name); else bio_print_error(_("Detected Compatibility issues: %s driver " "version is lower than biometric framework\n"), p->device_name); dlclose(p->plugin_handle); free(p); continue; } /* 执行驱动初始化函数,失败则释放资源,进行下一个循环 */ if (p->ops_driver_init(p) < 0) { bio_print_warning(_("Driver %s initialization failed\n"), p->device_name); p->ops_free(p); if (p->plugin_handle != NULL) { dlclose(p->plugin_handle); p->plugin_handle = NULL; } free(p); continue; } bio_set_dev_status(p, DEVS_COMM_IDLE); bio_set_ops_result(p, OPS_COMM_SUCCESS); bio_set_notify_mid(p, NOTIFY_COMM_IDLE); p->enable = bio_dev_is_enable(p, conf); bio_drv_list = g_list_append(bio_drv_list, p); /* 注册USB热插拔时的回掉函数 */ if (p->bioinfo.bustype == BusT_USB) { int rc = 0; int i; const struct usb_id * id_table = p->usb_info.id_table; for (i = 0; id_table[i].idVendor != 0; i++) { rc = libusb_hotplug_register_callback(NULL, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, 0, id_table[i].idVendor, id_table[i].idProduct, LIBUSB_HOTPLUG_MATCH_ANY, bio_usb_hotplug_callback_attach, NULL, &(p->usb_info.callback_handle)[0]); if (LIBUSB_SUCCESS != rc) { bio_print_error (_("Error: Can not register attach callback error\n")); } rc = libusb_hotplug_register_callback (NULL, LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT, 0, id_table[i].idVendor, id_table[i].idProduct, LIBUSB_HOTPLUG_MATCH_ANY, bio_usb_hotplug_callback_detach, NULL, &(p->usb_info.callback_handle)[1]); if (LIBUSB_SUCCESS != rc) { bio_print_error (_("Error: Can not register detach callback error\n")); } } } } } return bio_drv_list; } /** * @brief 发现设备,构建设备链表 * 搜索系统中支持生物识别的设备 * @return GList* GList链表,data指针指向bio_dev结构体 * @note 设备链表的data指针与驱动链表的data指针指向同一个bio_dev结构体,设备链表只 * 记录当前有驱动并且已连接的设备 * @par 修改日志 * JianglinXuan于2017-05-12创建 */ GList *bio_device_list_init(GList * drv_list) { GList * dev_list = NULL; GList * l = drv_list; /* 构建设备链表,不重新建立bio_dev结构体,直接引用驱动链表中的值 */ while (l != NULL) { GList * next = l->next; bio_dev * dev = l->data; if (dev->enable) { dev->dev_num = dev->ops_discover(dev); if (dev->dev_num > 0) { dev_list = g_list_append(dev_list, dev); } } l = next; } bio_dev_list = dev_list; return bio_dev_list; } int bio_init(void) { int ret = 0; setlocale (LC_ALL, ""); bindtextdomain(LIBBIOMETRIC_DOMAIN_NAME, LOCALEDIR); bio_print_debug(_("Biometric framework API version:\n")); bio_print_debug(_(" Driver API(DRV_API): %d.%d.%d\n"), BIO_DRV_API_VERSION_MAJOR, BIO_DRV_API_VERSION_MINOR, BIO_DRV_API_VERSION_FUNC); bio_print_debug(_(" Application API(APP_API): %d.%d.%d\n"), BIO_APP_API_VERSION_MAJOR, BIO_APP_API_VERSION_MINOR, BIO_APP_API_VERSION_FUNC); /* 初始化配置 */ if (bio_conf_init() != 0) { bio_print_error(_("bio_conf_init failed\n")); return -1; } /* 检测并升级数据库 */ sqlite3 *db = bio_sto_connect_db(); ret = bio_sto_check_and_upgrade_db_format(db); if (ret != 0 ) { bio_sto_disconnect_db(db); return -1; } int rc; rc = libusb_init (NULL); if (rc < 0) { bio_print_error(_("failed to initialise libusb: %s\n"), libusb_error_name(rc)); return -1; } return 0; } int bio_close(void) { libusb_exit (NULL); bio_conf_free(); return 0; } void bio_free_driver(GList * drv_list) { g_list_foreach(drv_list, (GFunc)bio_dev_glist_data_free, NULL); g_list_free(drv_list); bio_drv_list = NULL; } void bio_free_device(GList * dev_list) { g_list_free(dev_list); bio_dev_list = NULL; } /* * 特征捕获 * 捕获特征信息并保存在给定的buf中 * * @param[in] dev 设备结构体 * @param[out] buff 特征捕获后的存放的buf * @return 操作结果 */ char * bio_ops_capture(bio_dev *dev) { int ret; char * caps = NULL; if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_mid(dev, NOTIFY_COMM_DISABLE); return NULL; } ret = dev->ops_open(dev); bio_print_debug(_("Open Result: %d\n"), ret); if (ret == 0) { if (dev->ops_capture != NULL) caps = bio_new_string(dev->ops_capture(dev, ACTION_START)); else { caps = NULL; bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_abs_mid(dev, NOTIFY_COMM_UNSUPPORTED_OPS); bio_print_debug("%s\n", bio_get_notify_mid_mesg(dev)); } } dev->ops_close(dev); bio_print_debug(_("Close Device: %s\n"), dev->device_name); bio_print_debug(_("Device Status: [%d]%s\n"), bio_get_ops_result(dev), bio_get_ops_result_mesg(dev)); if (caps == NULL) caps = bio_new_string(""); return caps; } /* * 特征录入 * 录入生物特征 * * @param[in] dev 设备结构体 * @param[in] index 录入索引,小于0则自动插入到最小的空白值中 * @return 操作结果 */ int bio_ops_enroll(bio_dev *dev, int uid, int idx, char * idx_name) { int ret = -1; if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_mid(dev, NOTIFY_COMM_DISABLE); return -1; } ret = dev->ops_open(dev); bio_print_debug(_("Open Result: %d\n"), ret); if (ret == 0) { if (dev->ops_enroll != NULL) ret = dev->ops_enroll(dev, ACTION_START, uid, idx, (char *)idx_name); else { ret = -1; bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_abs_mid(dev, NOTIFY_COMM_UNSUPPORTED_OPS); bio_print_debug(_("%s\n"), bio_get_notify_mid_mesg(dev)); } } dev->ops_close(dev); bio_print_debug(_("Close Device: %s\n"), dev->device_name); bio_print_debug(_("Device Status: [%d]%s\n"), bio_get_ops_result(dev), bio_get_ops_result_mesg(dev)); bio_print_debug("---------\n"); return ret; } /* * 特征验证 * 与给定的索引值的特征对比验证 * * @param[in] dev 设备结构体 * @param[in] index 给定需要对比的索引值 * @return 操作结果 */ int bio_ops_verify(bio_dev *dev, int uid, int idx) { int ret = -1; if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_mid(dev, NOTIFY_COMM_DISABLE); return -1; } ret = dev->ops_open(dev); bio_print_debug(_("Open Result: %d\n"), ret); if (ret == 0) { if (dev->ops_verify != NULL) ret = dev->ops_verify(dev, ACTION_START, uid, idx); else { ret = -1; bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_abs_mid(dev, NOTIFY_COMM_UNSUPPORTED_OPS); bio_print_debug("%s\n", bio_get_notify_mid_mesg(dev)); } } dev->ops_close(dev); bio_print_debug(_("Close Device: %s\n"), dev->device_name); bio_print_debug(_("Device Status: [%d]%s\n"), bio_get_ops_result(dev), bio_get_ops_result_mesg(dev)); bio_print_debug("---------\n"); return ret; } /* * 特征识别 * 在给定范围内识别特征信息(全闭区间[start, end]) * * @param[in] dev 设备结构体 * @param[in] start 指定开始的索引 * @param[in] end 指定结束的索引,-1代表识别到最后 * @return 操作结果 */ int bio_ops_identify(bio_dev *dev, int uid, int idx_start, int idx_end) { int ret = -1; int uid_ret = -1; if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_mid(dev, NOTIFY_COMM_DISABLE); return -1; } ret = dev->ops_open(dev); bio_print_debug(_("Open Result: %d\n"), ret); if (ret == 0) { if (dev->ops_identify != NULL) uid_ret = dev->ops_identify(dev, ACTION_START, uid, idx_start, idx_end); else { ret = -1; bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_abs_mid(dev, NOTIFY_COMM_UNSUPPORTED_OPS); bio_print_debug(_("%s\n"), bio_get_notify_mid_mesg(dev)); } } dev->ops_close(dev); bio_print_debug(_("Close Device: %s\n"), dev->device_name); bio_print_debug(_("Device Status: [%d]%s\n"), bio_get_ops_result(dev), bio_get_ops_result_mesg(dev)); bio_print_debug("---------\n"); return uid_ret; } /* * 特征搜索 * 在给定范围内搜索特征信息(全闭区间[start, end]) * * @param[in] dev 设备结构体 * @param[in] start 指定开始的索引 * @param[in] end 指定结束的索引,-1代表搜索到最后 * @param[out] index 记录搜索成功后的索引,-1代表未搜索到 * @return 搜索到的特征列表 * @note 函数执行过程中出错返回NULL,由ops_result来判断是“未搜索到”还是“搜索出错” */ feature_info * bio_ops_search(bio_dev *dev, int uid, int idx_start, int idx_end) { int ret; feature_info * found = NULL; if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_mid(dev, NOTIFY_COMM_DISABLE); return NULL; } ret = dev->ops_open(dev); bio_print_debug(_("Open Result: %d\n"), ret); if (ret == 0) { if (dev->ops_search != NULL) found = dev->ops_search(dev, ACTION_START, uid, idx_start, idx_end); else { ret = -1; bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_abs_mid(dev, NOTIFY_COMM_UNSUPPORTED_OPS); bio_print_debug(_("%s\n"), bio_get_notify_mid_mesg(dev)); } } dev->ops_close(dev); bio_print_debug(_("Close Device: %s\n"), dev->device_name); bio_print_debug(_("Device Status: [%d]%s\n"), bio_get_ops_result(dev), bio_get_ops_result_mesg(dev)); return found; } /* * 特征清理 * 清理给定范围的特征信息(全闭区间[start, end]) * * @param[in] dev 设备结构体 * @param[in] start 指定开始的索引 * @param[in] end 指定结束的索引,-1代表清理到最后 * @return 操作结果 */ int bio_ops_clean(bio_dev *dev, int uid, int idx_start, int idx_end) { int ret = -1; if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_mid(dev, NOTIFY_COMM_DISABLE); return -1; } ret = dev->ops_open(dev); bio_print_debug(_("Open Result: %d\n"), ret); if (ret == 0) { if (dev->ops_clean != NULL) ret = dev->ops_clean(dev, ACTION_START, uid, idx_start, idx_end); else { ret = -1; bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_abs_mid(dev, NOTIFY_COMM_UNSUPPORTED_OPS); bio_print_debug("%s\n", bio_get_notify_mid_mesg(dev)); } } dev->ops_close(dev); bio_print_debug(_("Close Device: %s\n"), dev->device_name); bio_print_debug(_("Device Status: [%d]%s\n"), bio_get_ops_result(dev), bio_get_ops_result_mesg(dev)); bio_print_debug("---------\n"); return ret; } /* * 获取特征列表 * 获取用户指定范围的特征列表 * * @param[in] dev 设备结构体 * @param[in] uid 指定用户的ID * @param[in] idx_start 指定索引的起始位置 * @param[in] idx_end 指定索引的结束位置 * @return 搜索到的特征列表 */ feature_info * bio_ops_get_feature_list(bio_dev *dev, int uid, int idx_start, int idx_end) { int ret = -1; feature_info * flist = NULL; if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_mid(dev, NOTIFY_COMM_DISABLE); return NULL; } if (dev->ops_get_feature_list != NULL) { ret = dev->ops_open(dev); bio_print_debug(_("Open Result: %d\n"), ret); if (ret == 0) flist = dev->ops_get_feature_list(dev, ACTION_START, uid, idx_start, idx_end); dev->ops_close(dev); } else flist = bio_common_get_feature_list(dev, ACTION_START, uid, idx_start, idx_end); bio_print_debug(_("Close Device: %s\n"), dev->device_name); bio_print_debug(_("Device Status: [%d]%s\n"), bio_get_ops_result(dev), bio_get_ops_result_mesg(dev)); bio_print_debug("---------\n"); return flist; } /* * 重命名特征名称 * * @param[in] bio_dev *dev 设备结构体 * @param[in] int uid 需更新特征的UID * @param[in] int idx 需更新特征的索引 * @param[int] char *new_name 特征的新名称 * @return 操作结果 * @retval 0 重命名成功 * >0 重命名失败的数量 */ int bio_ops_feature_rename(bio_dev *dev, int uid, int idx, char * new_name) { int ret = -1; if (dev->ops_feature_rename != NULL) { if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); bio_set_ops_result(dev, OPS_COMM_ERROR); bio_set_notify_mid(dev, NOTIFY_COMM_DISABLE); return -1; } ret = dev->ops_open(dev); bio_print_debug(_("Open Result: %d\n"), ret); if (ret == 0) dev->ops_feature_rename(dev, uid, idx, new_name); dev->ops_close(dev); return ret; } else { int ret = 0; bio_set_dev_abs_status(dev, DEVS_RENAME_DOING); ret = bio_comm_feature_rename_by_db(dev, uid, idx, new_name); if (ret == 0) bio_set_all_abs_status(dev, DEVS_COMM_IDLE, OPS_RENAME_SUCCESS, NOTIFY_RENAME_SUCCESS); else bio_set_all_abs_status(dev, DEVS_COMM_IDLE, OPS_RENAME_FAIL, NOTIFY_RENAME_INCOMPLETE); return ret; } } int bio_ops_stop_ops(bio_dev *dev, int waiting_sec){ return dev->ops_stop_by_user(dev, waiting_sec * 1000); } void bio_set_ops_timeout_ms(int t) { bio_ops_timeout_ms = t; } int bio_get_ops_timeout_ms() { return bio_ops_timeout_ms; } bool bio_is_stop_by_user(bio_dev * dev) { if (dev->dev_status % 100 == DEVS_COMM_STOP_BY_USER) return true; else return false; } int bio_get_dev_status(bio_dev * dev) { return dev->dev_status; } void bio_set_dev_status(bio_dev * dev, int status) { dev->dev_status = status; if ((dev->ops_status_changed_callback != NULL) && (dev->ops_status_changed_callback != bio_status_changed_callback)) dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_DEVICE); bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_DEVICE); } void bio_set_dev_abs_status(bio_dev * dev, int status) { dev->dev_status = status; if ((dev->ops_status_changed_callback != NULL) && (dev->ops_status_changed_callback != bio_status_changed_callback)) dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_DEVICE); bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_DEVICE); } int bio_get_ops_result(bio_dev * dev) { return dev->ops_result; } void bio_set_ops_result(bio_dev * dev, int result) { int ops = 0; ops = bio_get_dev_status(dev) / 100; result = result % 100; dev->ops_result = ops * 100 + result; if ((dev->ops_status_changed_callback != NULL) && (dev->ops_status_changed_callback != bio_status_changed_callback)) dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_OPERATION); bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_OPERATION); } void bio_set_ops_abs_result(bio_dev * dev, int result) { dev->ops_result = result; if ((dev->ops_status_changed_callback != NULL) && (dev->ops_status_changed_callback != bio_status_changed_callback)) dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_OPERATION); bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_OPERATION); } int bio_get_notify_mid(bio_dev * dev) { return dev->notify_mid; } void bio_set_notify_mid(bio_dev * dev, int mid) { int ops = 0; ops = bio_get_dev_status(dev) / 100; mid = mid % 100; dev->notify_mid = ops * 100 + mid; if ((dev->ops_status_changed_callback != NULL) && (dev->ops_status_changed_callback != bio_status_changed_callback)) dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_NOTIFY); bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_NOTIFY); } void bio_set_notify_abs_mid(bio_dev * dev, int mid) { dev->notify_mid = mid; if ((dev->ops_status_changed_callback != NULL) && (dev->ops_status_changed_callback != bio_status_changed_callback)) dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_NOTIFY); bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_NOTIFY); } void bio_set_all_status(bio_dev * dev, int dev_status, int ops_result, int notify_mid) { int type = bio_get_dev_status(dev) / 100; dev->dev_status = type * 100 + (dev_status % 100); dev->ops_result = type * 100 + (ops_result % 100); dev->notify_mid = type * 100 + (notify_mid % 100); if ((dev->ops_status_changed_callback != NULL) && (dev->ops_status_changed_callback != bio_status_changed_callback)) { dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_DEVICE); dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_OPERATION); dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_NOTIFY); } bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_DEVICE); bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_OPERATION); bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_NOTIFY); } void bio_set_all_abs_status(bio_dev * dev, int dev_status, int ops_result, int notify_mid) { dev->dev_status = dev_status; dev->ops_result = ops_result; dev->notify_mid = notify_mid; if ((dev->ops_status_changed_callback != NULL) && (dev->ops_status_changed_callback != bio_status_changed_callback)) { dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_DEVICE); dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_OPERATION); dev->ops_status_changed_callback(dev->driver_id, STATUS_TYPE_NOTIFY); } bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_DEVICE); bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_OPERATION); bio_status_changed_common_callback(dev->driver_id, STATUS_TYPE_NOTIFY); } const char * bio_get_dev_status_mesg(bio_dev *dev){ const char * mesg = NULL; mesg = dev->ops_get_dev_status_mesg(dev); if (mesg != NULL) return mesg; switch (bio_get_dev_status(dev)) { case DEVS_COMM_IDLE: return _("Device idle"); case DEVS_COMM_DOING: return _("Device is in process"); case DEVS_COMM_STOP_BY_USER: return _("Terminating current operation"); case DEVS_COMM_DISABLE: return _("Device is disabled"); case DEVS_OPEN_DOING: return _("Opening device"); case DEVS_OPEN_STOP_BY_USER: return _("Terminating open operation"); case DEVS_ENROLL_DOING: return _("Enrolling"); case DEVS_ENROLL_STOP_BY_USER: return _("Terminating enroll operation"); case DEVS_VERIFY_DOING: return _("Verifying"); case DEVS_VERIFY_STOP_BY_USER: return _("Terminating Verify operation"); case DEVS_IDENTIFY_DOING: return _("Identifying"); case DEVS_IDENTIFY_STOP_BY_USER: return _("Terminating identify operation"); case DEVS_CAPTURE_DOING: return _("Capturing"); case DEVS_CAPTURE_STOP_BY_USER: return _("Terminating capture operation"); case DEVS_SEARCH_DOING: return _("Searching"); case DEVS_SEARCH_STOP_BY_USER: return _("Terminating search operation"); case DEVS_CLEAN_DOING: return _("Cleaning"); case DEVS_CLEAN_STOP_BY_USER: return _("Terminating clean operation"); case DEVS_GET_FLIST_DOING: return _("Getting feature list"); case DEVS_GET_FLIST_STOP_BY_USER: return _("Terminating get feature list operation"); case DEVS_RENAME_DOING: return _("Renaming feature"); case DEVS_RENAME_STOP_BY_USER: return _("Terminating feature rename operation"); case DEVS_CLOSE_DOING: return _("Closing"); case DEVS_CLOSE_STOP_BY_USER: return _("Terminating close operation"); default: bio_print_warning(_("Device unknown status code: %d\n"), bio_get_dev_status(dev)); return _("Device is in an unknown status..."); } } const char * bio_get_ops_result_mesg(bio_dev *dev){ const char * mesg = NULL; mesg = dev->ops_get_ops_result_mesg(dev); if (mesg != NULL) return mesg; switch (bio_get_ops_result(dev)) { case OPS_COMM_SUCCESS: return _("Operation successful"); case OPS_COMM_FAIL: return _("Operation failed"); case OPS_COMM_ERROR: return _("An error was encountered during the operation"); case OPS_COMM_STOP_BY_USER: return _("The operation was interrupted by the user"); case OPS_COMM_TIMEOUT: return _("Operation timeout"); case OPS_COMM_OUT_OF_MEM: return _("Out of memory"); case OPS_OPEN_SUCCESS: return _("Open device completion"); case OPS_OPEN_FAIL: return _("Open device failed"); case OPS_OPEN_ERROR: return _("An error was encountered during the opening"); case OPS_ENROLL_SUCCESS: return _("Enroll feature successful"); case OPS_ENROLL_FAIL: return _("Enroll feature failed"); case OPS_ENROLL_ERROR: return _("An error was encountered during enrolling"); case OPS_ENROLL_STOP_BY_USER: return _("Enroll operation was interrupted by the user"); case OPS_ENROLL_TIMEOUT: return _("Enroll operation timeout"); case OPS_VERIFY_MATCH: return _("Verify feature match"); case OPS_VERIFY_NO_MATCH: return _("Verify feature no match"); case OPS_VERIFY_ERROR: return _("An error was encountered during verifying"); case OPS_VERIFY_STOP_BY_USER: return _("Verify operation was interrupted by the user"); case OPS_VERIFY_TIMEOUT: return _("Verify operation timeout"); case OPS_IDENTIFY_MATCH: return _("Identify feature match"); case OPS_IDENTIFY_NO_MATCH: return _("Identify feature no match"); case OPS_IDENTIFY_ERROR: return _("An error was encountered during identifying"); case OPS_IDENTIFY_STOP_BY_USER: return _("Identify operation was interrupted by the user"); case OPS_IDENTIFY_TIMEOUT: return _("Identify operation timeout"); case OPS_CAPTURE_SUCCESS: return _("Capture feature successful"); case OPS_CAPTURE_FAIL: return _("Capture feature failed"); case OPS_CAPTURE_ERROR: return _("An error was encountered during capturing"); case OPS_CAPTURE_STOP_BY_USER: return _("Capture operation was interrupted by the user"); case OPS_CAPTURE_TIMEOUT: return _("Capture operation timeout"); case OPS_SEARCH_MATCH: return _("Find the specified features"); case OPS_SEARCH_NO_MATCH: return _("No specified features were found"); case OPS_SEARCH_ERROR: return _("An error was encountered during searching"); case OPS_SEARCH_STOP_BY_USER: return _("Search operation was interrupted by the user"); case OPS_SEARCH_TIMEOUT: return _("Search operation timeout"); case OPS_CLEAN_SUCCESS: return _("Clean feature successful"); case OPS_CLEAN_FAIL: return _("Clean feature failed"); case OPS_CLEAN_ERROR: return _("An error was encountered during cleaning"); case OPS_CLEAN_STOP_BY_USER: return _("Clean operation was interrupted by the user"); case OPS_CLEAN_TIMEOUT: return _("Clean operation timeout"); case OPS_GET_FLIST_SUCCESS: return _("Get feature list completion"); case OPS_GET_FLIST_FAIL: return _("Get feature list failed"); case OPS_GET_FLIST_ERROR: return _("An error was encountered during getting feature list"); case OPS_RENAME_SUCCESS: return _("Rename feature successful"); case OPS_RENAME_FAIL: return _("Rename feature failed"); case OPS_RENAME_ERROR: return _("An error was encountered during renaming"); case OPS_CLOSE_SUCCESS: return _("Close device completion"); case OPS_CLOSE_FAIL: return _("Close device failed"); case OPS_CLOSE_ERROR: return _("An error was encountered during closing"); default: return _("Operation is in an unknown status......"); } } const char * bio_get_notify_mid_mesg(bio_dev *dev){ const char * mesg = NULL; mesg = dev->ops_get_notify_mid_mesg(dev); if (mesg != NULL) return mesg; switch (bio_get_notify_mid(dev)) { case NOTIFY_COMM_IDLE: return _("Device idle"); case NOTIFY_COMM_FAIL: return _("Operation failed"); case NOTIFY_COMM_ERROR: return _("An error was encountered during the operation"); case NOTIFY_COMM_STOP_BY_USER: return _("The operation was interrupted by the user"); case NOTIFY_COMM_TIMEOUT: return _("Operation timeout"); case NOTIFY_COMM_DISABLE: return _("Device is disable"); case NOTIFY_COMM_OUT_OF_MEM: return _("Out of memory"); case NOTIFY_COMM_UNSUPPORTED_OPS: return _("The device or driver does not support this operation"); case NOTIFY_OPEN_SUCCESS: return _("Open device completion"); case NOTIFY_OPEN_FAIL: return _("Open device failed"); case NOTIFY_OPEN_ERROR: return _("An error was encountered during the opening"); case NOTIFY_ENROLL_SUCCESS: return _("Enroll feature successful"); case NOTIFY_ENROLL_FAIL: return _("Enroll feature failed"); case NOTIFY_ENROLL_ERROR: return _("An error was encountered during enrolling"); case NOTIFY_ENROLL_STOP_BY_USER: return _("Enroll operation was interrupted by the user"); case NOTIFY_ENROLL_TIMEOUT: return _("Enroll operation timeout"); case NOTIFY_VERIFY_MATCH: return _("Verify feature match"); case NOTIFY_VERIFY_NO_MATCH: return _("Verify feature no match"); case NOTIFY_VERIFY_ERROR: return _("An error was encountered during verifying"); case NOTIFY_VERIFY_STOP_BY_USER: return _("Verify operation was interrupted by the user"); case NOTIFY_VERIFY_TIMEOUT: return _("Verify operation timeout"); case NOTIFY_IDENTIFY_MATCH: return _("Identify feature match"); case NOTIFY_IDENTIFY_NO_MATCH: return _("Identify feature no match"); case NOTIFY_IDENTIFY_ERROR: return _("An error was encountered during identifying"); case NOTIFY_IDENTIFY_STOP_BY_USER: return _("Identify operation was interrupted by the user"); case NOTIFY_IDENTIFY_TIMEOUT: return _("Identify operation timeout"); case NOTIFY_CAPTURE_SUCCESS: return _("Capture feature successful"); case NOTIFY_CAPTURE_FAIL: return _("Capture feature failed"); case NOTIFY_CAPTURE_ERROR: return _("An error was encountered during capturing"); case NOTIFY_CAPTURE_STOP_BY_USER: return _("Capture operation was interrupted by the user"); case NOTIFY_CAPTURE_TIMEOUT: return _("Capture operation timeout"); case NOTIFY_SEARCH_MATCH: return _("Find the specified features"); case NOTIFY_SEARCH_NO_MATCH: return _("No specified features were found"); case NOTIFY_SEARCH_ERROR: return _("An error was encountered during searching"); case NOTIFY_SEARCH_STOP_BY_USER: return _("Search operation was interrupted by the user"); case NOTIFY_SEARCH_TIMEOUT: return _("Search operation timeout"); case NOTIFY_CLEAN_SUCCESS: return _("Clean feature successful"); case NOTIFY_CLEAN_FAIL: return _("Clean feature failed"); case NOTIFY_CLEAN_ERROR: return _("An error was encountered during cleaning"); case NOTIFY_CLEAN_STOP_BY_USER: return _("Clean operation was interrupted by the user"); case NOTIFY_CLEAN_TIMEOUT: return _("Clean operation timeout"); case NOTIFY_GET_FLIST_SUCCESS: return _("Get feature list completion"); case NOTIFY_GET_FLIST_FAIL: return _("Get feature list failed"); case NOTIFY_GET_FLIST_ERROR: return _("An error was encountered during getting feature list"); case NOTIFY_RENAME_SUCCESS: return _("Rename feature successful"); case NOTIFY_RENAME_FAIL: return _("Rename feature failed"); case NOTIFY_RENAME_ERROR: return _("An error was encountered during renaming"); case NOTIFY_RENAME_INCOMPLETE: return _("Feature renaming is not complete, please try again"); case NOTIFY_CLOSE_SUCCESS: return _("Close device completion"); case NOTIFY_CLOSE_FAIL: return _("Close device failed"); case NOTIFY_CLOSE_ERROR: return _("An error was encountered during closing"); default: return _("Device internal error"); } } int bio_common_get_empty_index(bio_dev *dev, int uid, int start, int end) { sqlite3 *db = bio_sto_connect_db(); feature_info * info, * info_list; int cmp = 0; int empty_index = 0; int current_index = -1; if ((end != -1) && (end < start)) end = start; info_list = bio_sto_get_feature_info(db, uid, dev->bioinfo.biotype, dev->device_name, start, end); bio_sto_disconnect_db(db); info = info_list; empty_index = start; while (info != NULL) { current_index = info->index; cmp = current_index - empty_index; if (cmp == 0) empty_index++; if (cmp > 0) break; info = info->next; } bio_sto_free_feature_info_list(info_list); /* 找到空闲值,返回 */ if (cmp > 0) return empty_index; /* 未找到空闲值,且不限大小的情况下,返回值为:列表中最大索引值+1 */ if (end == -1) return current_index + 1; /* 其他情况代表这未找到,返回-1 */ return -1; } int bio_common_get_empty_sample_no(bio_dev *dev, int start, int end) { sqlite3 *db = bio_sto_connect_db(); feature_info * info, * info_list; unsigned char * sample_flag = NULL; int i = 0; int empty_sample_no = -1; if (end < start) end = start; sample_flag = malloc(sizeof(unsigned char) * (end + 1)); for (i = 0; i <= end; i++) { if (i >= start) sample_flag[i] = 0; else sample_flag[i] = 1; } info_list = bio_sto_get_feature_info(db, -1, dev->bioinfo.biotype, dev->device_name, 0, -1); bio_sto_disconnect_db(db); info = info_list; while (info != NULL) { feature_sample * sample = info->sample; while (sample != NULL) { sample_flag[sample->no] = 1; sample = sample->next; } info = info->next; } bio_sto_free_feature_info_list(info_list); i = start; while ((i <= end) && (empty_sample_no == -1)) { if (sample_flag[i] == 0) empty_sample_no = i; i++; } free(sample_flag); return empty_sample_no; } /* * 检测usb设备,返回检测到的数量 */ int bio_common_detect_usb_device(bio_dev *dev) { libusb_device ** usb_devs_list = NULL; // 指向设备指针的指针,用于检索设备列表 struct libusb_device_descriptor usb_dev_desc= {0}; libusb_context *ctx = NULL; // libusb session ssize_t cnt; // 列表中的设备数量 int ret = 0; int idx = 0; int num = 0; ret = libusb_init(&ctx); // 初始化刚刚声明的会话库 if(ret < 0) { bio_print_error(_("Init libusb Error\n")); return -1; } libusb_set_debug(ctx, LIBUSB_LOG_LEVEL_WARNING); cnt = libusb_get_device_list(ctx, &usb_devs_list); // 获取设备列表 if(cnt < 0) { bio_print_error(_("Get USB Device List Error\n")); return -1; } for (idx = 0; idx < cnt; idx++) { memset(&usb_dev_desc, 0, sizeof(struct libusb_device_descriptor)); if(libusb_get_device_descriptor(usb_devs_list[idx], &usb_dev_desc) != 0) { bio_print_error(_("Can not get usb information\n")); return num; } int i; const struct usb_id * id_table = dev->usb_info.id_table; for (i = 0; id_table[i].idVendor != 0; i++) { if (id_table[i].idVendor == usb_dev_desc.idVendor && id_table[i].idProduct == usb_dev_desc.idProduct) { num++; break; } } } bio_print_debug(_("libbiometric detected usb device(%s): %d\n"), dev->device_name, num); libusb_exit(ctx); return num; } int bio_get_empty_driver_id() { int i = 0; uint8_t drv_id_list[BIO_DRVID_DYNAMIC_MAX - BIO_DRVID_DYNAMIC_START + 1] = {0}; GList * l = bio_get_drv_list(); while (l != NULL) { bio_dev * dev = l->data; if (dev->driver_id >= BIO_DRVID_DYNAMIC_START) drv_id_list[dev->driver_id - BIO_DRVID_DYNAMIC_START] = 1; l = l->next; } for (i = 0; i < BIO_DRVID_DYNAMIC_MAX - BIO_DRVID_DYNAMIC_START + 1; i++) { if (drv_id_list[i] != 1) break; } if (drv_id_list[i] != 1) return i + BIO_DRVID_DYNAMIC_START; else return -1; } int bio_vprint_by_level(int print_level, FILE * __restrict stream, const char * __restrict format, va_list args) { int ret = 0; int level_int = 0; char * level_char = getenv(BIO_PRINT_LEVEL_ENV); if (level_char == NULL) { level_int = BIO_PRINT_LEVEL_DEFAULT; } else { level_int = atoi(level_char); } if (print_level <= level_int) { char * color_char = getenv(BIO_PRINT_LEVEL_COLOR); int color_int = 0; if (color_char != NULL) color_int = atoi(color_char); if (color_int == 1) { switch (print_level) { case BIO_PRINT_LEVEL_EMERG: case BIO_PRINT_LEVEL_ALERT: case BIO_PRINT_LEVEL_CRIT: case BIO_PRINT_LEVEL_ERROR: fprintf(stderr, "%s", BIO_PRINT_COLOR_RED); break; case BIO_PRINT_LEVEL_WARN: fprintf(stdout, "%s", BIO_PRINT_COLOR_PURPLE); break; case BIO_PRINT_LEVEL_NOTICE: fprintf(stdout, "%s", BIO_PRINT_COLOR_BLUE); break; case BIO_PRINT_LEVEL_INFO: fprintf(stdout, "%s", BIO_PRINT_COLOR_CYAN); break; case BIO_PRINT_LEVEL_DEBUG: fprintf(stdout, "%s", BIO_PRINT_COLOR_YELLOW); break; default: fprintf(stdout, "%s", BIO_PRINT_COLOR_WHITE); } } switch (print_level) { case BIO_PRINT_LEVEL_EMERG: fprintf(stderr, "[EMERG] "); break; case BIO_PRINT_LEVEL_ALERT: fprintf(stderr, "[ALERT] "); break; case BIO_PRINT_LEVEL_CRIT: fprintf(stderr, "[ CRIT] "); break; case BIO_PRINT_LEVEL_ERROR: fprintf(stderr, "[ERROR] "); break; case BIO_PRINT_LEVEL_WARN: fprintf(stdout, "[ WARN] "); break; case BIO_PRINT_LEVEL_NOTICE: fprintf(stdout, "[ NOTE] "); break; case BIO_PRINT_LEVEL_INFO: fprintf(stdout, "[ INFO] "); break; case BIO_PRINT_LEVEL_DEBUG: fprintf(stdout, "[DEBUG] "); break; default: fprintf(stdout, "[UKNOW] "); } ret = vfprintf(stream, format, args); if (color_int == 1) { if (print_level <= BIO_PRINT_LEVEL_ERROR && print_level >= 0) fprintf(stderr, "%s", BIO_PRINT_COLOR_END); else fprintf(stdout, "%s", BIO_PRINT_COLOR_END); } } fflush(stream); return ret; } int bio_print_by_level(int print_level, FILE * stream, char * format, ...) { int ret = 0; va_list args; va_start(args, format); ret = bio_vprint_by_level(print_level, stream, format, args); va_end(args); return ret; } int bio_print_debug(const char * format, ...) { int ret = 0; va_list args; va_start(args, format); ret = bio_vprint_by_level(BIO_PRINT_LEVEL_DEBUG, stdout, format, args); va_end(args); return ret; } int bio_print_info(const char * format, ...) { int ret = 0; va_list args; va_start(args, format); ret = bio_vprint_by_level(BIO_PRINT_LEVEL_INFO, stdout, format, args); va_end(args); return ret; } int bio_print_notice(const char *format, ...) { int ret = 0; va_list args; va_start(args, format); ret = bio_vprint_by_level(BIO_PRINT_LEVEL_NOTICE, stdout, format, args); va_end(args); return ret; } int bio_print_warning(const char * format, ...) { int ret = 0; va_list args; va_start(args, format); ret = bio_vprint_by_level(BIO_PRINT_LEVEL_WARN, stdout, format, args); va_end(args); return ret; } int bio_print_error(const char * format, ...) { int ret = 0; va_list args; va_start(args, format); ret = bio_vprint_by_level(BIO_PRINT_LEVEL_ERROR, stderr, format, args); va_end(args); return ret; } /********** 内部函数实现 **********/ /* 分配一个bio_dev资源 */ bio_dev * bio_dev_new() { bio_dev * dev; dev = malloc(sizeof(bio_dev)); if (dev != NULL) memset(dev, 0, sizeof(bio_dev)); return dev; } /* 释放bio_dev资源 */ void bio_dev_free(bio_dev * dev) { dev->ops_free(dev); if (dev->plugin_handle != NULL) { dlclose(dev->plugin_handle); dev->plugin_handle = NULL; } free(dev); } /* * 获取插件中的函数句柄 * * @param[in] handle 插件句柄 * @param[in] func_name 需获取的函数名 * @return 函数句柄地址 * @retval 非NULL 获取成功 * NULL 获取失败 */ void* get_plugin_ops(void *handle, char *func_name) { char* err = NULL; void* func = NULL; func = dlsym(handle, func_name); err = dlerror(); if(err != NULL) { bio_print_error(_("Get function %s handle error: %s\n"), func_name, err); return NULL; } return func; } /* USB设备插入时的回调函数 */ static int bio_usb_hotplug_callback_attach(libusb_context *ctx, libusb_device *usbdev, libusb_hotplug_event event, void *user_data) { struct libusb_device_descriptor desc; int rc; rc = libusb_get_device_descriptor(usbdev, &desc); if (LIBUSB_SUCCESS != rc) { bio_print_error(_("Error: Can not get device descriptor\n")); } bio_print_info(_("Device attached: %04x:%04x\n"), desc.idVendor, desc.idProduct); GList * l = bio_drv_list; bio_dev * biodev = NULL; while (l != NULL) { bio_dev * dev = l->data; if (dev->enable == 0 || dev->bioinfo.bustype != BusT_USB || dev->usb_info.id_table == NULL) { l = l->next; continue; } int i; const struct usb_id * id_table = dev->usb_info.id_table; for (i = 0; id_table[i].idVendor != 0; i++) { if (id_table[i].idVendor == desc.idVendor && id_table[i].idProduct == desc.idProduct) { biodev = dev; biodev->dev_num = biodev->ops_discover(biodev); bio_usb_device_hot_plug_common_callbak(dev->driver_id, USB_HOT_PLUG_ATTACHED, biodev->dev_num); break; } } if (biodev != NULL) break; l = l->next; } if ((biodev != NULL) && (biodev->dev_num > 0)) { bio_dev_list = g_list_append(bio_dev_list, biodev); biodev->ops_attach(biodev); } bio_print_drv_list(BIO_PRINT_LEVEL_DEBUG); bio_print_dev_list(BIO_PRINT_LEVEL_DEBUG); return 0; } /* USB设备拔出时的回调函数 */ static int bio_usb_hotplug_callback_detach(libusb_context *ctx, libusb_device *usbdev, libusb_hotplug_event event, void *user_data) { struct libusb_device_descriptor desc; int rc; rc = libusb_get_device_descriptor(usbdev, &desc); if (LIBUSB_SUCCESS != rc) { bio_print_error(_("Error getting device descriptor")); } bio_print_info(_("Device detached: %04x:%04x\n"), desc.idVendor, desc.idProduct); GList * l = bio_drv_list; bio_dev * biodev = NULL; while (l != NULL) { bio_dev * dev = l->data; if (dev->enable == 0 || dev->bioinfo.bustype != BusT_USB || dev->usb_info.id_table == NULL) { l = l->next; continue; } int i; const struct usb_id * id_table = dev->usb_info.id_table; for (i = 0; id_table[i].idVendor != 0; i++) { if (id_table[i].idVendor == desc.idVendor && id_table[i].idProduct == desc.idProduct) { biodev = dev; biodev->dev_num = biodev->ops_discover(biodev); bio_usb_device_hot_plug_common_callbak(dev->driver_id, USB_HOT_PLUG_DETACHED, biodev->dev_num); break; } } if (biodev != NULL) break; l = l->next; } if (biodev != NULL) { bio_print_debug("Dev No. = %d\n", g_list_index(bio_dev_list, biodev)); if (biodev->dev_num <= 0) bio_dev_list = g_list_remove(bio_dev_list, biodev); biodev->ops_detach(biodev); } bio_print_drv_list(BIO_PRINT_LEVEL_DEBUG); bio_print_dev_list(BIO_PRINT_LEVEL_DEBUG); return 0; } /* 框架缺省的获取特征列表函数 */ feature_info * bio_common_get_feature_list(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end) { if (dev->enable == FALSE) { bio_set_dev_status(dev, DEVS_COMM_DISABLE); return NULL; } if (action == ACTION_START) { feature_info * finfo_list = NULL; sqlite3 *db = bio_sto_connect_db(); bio_set_dev_status(dev, DEVS_GET_FLIST_DOING); finfo_list = bio_sto_get_feature_info(db, uid, dev->bioinfo.biotype, dev->device_name, idx_start, idx_end); print_feature_info(finfo_list); bio_sto_disconnect_db(db); bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_abs_result(dev, OPS_GET_FLIST_SUCCESS); bio_set_notify_abs_mid(dev, NOTIFY_GET_FLIST_SUCCESS); return finfo_list; } else { bio_set_dev_status(dev, DEVS_COMM_IDLE); bio_set_ops_abs_result(dev, OPS_GET_FLIST_STOP_BY_USER); bio_set_notify_abs_mid(dev, NOTIFY_GET_FLIST_STOP_BY_USER); return NULL; } } /* 框架缺省的特征重命名函数 */ int bio_comm_feature_rename_by_db(bio_dev *dev, int uid, int idx, char * new_name) { feature_info * info_list = NULL; feature_info * info = NULL; sqlite3 *db = bio_sto_connect_db(); int count = 0; int update_num = 0; info_list = bio_sto_get_feature_info(db, uid, dev->bioinfo.biotype, dev->device_name, idx, idx); info = info_list; while (info != NULL) { if (info->uid == uid && info->index == idx) { feature_sample *sample = info->sample; while (sample != NULL) { int ret = 0; ret = bio_sto_update_feature_info_by_dbid(db, sample->dbid, uid, dev->bioinfo.biotype, dev->device_name, idx, new_name, sample->no); if (ret == 0) update_num++; count++; sample = sample->next; } } info = info->next; } bio_sto_disconnect_db(db); if (count == 0) bio_print_warning(_("Unable to find feature that require renaming\n")); if (update_num != count) bio_print_warning(_("There are %d feature samples to renaming failed, " "please try again\n"), count - update_num); return (count - update_num); } /* 状态变更的回调函数 */ void bio_status_changed_common_callback(int drvid, int type) { if (bio_status_changed_callback != NULL) bio_status_changed_callback(drvid, type); } /* 给上层服务提供的USB热插拔事件的回调函数接口 */ void bio_usb_device_hot_plug_common_callbak(int drvid, int action, int dev_num_now) { if (bio_usb_device_hot_plug_callback != NULL) bio_usb_device_hot_plug_callback(drvid, action, dev_num_now); } /* 释放单个bio_dev结构体 */ void bio_dev_glist_data_free(bio_dev * dev, gpointer p2) { bio_dev_free(dev); } biometric-authentication/src/lib/biometric_intl.h0000644000175000017500000000231713517470404021211 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRIC_INTL_H #define BIOMETRIC_INTL_H #include #ifndef LIBBIOMETRIC_DOMAIN_NAME #define LIBBIOMETRIC_DOMAIN_NAME "biometric-authentication" #endif #ifndef LOCALEDIR #define LOCALEDIR "/usr/local/share/locale/" #endif #define _(String) dgettext (LIBBIOMETRIC_DOMAIN_NAME, String) #define N_(String) (String) #endif // BIOMETRIC_INTL_H biometric-authentication/src/lib/biometric_version.c0000644000175000017500000001010113517470404021711 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "biometric_version.h" /** * @brief 获取驱动使用的DRV_API版本 * 获取驱动使用的DRV_API版本 * @param[in] int major 主版本号 * @param[in] int minor 从版本号 * @param[in] int function 功能版本号 * @return 无 */ void bio_get_drv_api_version_by_driver_side(bio_dev * dev, int * major, int * minor, int * function) { *major = dev->drv_api_version.major; *minor = dev->drv_api_version.minor; *function = dev->drv_api_version.function; } /** * @brief 获取框架使用的DRV_API版本 * 获取框架使用的DRV_API版本 * @param[in] int major 主版本号 * @param[in] int minor 从版本号 * @param[in] int function 功能版本号 * @return 无 */ void bio_get_drv_api_version_by_framework_side(int * major, int * minor, int * function) { *major = BIO_DRV_API_VERSION_MAJOR; *minor = BIO_DRV_API_VERSION_MINOR; *function = BIO_DRV_API_VERSION_FUNC; } /** * @brief 获取框架使用的APP_API版本 * 获取框架使用的APP_API版本 * @param[in] int major 主版本号 * @param[in] int minor 从版本号 * @param[in] int function 功能版本号 * @return 无 */ void bio_get_app_api_version_by_framework_side(int * major, int * minor, int * function) { *major = BIO_APP_API_VERSION_MAJOR; *minor = BIO_APP_API_VERSION_MINOR; *function = BIO_APP_API_VERSION_FUNC; } /** * @brief 驱动API兼容性检测 * 对比驱动使用的API版本和当前框架版本 * @param[in] int major 主版本号 * @param[in] int minor 从版本号 * @param[in] int function 功能版本号 * @return int 检测结果 * @retval =0 驱动使用的API版本兼容框架版本(主、从版本号匹配,功能版本号小于等于框架版本) * >0 驱动使用的API版本不兼容框架版本,驱动过新 * <0 驱动使用的API版本不兼容框架版本,驱动过旧 */ int bio_check_drv_api_version(int major, int minor, int function) { if (major > BIO_DRV_API_VERSION_MAJOR) return 3; else if (major < BIO_DRV_API_VERSION_MAJOR) return -3; if (minor > BIO_DRV_API_VERSION_MINOR) return 2; else if (minor < BIO_DRV_API_VERSION_MINOR) return -2; if (function > BIO_DRV_API_VERSION_FUNC) return 1; else if (function < BIO_DRV_API_VERSION_FUNC) return 0; return 0; } /** * @brief 应用API兼容性检测 * 对比应用使用的API版本和当前框架版本 * @param[in] int major 主版本号 * @param[in] int minor 从版本号 * @param[in] int function 功能版本号 * @return int 检测结果 * @retval =0 应用使用的API版本兼容框架版本(主、从版本号匹配,功能版本号小于等于框架版本) * >0 应用使用的API版本不兼容框架版本,应用过新 * <0 应用使用的API版本不兼容框架版本,应用过旧 */ int bio_check_app_api_version(int major, int minor, int function) { if (major > BIO_APP_API_VERSION_MAJOR) return 3; else if (major < BIO_APP_API_VERSION_MAJOR) return -3; if (minor > BIO_APP_API_VERSION_MINOR) return 2; else if (minor < BIO_APP_API_VERSION_MINOR) return -2; if (function > BIO_APP_API_VERSION_FUNC) return 1; else if (function < BIO_APP_API_VERSION_FUNC) return 0; return 0; } biometric-authentication/src/lib/biometric_version.h0000644000175000017500000000745013517470404021733 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRIC_VERSION_H #define BIOMETRIC_VERSION_H #include "biometric_common.h" #ifdef __cplusplus extern "C" { #endif // 驱动接口(DRV_API)版本号 #define BIO_DRV_API_VERSION_MAJOR 0 #define BIO_DRV_API_VERSION_MINOR 10 #define BIO_DRV_API_VERSION_FUNC 2 // 应用接口(APP_API)版本号 #define BIO_APP_API_VERSION_MAJOR 0 #define BIO_APP_API_VERSION_MINOR 11 #define BIO_APP_API_VERSION_FUNC 1 #define BIO_SET_DRV_API_VERSION(dev) \ do {\ (dev)->drv_api_version.major = BIO_DRV_API_VERSION_MAJOR;\ (dev)->drv_api_version.minor = BIO_DRV_API_VERSION_MINOR;\ (dev)->drv_api_version.function = BIO_DRV_API_VERSION_FUNC;\ } while (0) #define bio_set_drv_api_version(dev) BIO_SET_DRV_API_VERSION(dev); /** * @brief 获取驱动使用的DRV_API版本 * 获取驱动使用的DRV_API版本 * @param[in] int major 主版本号 * @param[in] int minor 从版本号 * @param[in] int function 功能版本号 * @return 无 */ void bio_get_drv_api_version_by_driver_side(bio_dev * dev, int * major, int * minor, int * function); /** * @brief 获取框架使用的DRV_API版本 * 获取框架使用的DRV_API版本 * @param[in] int major 主版本号 * @param[in] int minor 从版本号 * @param[in] int function 功能版本号 * @return 无 */ void bio_get_drv_api_version_by_framework_side(int * major, int * minor, int * function); /** * @brief 获取框架使用的APP_API版本 * 获取框架使用的APP_API版本 * @param[in] int major 主版本号 * @param[in] int minor 从版本号 * @param[in] int function 功能版本号 * @return 无 */ void bio_get_app_api_version_by_framework_side(int * major, int * minor, int * function); /** * @brief 驱动API兼容性检测 * 对比驱动使用的API版本和当前框架版本 * @param[in] int major 主版本号 * @param[in] int minor 从版本号 * @param[in] int function 功能版本号 * @return int 检测结果 * @retval =0 驱动使用的DRV_API版本兼容框架版本(主、从版本号匹配,功能版本号小于等于框架版本) * >0 驱动使用的DRV_API版本不兼容框架版本,驱动过新 * <0 驱动使用的DRV_API版本不兼容框架版本,驱动过旧 */ int bio_check_drv_api_version(int major, int minor, int function); /** * @brief 应用API兼容性检测 * 对比应用使用的API版本和当前框架版本 * @param[in] int major 主版本号 * @param[in] int minor 从版本号 * @param[in] int function 功能版本号 * @return int 检测结果 * @retval =0 应用使用的APP_API版本兼容框架版本(主、从版本号匹配,功能版本号小于等于框架版本) * >0 应用使用的APP_API版本不兼容框架版本,驱动过新 * <0 应用使用的APP_API版本不兼容框架版本,驱动过旧 */ int bio_check_app_api_version(int major, int minor, int function); #ifdef __cplusplus } #endif #endif // BIOMETRIC_VERSION_H biometric-authentication/src/lib/biometric_config.c0000644000175000017500000000266613517470404021512 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include "biometric_common.h" #include "biometric_intl.h" #include "biometric_config.h" /* 全局配置文件 */ GKeyFile * bioconf = NULL; int bio_conf_init() { bioconf = g_key_file_new(); GError *err = NULL; g_key_file_load_from_file(bioconf, DRIVERS_CONFIG_FILE, G_KEY_FILE_KEEP_COMMENTS, &err); if (err != NULL) { bio_print_error(_("Error[%d]: %s\n"), err->code, err->message); g_error_free(err); err = NULL; return -1; } return 0; } void bio_conf_free() { g_key_file_free(bioconf); } GKeyFile * get_bio_conf() { return bioconf; } biometric-authentication/src/lib/biometric_storage.h0000644000175000017500000001657513755706021021723 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef STROGE_H #define STROGE_H #include #ifdef __cplusplus extern "C" { #endif #define _STR(s) #s #define DEF2STR(s) _STR(s) #ifdef BIO_DB_DIR #define DB_DIR DEF2STR(BIO_DB_DIR) #else #define DB_DIR "/var/lib/biometric-auth/" #endif #ifdef BIO_DB_NAME #define DB_NAME DEF2STR(BIO_DB_NAME) #else #define DB_NAME "biometric.db" #endif /* 定义数据库名称和数据库中表的名称 */ #define DB_PATH DB_DIR DB_NAME #define TABLE_EIGEN_INFO "EIGEN_INFO" #define TABLE_DATABASE_FORMAT "DATABASE_FORMAT" /* 定义数据库格式的版本号 */ #define DATABASE_FORMAT_MAJOR 1 #define DATABASE_FORMAT_MINOR 1 #define DATABASE_FORMAT_FUNC 0 /* * 特征采样数据链表 * 记录单个特征部位的单次特征采样值的链表 */ typedef struct feature_sample_t feature_sample; struct feature_sample_t { unsigned long long dbid; /** 数据库中采样的ID(主键,自增长) **/ int no; /** 采样的序号 */ char *data; /** 采样的数据 */ feature_sample *next; /** 链表中下一个采样值 */ }; /* * 各特征部位信息链表 * 记录单个特征部位详细信息的链表 */ typedef struct feature_info_t feature_info; struct feature_info_t { int uid; /** 特征部位所属的用户ID */ int biotype; /** 特征部位的类型 */ char *driver; /** 特征对应的驱动名 */ int index; /** 特征部位的索引值 */ char *index_name; /** 特征部位的名称,由用户设置 */ feature_sample *sample; /** 特征部位的采样值链表 */ feature_info *next; /** 链表中的下一个特征部位信息 */ }; /* 创建一份指定字符串的拷贝,返回拷贝地址 */ char * bio_sto_new_str(char * old_str); /* 输出特征信息结构体 */ void print_feature_info(feature_info * info_list); /* * 连接数据库 * 连接数据库,数据库位置由DB_NAME宏指定 * * @return 返回数据库句柄 * @retval NULL 连接失败 * 其他 连接成功 */ sqlite3 *bio_sto_connect_db(); /* * 断开数据库连接 * * @param[in] sqlite3 *db 需要关闭的数据库句柄 * @return 无 */ void bio_sto_disconnect_db(sqlite3 *db); /* * 创建新的采样结构体 * * @param[in] no 采样编号 * @param[in] data 采样的数据 * @return 返回采样结构体指针,NULL创建失败 * @note 创建的采样结构体需要通过bio_sto_free_feature_sample释放 */ feature_sample * bio_sto_new_feature_sample(int no, char * data); /* 回收单项采样数据 */ /* * 回收单项采样数据 * 回收单项采样数据空间资源 * * @param[in] sample 单项采样数据 * @return 无 */ void bio_sto_free_feature_sample(feature_sample * sample); /* 回收采样数据链表 */ /* * 回收采样数据链表 * 回收采样数据链表空间资源,一般由bio_sto_free_feature_info函数调用 * * @param[in] sample_list 采样数据的链表 */ void bio_sto_free_feature_sample_list(feature_sample * sample_list); /* * 创建新的特征结构体 * * @param[in] no 采样编号 * @param[in] data 采样的数据 * @return 返回采样结构体指针,NULL创建失败 * @note 创建的采样结构体需要通过bio_sto_free_feature_sample释放 */ feature_info * bio_sto_new_feature_info(int uid, int biotype, char *driver, int index, char *index_name); /* * 回收单个特征数据项 * * @param[in] info 单个特征数据项 */ void bio_sto_free_feature_info(feature_info * info); /* * 回收特征数据链表 * * @param[in] info_list 特征数据的链表 */ void bio_sto_free_feature_info_list(feature_info * info_list); /* * 获取特征信息链表 * 获取指定范围内的特征信息数据(全闭区间[start, end]) * * @param[in] db 指定数据库 * @param[in] uid 指定用户ID,-1代表获取所有用户 * @param[in] biotype 指定生物特征类型,-1代表获取所有生物类型 * @param[in] driver 指定驱动名,NULL代表获取所有驱动的特征类型 * @param[in] index_start 指定开始的索引 * @param[in] index_end 指定结束的索引,-1代表到最后 * @return 返回特征信息链表,NULL代表在指定区间无特征存放 * @note 获取的特征信息链表需要手动释放 * @par 修改日志 * JianglinXuan于2017-05-17创建 */ feature_info *bio_sto_get_feature_info(sqlite3 *db, int uid, int biotype, char *driver, int index_start, int index_end); /* * 保存特征信息链表 * 保存给定的特征信息数据 * * @param[in] db 指定数据库 * @param[in] info_list 需要保存的特征信息链表 * @return 保存结果 * @note 获取的特征信息链表需要手动释放 */ int bio_sto_set_feature_info(sqlite3 *db, feature_info * info_list); /* * 删除特征信息 * 参数指定范围内的特征信息数据(全闭区间[start, end]) * * @param[in] db 指定数据库 * @param[in] uid 指定用户ID,-1代表删除所有用户的指定特征信息 * @param[in] biotype 指定生物特征类型,-1代表删除所有生物类型特征信息 * @param[in] driver 指定驱动名,NULL代表获取所有驱动的特征类型 * @param[in] index_start 指定开始的索引 * @param[in] index_end 指定结束的索引,-1代表到最后 * @return 删除操作的结果 * @retval 0 操作成功 */ int bio_sto_clean_feature_info(sqlite3 *db, int uid, int biotype, char *driver, int index_start, int index_end); /* * 更新特征信息 * 参数指定特征的ID及其更新值 * * @param[in] db 指定数据库 * @param[in] id 指定特征ID * @param[in] uid 更新的用户ID * @param[in] biotype 更新的生物特征类型 * @param[in] driver 指定驱动名 * @param[in] index 更新的索引编号 * @param[in] index_name 更新的索引编号 * @param[in] sample_no 更新的采样编号 * @return 更新操作的结果 * @retval 0 操作成功 */ int bio_sto_update_feature_info_by_dbid(sqlite3 *db, unsigned long long dbid, int uid, int biotype, char *driver, int index, char * index_name, int sample_no); /* * 检测并升级数据库 * 检测数据库格式,并升级低版本的数据库格式 * * @param[in] db 指定数据库 * @return 操作的结果 * @retval 0 数据库格式兼容,或数据库格式已成功升级 * -1 检测数据库格式失败,或数据库格式不兼容且无法升级 * -2 升级数据库失败 */ int bio_sto_check_and_upgrade_db_format(sqlite3 *db); #ifdef __cplusplus } #endif #endif // STROGE_H biometric-authentication/src/lib/Makefile.am0000644000175000017500000000253213755706021020071 0ustar fengfengNULL = LIB_SO_VERSION_MAJOR = 1 LIB_SO_VERSION_MINOR = 3 LIB_SONAME = libbiometric.so.$(LIB_SO_VERSION_MAJOR).$(LIB_SO_VERSION_MINOR) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libbiometric.pc DISTCLEANFILES = libbiometric.pc libbiodir = $(libdir) libbio_LTLIBRARIES = libbiometric.la dist-hook: echo dist-hook DOMAIN_NAME = -DLIBBIOMETRIC_DOMAIN_NAME=\""$(PACKAGE)"\" LOCALEDIR_CFS = -DLOCALEDIR=\""$(localedir)"\" COMM_CFS = -Wall -g $(LOCALEDIR_CFS) $(DOMAIN_NAME) COMM_LDFS = -Wl,-z,now if HAS_BIO_DB_DIR COMM_CFS += -DBIO_DB_DIR=$(BIO_DB_DIR) endif if HAS_BIO_DB_NAME COMM_CFS += -DBIO_DB_NAME=$(BIO_DB_NAME) endif if HAS_BIO_CONFIG_DIR COMM_CFS += -DBIO_CONFIG_DIR=$(BIO_CONFIG_DIR) endif libbiometric_la_SOURCES = \ biometric_common.h biometric_common.c \ biometric_config.h biometric_config.c \ biometric_storage.h biometric_storage.c \ biometric_version.h biometric_version.c \ $(NULL) libbiometric_la_CFLAGS = $(COMM_CFS) $(UUID_CFLAGS) \ $(GLIB_2_CFLAGS) $(GTK_3_CFLAGS) $(LIBUSB_1_CFLAGS) $(SQLITE3_CFLAGS) \ $(NULL) libbiometric_la_LDFLAGS = $(COMM_LDFS) $(UUID_LDFLAGS) \ $(GLIB_2_LIBS) $(GTK_3_LIBS) $(LIBUSB_1_LIBS) $(SQLITE3_LIBS) \ $(NULL) libbiometricincludedir=$(includedir)/libbiometric/ libbiometricinclude_HEADERS = biometric_common.h \ biometric_config.h \ biometric_storage.h \ biometric_version.h \ $(NULL) biometric-authentication/src/lib/biometric_common.h0000644000175000017500000010720213755706021021533 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef BIOMETRIC_COMM_H #define BIOMETRIC_COMM_H #include #include #include #include #include #include #include "biometric_storage.h" #include #ifdef __cplusplus extern "C" { #endif /* 定义动态驱动ID的起止范围 */ #define BIO_DRVID_STATIC_MAX 99 #define BIO_DRVID_DYNAMIC_START (BIO_DRVID_STATIC_MAX + 1) #define BIO_DRVID_DYNAMIC_MAX 1023 /* 定义输出消息的等级,与Linux内核中printk的等级定义一致 */ #define BIO_PRINT_LEVEL_EMERG 0 #define BIO_PRINT_LEVEL_ALERT 1 #define BIO_PRINT_LEVEL_CRIT 2 #define BIO_PRINT_LEVEL_ERROR 3 // 错误信息 #define BIO_PRINT_LEVEL_WARN 4 // 警告信息 #define BIO_PRINT_LEVEL_NOTICE 5 // 提示信息 #define BIO_PRINT_LEVEL_INFO 6 // 运行时信息 #define BIO_PRINT_LEVEL_DEBUG 7 // 调试信息 /* 定义输出控制等级及开关(环境变量) */ #define BIO_PRINT_LEVEL_DEFAULT BIO_PRINT_LEVEL_NOTICE // 默认输出信息等级 #define BIO_PRINT_LEVEL_ENV "BIO_PRINT_LEVEL" // 控制信息等级的环境变量 #define BIO_PRINT_LEVEL_COLOR "BIO_PRINT_COLOR" // 控制信息颜色的环境变量 /* 定义输出消息的颜色 */ #define BIO_PRINT_COLOR_BLACK "\033[01;30m" #define BIO_PRINT_COLOR_RED "\033[01;31m" #define BIO_PRINT_COLOR_GREEN "\033[01;32m" #define BIO_PRINT_COLOR_YELLOW "\033[01;33m" #define BIO_PRINT_COLOR_BLUE "\033[01;34m" #define BIO_PRINT_COLOR_PURPLE "\033[01;35m" #define BIO_PRINT_COLOR_CYAN "\033[01;36m" #define BIO_PRINT_COLOR_WHITE "\033[01;36m" #define BIO_PRINT_COLOR_END "\033[0m" /* 定义文件路径最大长度 */ #define MAX_PATH_LEN 1024 /* 定义默认的操作超时时间 */ #define BIO_OPS_DEFAULT_TIMEOUT 30 /* 版本信息 */ typedef struct api_version_t api_version; struct api_version_t { int major; int minor; int function; }; /* 生物特征类型 */ typedef enum { BioT_FingerPrint, /** 指纹 **/ BioT_FingerVein, /** 指静脉 **/ BioT_Iris, /** 虹膜 **/ BioT_Face, /** 人脸 **/ BioT_VoicePrint, /** 声纹 **/ }BioType; /* 存储方式 */ typedef enum { StoT_Device, /** 存储在硬件中 **/ StoT_OS, /** 存储在操作系统中 **/ StoT_Mix, }StoType; /* 特征值的类型 */ typedef enum { EigT_Data, /** 原始数据 **/ EigT_Eigenvalue, /** 特征值 **/ EigT_Eigenvector, /** 特征向量 **/ }EigType; /* 验证方式 */ typedef enum { VerT_Hardware, /** 硬件验证 **/ VerT_Software, /** 软件验证 **/ VerT_Mix, /** 混合验证 **/ VerT_Other }VerType; /* 识别方式 */ typedef enum { IdT_Hardware, /** 硬件识别 **/ IdT_Software, /** 软件识别 **/ IdT_Mix, /** 混合识别 **/ IdT_Other }IdType; /* 设备的总线类型 */ typedef enum { BusT_Serial, /** 串口 **/ BusT_USB, /** USB接口 **/ BusT_PCIE, /** PCIE接口 **/ BusT_Any = 100, /** 任意总线类型,即不限总线类型 **/ BusT_Other, /** 其他总线类型 **/ }BusType; /* 操作定义,老旧接口,将会在未来版本中移除 */ typedef enum { ACTION_START, /** 开始操作 **/ ACTION_STOP, /** 中断操作 **/ }OpsActions; /* USB设备热插拔行为 */ typedef enum { USB_HOT_PLUG_ATTACHED = 1, /** USB设备接入 **/ USB_HOT_PLUG_DETACHED = -1, /** USB设备拔出 **/ }USBHotPlugActions; /* 串口设备相关信息 */ struct Serial_Info { int fd; char path[MAX_PATH_LEN]; unsigned long driver_data; }; /* USB设备硬件信息 */ struct usb_id { uint16_t idVendor; uint16_t idProduct; char * description; }; /* USB设备额外的驱动信息 */ struct USB_INFO { const struct usb_id * id_table; libusb_hotplug_callback_handle callback_handle[2]; unsigned long driver_data; }; /* PCI设备硬件信息 */ struct pci_id { uint16_t idVendor; uint16_t idProduct; char * description; }; /* PCI设备额外的驱动信息 */ struct PCI_INFO { const struct pci_id * const id_table; }; /* 生物特征识别设备的信息汇总 */ struct BioInfo{ BioType biotype; /** 生物特征类型 **/ StoType stotype; /** 存储类型 **/ EigType eigtype; /** 特征类型 **/ VerType vertype; /** 验证类型 **/ IdType idtype; /** 识别类型 **/ BusType bustype; /** 总线类型 **/ void *biodata; /** 具体各特征私有信息 **/ }; /* 定义操作类型 */ typedef enum { OPS_TYPE_COMM = 0, OPS_TYPE_OPEN, OPS_TYPE_ENROLL, OPS_TYPE_VERIFY, OPS_TYPE_IDENTIFY, OPS_TYPE_CAPTURE, OPS_TYPE_SEARCH, OPS_TYPE_CLEAN, OPS_TYPE_GET_FLIST, OPS_TYPE_RENAME, OPS_TYPE_CLOSE, OPS_TYPE_ENROLL_PROCESS, }BioOpsType; /* * 定义设备当前的状态 * 一般来说,设备只会处于两种状态:设备正在处理中,设备空闲 */ typedef enum { DEVS_COMM_IDLE = OPS_TYPE_COMM * 100, /** 空闲状态 **/ DEVS_COMM_DOING, /** 设备正在处理中 **/ DEVS_COMM_STOP_BY_USER, /** 设备操作被终止 **/ DEVS_COMM_DISABLE, /** 设备被禁用 **/ DEVS_COMM_MAX, DEVS_OPEN_DOING = OPS_TYPE_OPEN * 100 + 1, /** 正在打开设备 **/ DEVS_OPEN_STOP_BY_USER, /** 打开操作被终止 **/ DEVS_OPEN_MAX, DEVS_ENROLL_DOING = OPS_TYPE_ENROLL * 100 + 1, /** 正在录入 **/ DEVS_ENROLL_STOP_BY_USER, /** 打开操作被终止 **/ DEVS_ENROLL_MAX, DEVS_VERIFY_DOING = OPS_TYPE_VERIFY * 100 + 1, /** 正在认证 **/ DEVS_VERIFY_STOP_BY_USER, /** 打开操作被终止 **/ DEVS_VERIFY_MAX, DEVS_IDENTIFY_DOING = OPS_TYPE_IDENTIFY * 100 + 1, /** 正在识别指定特征 **/ DEVS_IDENTIFY_STOP_BY_USER, /** 打开操作被终止 **/ DEVS_IDENTIFY_MAX, DEVS_CAPTURE_DOING = OPS_TYPE_CAPTURE * 100 + 1, /** 正在捕获信息 **/ DEVS_CAPTURE_STOP_BY_USER, /** 打开操作被终止 **/ DEVS_CAPTURE_MAX, DEVS_SEARCH_DOING = OPS_TYPE_SEARCH * 100 + 1, /** 正在搜索指定特征 **/ DEVS_SEARCH_STOP_BY_USER, /** 打开操作被终止 **/ DEVS_SEARCH_MAX, DEVS_CLEAN_DOING = OPS_TYPE_CLEAN * 100 + 1, /** 正在清理特征数据 **/ DEVS_CLEAN_STOP_BY_USER, /** 打开操作被终止 **/ DEVS_CLEAN_MAX, DEVS_GET_FLIST_DOING = OPS_TYPE_GET_FLIST * 100 + 1, /** 正在获取特征列表 **/ DEVS_GET_FLIST_STOP_BY_USER, /** 获取特征列表操作被终止 **/ DEVS_GET_FLIST_MAX, DEVS_RENAME_DOING = OPS_TYPE_RENAME * 100 + 1, /** 正在重命名特征 **/ DEVS_RENAME_STOP_BY_USER, /** 重命名特征操作被终止 **/ DEVS_RENAME_MAX, DEVS_CLOSE_DOING = OPS_TYPE_CLOSE * 100 + 1, /** 正在关闭设备 **/ DEVS_CLOSE_STOP_BY_USER, /** 打开操作被终止 **/ DEVS_CLOSE_MAX, }DevStatus; /* * 定义各种操作结果 */ typedef enum { OPS_COMM_SUCCESS = OPS_TYPE_COMM * 100, /** 空闲状态 **/ OPS_COMM_FAIL, /** 操作失败 **/ OPS_COMM_NO_MATCH = OPS_COMM_FAIL, /** 不匹配 **/ OPS_COMM_ERROR, /** 通用操作错误 **/ OPS_COMM_STOP_BY_USER, /** 用户取消 **/ OPS_COMM_TIMEOUT, /** 操作超时 **/ OPS_COMM_OUT_OF_MEM, /** 无法分配内存 **/ OPS_COMM_MAX, OPS_OPEN_SUCCESS = OPS_TYPE_OPEN * 100, /** 打开设备完成 **/ OPS_OPEN_FAIL, /** 打开设备失败 **/ OPS_OPEN_ERROR, /** 打开设备遇到错误 **/ OPS_OPEN_MAX, OPS_ENROLL_SUCCESS = OPS_TYPE_ENROLL * 100, /** 录入信息成功 **/ OPS_ENROLL_FAIL, /** 录入失败 **/ OPS_ENROLL_ERROR, /** 录入过程中遇到错误 **/ OPS_ENROLL_STOP_BY_USER, /** 录入被用户中断 **/ OPS_ENROLL_TIMEOUT, /** 操作超时 **/ OPS_ENROLL_MAX, OPS_VERIFY_MATCH = OPS_TYPE_VERIFY * 100, /** 认证匹配 **/ OPS_VERIFY_NO_MATCH, /** 认证不匹配 **/ OPS_VERIFY_ERROR, /** 认证过程中遇到错误 **/ OPS_VERIFY_STOP_BY_USER, /** 认证被用户中断 **/ OPS_VERIFY_TIMEOUT, /** 操作超时 **/ OPS_VERIFY_MAX, OPS_IDENTIFY_MATCH = OPS_TYPE_IDENTIFY * 100, /** 识别到指定特征 **/ OPS_IDENTIFY_NO_MATCH, /** 未识别出指定特征 **/ OPS_IDENTIFY_ERROR, /** 识别过程中遇到错误 **/ OPS_IDENTIFY_STOP_BY_USER, /** 识别被用户中断 **/ OPS_IDENTIFY_TIMEOUT, /** 操作超时 **/ OPS_IDENTIFY_MAX, OPS_CAPTURE_SUCCESS = OPS_TYPE_CAPTURE * 100, /** 捕获成功 **/ OPS_CAPTURE_FAIL, /** 捕获失败 **/ OPS_CAPTURE_ERROR, /** 捕获过程中遇到错误 **/ OPS_CAPTURE_STOP_BY_USER, /** 捕获被用户中断 **/ OPS_CAPTURE_TIMEOUT, /** 操作超时 **/ OPS_CAPTURE_MAX, OPS_SEARCH_MATCH = OPS_TYPE_SEARCH * 100, /** 搜索到指定特征 **/ OPS_SEARCH_NO_MATCH, /** 未搜索到指定特征 **/ OPS_SEARCH_ERROR, /** 搜索过程中遇到错误 **/ OPS_SEARCH_STOP_BY_USER, /** 搜索被用户中断 **/ OPS_SEARCH_TIMEOUT, /** 操作超时 **/ OPS_SEARCH_MAX, OPS_CLEAN_SUCCESS = OPS_TYPE_CLEAN * 100, /** 清理特征成功 **/ OPS_CLEAN_FAIL, /** 清理失败 **/ OPS_CLEAN_ERROR, /** 清理过程中遇到错误 **/ OPS_CLEAN_STOP_BY_USER, /** 清理被用户中断 **/ OPS_CLEAN_TIMEOUT, /** 操作超时 **/ OPS_CLEAN_MAX, OPS_GET_FLIST_SUCCESS = OPS_TYPE_GET_FLIST * 100, /** 获取特征列表完成 **/ OPS_GET_FLIST_FAIL, /** 获取特征列表失败 **/ OPS_GET_FLIST_ERROR, /** 获取特征列表过程中遇到错误 **/ OPS_GET_FLIST_STOP_BY_USER, /** 获取特征列表被用户中断 **/ OPS_GET_FLIST_TIMEOUT, /** 获取特征列表超时 **/ OPS_GET_FLIST_MAX, OPS_RENAME_SUCCESS = OPS_TYPE_RENAME * 100, /** 重命名特征完成 **/ OPS_RENAME_FAIL, /** 重命名特征失败 **/ OPS_RENAME_ERROR, /** 重命名特征过程中遇到错误 **/ OPS_RENAME_STOP_BY_USER, /** 重命名特征被用户中断 **/ OPS_RENAME_TIMEOUT, /** 重命名特征超时 **/ OPS_RENAME_MAX, OPS_CLOSE_SUCCESS = OPS_TYPE_CLOSE * 100, /** 关闭设备完成 **/ OPS_CLOSE_FAIL, /** 关闭设备失败 **/ OPS_CLOSE_ERROR, /** 关闭设备过程中遇到错误 **/ OPS_CLOSE_MAX, }OpsResult; /* * 定义各种面向用户的提示消息 */ typedef enum { NOTIFY_COMM_IDLE = OPS_TYPE_COMM * 100, /** 空闲状态 **/ NOTIFY_COMM_SUCCESS = NOTIFY_COMM_IDLE, /** 操作成功 **/ NOTIFY_COMM_FAIL, /** 操作失败 **/ NOTIFY_COMM_NO_MATCH = NOTIFY_COMM_FAIL, /** 不匹配 **/ NOTIFY_COMM_ERROR, /** 操作过程中遇到错误 **/ NOTIFY_COMM_STOP_BY_USER, /** 用户中断 **/ NOTIFY_COMM_TIMEOUT, /** 操作超时 **/ NOTIFY_COMM_DISABLE, /** 设备不可用 **/ NOTIFY_COMM_OUT_OF_MEM, NOTIFY_COMM_UNSUPPORTED_OPS, /** 不支持的操作 **/ NOTIFY_COMM_MAX, NOTIFY_OPEN_SUCCESS = OPS_TYPE_OPEN * 100, /** 打开设备完成 **/ NOTIFY_OPEN_FAIL, /** 打开设备失败 **/ NOTIFY_OPEN_ERROR, /** 打开设备过程中遇到错误 **/ NOTIFY_OPEN_MAX, NOTIFY_ENROLL_SUCCESS = OPS_TYPE_ENROLL * 100, /** 录入信息成功 **/ NOTIFY_ENROLL_FAIL, /** 录入失败 **/ NOTIFY_ENROLL_ERROR, /** 录入过程中遇到错误 **/ NOTIFY_ENROLL_STOP_BY_USER, /** 录入被用户中断 **/ NOTIFY_ENROLL_TIMEOUT, /** 操作超时 **/ NOTIFY_ENROLL_MAX, NOTIFY_VERIFY_MATCH = OPS_TYPE_VERIFY * 100, /** 认证匹配 **/ NOTIFY_VERIFY_NO_MATCH, /** 认证不匹配 **/ NOTIFY_VERIFY_ERROR, /** 认真过程中遇到错误 **/ NOTIFY_VERIFY_STOP_BY_USER, /** 认证被用户中断 **/ NOTIFY_VERIFY_TIMEOUT, /** 操作超时 **/ NOTIFY_VERIFY_MAX, NOTIFY_IDENTIFY_MATCH = OPS_TYPE_IDENTIFY * 100, /** 识别到指定特征 **/ NOTIFY_IDENTIFY_NO_MATCH, /** 未识别出指定特征 **/ NOTIFY_IDENTIFY_ERROR, /** 识别过程中遇到错误 **/ NOTIFY_IDENTIFY_STOP_BY_USER, /** 识别被用户中断 **/ NOTIFY_IDENTIFY_TIMEOUT, /** 操作超时 **/ NOTIFY_IDENTIFY_MAX, NOTIFY_CAPTURE_SUCCESS = OPS_TYPE_CAPTURE * 100, /** 捕获成功 **/ NOTIFY_CAPTURE_FAIL, /** 捕获失败 **/ NOTIFY_CAPTURE_ERROR, /** 捕获过程中遇到错误 **/ NOTIFY_CAPTURE_STOP_BY_USER, /** 捕获被用户中断 **/ NOTIFY_CAPTURE_TIMEOUT, /** 操作超时 **/ NOTIFY_CAPTURE_MAX, NOTIFY_SEARCH_MATCH = OPS_TYPE_SEARCH * 100, /** 搜索到指定特征 **/ NOTIFY_SEARCH_NO_MATCH, /** 未搜索到指定特征 **/ NOTIFY_SEARCH_ERROR, /** 搜索过程中遇到错误 **/ NOTIFY_SEARCH_STOP_BY_USER, /** 搜索被用户中断 **/ NOTIFY_SEARCH_TIMEOUT, /** 操作超时 **/ NOTIFY_SEARCH_MAX, NOTIFY_CLEAN_SUCCESS = OPS_TYPE_CLEAN * 100, /** 清理特征成功 **/ NOTIFY_CLEAN_FAIL, /** 清理失败 **/ NOTIFY_CLEAN_ERROR, /** 清理过程中遇到错误 **/ NOTIFY_CLEAN_STOP_BY_USER, /** 清理被用户中断 **/ NOTIFY_CLEAN_TIMEOUT, /** 操作超时 **/ NOTIFY_CLEAN_MAX, NOTIFY_GET_FLIST_SUCCESS = OPS_TYPE_GET_FLIST * 100, /** 获取特征列表完成 **/ NOTIFY_GET_FLIST_FAIL, /** 获取特征列表失败 **/ NOTIFY_GET_FLIST_ERROR, /** 获取特征列表过程中遇到错误 **/ NOTIFY_GET_FLIST_STOP_BY_USER, /** 获取特征列表被用户中断 **/ NOTIFY_GET_FLIST_TIMEOUT, /** 获取特征列表超时 **/ NOTIFY_GET_FLIST_MAX, NOTIFY_RENAME_SUCCESS = OPS_TYPE_RENAME * 100, /** 重命名特征完成 **/ NOTIFY_RENAME_FAIL, /** 重命名特征失败 **/ NOTIFY_RENAME_ERROR, /** 重命名特征过程中遇到错误 **/ NOTIFY_RENAME_INCOMPLETE, /** 重命名特征不完全 **/ NOTIFY_CLOSE_SUCCESS = OPS_TYPE_CLOSE * 100, /** 关闭设备完成 **/ NOTIFY_CLOSE_FAIL, /** 关闭设备失败 **/ NOTIFY_CLOSE_ERROR, /** 关闭设备过程中遇到错误 **/ NOTIFY_CLOSE_MAX, }NotifyMID; //typedef enum { // ENROLL_PROCESS_START = OPS_TYPE_ENROLL_PROCESS, /** 未按压手指,即录入阶段为0% **/ // ENROLL_PROCESS_ONE, /** 第一次按压手指,即录入阶段为20% **/ // ENROLL_PROCESS_TWO, /** 第二次按压手指,即录入阶段为40% **/ // ENROLL_PROCESS_THREE, /** 第三次按压手指,即录入阶段为60% **/ // ENROLL_PROCESS_FOUR, /** 第四次按压手指,即录入阶段为80% **/ // ENROLL_PROCESS_FIVE, /** 第五次按压手指,即录入阶段为100% **/ // ENROLL_PROCESS_MAX, //}EnrollProcess; /* 定义状态类型,用于通知服务层设备状态的改变 */ typedef enum { STATUS_TYPE_DEVICE = 0, STATUS_TYPE_OPERATION, STATUS_TYPE_NOTIFY }StatusType; /* * 生物特征识别框架核心结构体,用于记录驱动与设备相关信息 * 正常情况下,一台机器上同一型号设备只会接入一台,所以框架将驱动与设备简化成一个结构体 */ typedef struct bio_dev_t bio_dev; struct bio_dev_t { // 设备、驱动基本信息 int driver_id; /** 驱动ID **/ char *device_name; /** 设备名 **/ char *full_name; /** 设备全称 **/ api_version drv_api_version; int enable; /** 设备是否被禁用 **/ int dev_num; /** 设备数量 **/ struct BioInfo bioinfo; /** 设备的相关类型 **/ // 总线信息 struct Serial_Info serial_info; struct USB_INFO usb_info; struct PCI_INFO pci_info; // 设备、驱动私有信息 void *dev_priv; /** 设备驱动私有结构体 **/ void *bio_priv; /** 各生物信息私有结构体 **/ // 边界值 int max_user; int max_sample; int sample_times; /* * 记录设备的状态信息: * * DevStatus dev_status 用于记录设备当前状态:“使用中”或者“空闲” * OpsResult ops_result 用于记录对设备操作的结果 * 注意:各个设备操作函数的返回值只是操作结果的辅助信息,最终的 * 结果判断是依据ops_result的值来确定的。 * NotifyMID notify_mid 用于人机交互,记录需要展示给用户看的消息的ID */ volatile DevStatus dev_status; /** 设备状态 **/ volatile OpsResult ops_result; /** 操作结果 **/ volatile NotifyMID notify_mid; /** 给用户的消息ID **/ // 指向驱动的句柄,由框架使用,驱动请勿修改该值 void * plugin_handle; /* 以下函数指针定义了对驱动或设备的操作集合 */ /* 驱动初始化及资源回收函数 */ /* * 驱动配置 * 为驱动设置相关属性,并设置各种操作的回调函数 * * @param[in] dev 驱动和设备的结构体 * @param[in] conf 框架配置文件 * @return 配置结果,成功返回0,失败返回负值 */ int (*ops_configure)(bio_dev *dev, GKeyFile * conf); /* * 驱动初始化 * 对驱动进行初始化,所有驱动初始化相关操作都放入本函数中处理。例如公共存储空间的分配、 * 系统环境探测、驱动全局变量的初始化等驱动相关的操作放入本函数中实现。 * * @param[in] dev 驱动和设备的结构体 * @return 初始化结果,成功返回0,失败返回负值 */ int (*ops_driver_init)(bio_dev *dev); /* * 驱动资源回收 * 对驱动配置(ops_configure)、初始化(ops_driver_init)过程中申请的资源进行释放 * * @param[in] dev 驱动和设备的结构体 * @return 无 * @attention 资源回收函数无返回值,如若碰到资源释放失败的异常或错误,需要将相关错误 * 信息使用"bio_print_error"函数输出 */ void (*ops_free)(bio_dev *dev); /* * 设备发现 * 检测系统环境中接入驱动支持的设备数量 * * @param[in] dev 驱动和设备的结构体 * @return 探测到的设备数量。如果过程中遇到错误,则返回负值 */ int (*ops_discover)(bio_dev *dev); /* 设备初始化及资源回收函数 */ /* * 设备打开函数,用于初始化设备 * * @param[in] dev 驱动和设备的结构体 * @return 操作结果,成功返回0,失败返回负值 * @attention 在前端每次调用设备进行捕获、录入、认证、识别等操作后都会执行一次 */ int (*ops_open)(bio_dev *dev); /* * 设备关闭函数,用于关闭硬件及释放ops_open函数申请的资源 * * @param[in] dev 驱动和设备的结构体 * @return 操作结果,成功返回0,失败返回负值 * @attention 在前端每次调用设备进行捕获、录入、认证、识别等操作后都会执行一次 */ void (*ops_close)(bio_dev *dev); /* 设备功能性操作 */ /* * 特征捕获函数,用来捕获生物特征信息 * * @param[in] dev 驱动和设备的结构体 * @param[in] action 属于老旧接口中的参数,现已弃用。 * 为了保持API的兼容性,暂时保留该形参。 * @return 操作结果,成功返回0,失败返回负值 */ char * (*ops_capture)(bio_dev *dev, OpsActions action); /* * 特征录入函数,用来录入用户的生物特征信息 * * @param[in] dev 驱动和设备的结构体 * @param[in] action 属于老旧接口中的参数,现已弃用。 * 为了保持API的兼容性,暂时保留该形参。 * @param[in] uid 特征的用户ID * @param[in] idx 特征的索引值(每个用户的索引值单独从0开始) * @param[in] bio_idx_name 特征的名称 * @return 操作结果,成功返回0,失败返回负值 */ int (*ops_enroll)(bio_dev *dev, OpsActions action, int uid, int idx, char * bio_idx_name); /* * 特征验证函数,使用当前生物特征与指定特征对比,判断是否是同一个特征 * * @param[in] dev 驱动和设备的结构体 * @param[in] action 属于老旧接口中的参数,现已弃用。 * 为了保持API的兼容性,暂时保留该形参。 * @param[in] uid 特征的用户ID * @param[in] idx 特征的索引值(每个用户的索引值单独从0开始) * @return 返回操作结果,>=0为操作未出错,<0为操作过程中出错 * @attention 是否验证匹配,框架通过获取设备的ops_result值来判断。ops_result值 * 为OPS_VERIFY_MATCH则匹配,值为OPS_VERIFY_NO_MATCH代表不匹配,其 * 他值代表验证过程中出现的错误。 */ int (*ops_verify)(bio_dev *dev, OpsActions action, int uid, int idx); /* * 特征识别函数,使用当前生物特征与指定范围的特征比对,识别出当前特征与指定范围内的哪个特征匹配 * * @param[in] dev 驱动和设备的结构体 * @param[in] action 属于老旧接口中的参数,现已弃用。 * 为了保持API的兼容性,暂时保留该形参。 * @param[in] uid 特征的用户ID * @param[in] idx_start 特征索引最小值 * @param[in] idx_end 特征索引最大值 * @return 返回操作结果,>=0匹配特征的用户ID,<0为识别操作失败或未找到匹配的特征 * @attention 是否识别到特征,框架通过获取设备的ops_result值来判断。ops_result值 * 为OPS_IDENTIFY_MATCH则识别到,值为OPS_IDENTIFY_NO_MATCH代表未识 * 别到,其他值代表识别过程中出现的错误。 */ int (*ops_identify)(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end); /* * 特征搜索函数,使用当前生物特征与指定范围的特征比对,搜索出指定范围内所有匹配的特征 * * @param[in] dev 驱动和设备的结构体 * @param[in] action 属于老旧接口中的参数,现已弃用。 * 为了保持API的兼容性,暂时保留该形参。 * @param[in] uid 特征的用户ID * @param[in] idx_start 特征索引最小值 * @param[in] idx_end 特征索引最大值 * @return 特征信息列表,包含指定范围内所有匹配的特征信息 * @attention 是否搜索到特征,框架通过获取设备的ops_result值来判断。ops_result值 * 为OPS_SEARCH_MATCH则搜索到,值为OPS_SEARCH_NO_MATCH代表未搜索到, * 其他值代表搜索过程中出现的错误。 */ feature_info * (*ops_search)(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end); /* * 特征清理(删除)函数,删除指定范围内的所有特征 * * @param[in] dev 驱动和设备的结构体 * @param[in] action 属于老旧接口中的参数,现已弃用。 * 为了保持API的兼容性,暂时保留该形参。 * @param[in] uid 特征的用户ID * @param[in] idx_start 特征索引最小值 * @param[in] idx_end 特征索引最大值 * @return 操作结果,成功返回0,失败返回负值 */ int (*ops_clean)(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end); /* * 获取指定设备的特征列表 * * @param[in] dev 驱动和设备的结构体 * @param[in] action 属于老旧接口中的参数,现已弃用。 * 为了保持API的兼容性,暂时保留该形参。 * @param[in] uid 特征的用户ID * @param[in] idx_start 特征索引最小值 * @param[in] idx_end 特征索引最大值 * @return 特征信息列表,包含指定范围内所有匹配的特征信息 */ feature_info * (*ops_get_feature_list)(bio_dev *dev, OpsActions action, int uid, int idx_start, int idx_end); /* * 重命名指定特征 * * @param[in] dev 驱动和设备的结构体 * @param[in] uid 特征的用户ID * @param[in] idx 特征的索引 * @param[in] new_name 特征的新名称 * @return 操作结果,成功返回0,失败返回负值 */ int (*ops_feature_rename)(bio_dev *dev, int uid, int idx, char * new_name); /* * 中断设备的当前操作 * 由于生物特征识别是一个人机交互过程,所以在此期间内用户有可能随时取消操作。 * 在用户取消操作的时,本接口会被调用,驱动需要在本接口中实现终止设备当前操作的功能。 * @param[in] dev 驱动和设备的结构体 * @param[in] waiting_ms 终止操作的等待时间,单位毫秒。 * @return 返回终止操作是否成功,0终止成功,<0终止失败 * @attention 终止操作不能无限期等待,在超过waiting_ms毫秒后,需返回“终止失败”。 */ int (*ops_stop_by_user)(bio_dev *dev, int waiting_ms); /* * 状态变更的回调函数 * 该函数在每一次通过框架提供的API修改dev_status、ops_result、notify_mid三个变量 * 的时候调用,驱动可以不用实现本函数。 * * @param[in] drvid 驱动的ID * @param[in] type 变更状态的类型,类型定义参见"StatusType" * @return 无 */ void (*ops_status_changed_callback)(int drvid, int type); /* * 获取设备状态的文本消息 * 将dev_status状态码转换成状态提示字符串。 * * @param[in] dev 驱动和设备的结构体 * @return 设备状态的文本消息 * @attention 该函数只需匹配自定义的状态码,由框架定义的状态码框架会自行转换。 * 因此遇到非自定义的状态码,直接返回NULL即可。 */ const char * (*ops_get_dev_status_mesg)(bio_dev *dev); /* * 获取操作结果的文本消息 * 将ops_result操作结果码转换成操作结果提示字符串。 * * @param[in] dev 驱动和设备的结构体 * @return 操作结果的文本消息 * @attention 该函数只需匹配自定义的结果码,由框架定义的结果码框架会自行转换。 * 因此遇到非自定义的结果码,直接返回NULL即可。 */ const char * (*ops_get_ops_result_mesg)(bio_dev *dev); /* * 获取面向用户的提示消息 * 将notify_mid消息ID转换提示字符串。 * * @param[in] dev 驱动和设备的结构体 * @return 面向用户的提示信息 * @attention 该函数只需匹配自定义的消息ID,由框架定义的消息ID框架会自行转换。 * 因此遇到非自定义的消息ID,直接返回NULL即可。 */ const char * (*ops_get_notify_mid_mesg)(bio_dev *dev); /* * 框架支持的设备插入时的回调函数 * 对于USB设备,设备插入且框架检测到是驱动支持的设备型号时调用。如果设备插拔不需要额外 * 的操作,该函数接口可以置为NULL。 * @param[in] dev 驱动和设备的结构体 * @return 无 */ void (*ops_attach)(bio_dev *dev); /* * 框架支持的设备拔出时的回调函数 * 对于USB设备,设备拔出且框架检测到是驱动支持的设备型号时调用。如果设备插拔不需要额外 * 的操作,该函数接口可以置为NULL。 * @param[in] dev 驱动和设备的结构体 * @return 无 */ void (*ops_detach)(bio_dev *dev); }; /* 定义状态改变时回调函数的函数指针 */ typedef void (*BIO_STATUS_CHANGED_CALLBACK)(int drvid, int type); /* 定义USB热插拔时回调函数的函数指针 */ typedef void (*BIO_USB_DEVICE_HOT_PLUG_CALLBACK)(int drvid, int action, int dev_num_now); /* * 设置框架通用的操作超时时间,单位:毫秒 * * @param[in] t 超时时间 */ void bio_set_ops_timeout_ms(int t); /* * 获取框架通用的操作超时时间,单位:毫秒 * * @return int 超时时间 */ int bio_get_ops_timeout_ms(); /* * 释放驱动链表 * 释放由bio_driver_list_init()函数创建的设备结构体,包含链表的数据域资源 * @param[in] GList* drv_list 设备结构体链表 */ void bio_free_driver(GList * drv_list); /* * 释放设备链表 * 释放由bio_device_list_init()函数创建的设备结构体,不包含链表的数据域资源 * @param[in] GList* dev_list 设备结构体链表 */ void bio_free_device(GList * dev_list); /* 捕获特征 */ char * bio_ops_capture(bio_dev *dev); /* 录入特征 */ int bio_ops_enroll(bio_dev *dev, int uid, int idx, char * idx_name); /* 验证特征 */ int bio_ops_verify(bio_dev *dev, int uid, int idx); /* 识别特征 */ int bio_ops_identify(bio_dev *dev, int uid, int idx_start, int idx_end); /* 搜索特征 */ feature_info * bio_ops_search(bio_dev *dev, int uid, int idx_start, int idx_end); /* 清理(删除)特征 */ int bio_ops_clean(bio_dev *dev, int uid, int idx_start, int idx_end); /* 获取特征列表 */ feature_info * bio_ops_get_feature_list(bio_dev *dev, int uid, int idx_start, int idx_end); /* 重命名特征 */ int bio_ops_feature_rename(bio_dev *dev, int uid, int idx, char * new_name); /* 终止当操作 */ int bio_ops_stop_ops(bio_dev *dev, int waiting_sec); /* * 驱动是否被启用 * * @param[in] dev 设备结构体 * @param[in] conf 配置文件 * @return 驱动是否被启用 * @retval TRUE 启用 * FALSE 禁用 */ int bio_dev_is_enable(bio_dev * dev, GKeyFile * conf); /* * 设置串口的设备节点路径 * 形如:/dev/ttyXXX * * @param[in] dev 设备结构体 * @param[in] conf 配置文件 * @return 设置是否成功,成功返回0,出错或不成返回负数 */ int bio_dev_set_serial_path(bio_dev * dev, GKeyFile * conf); /* 判断操作是否被用户终止 */ bool bio_is_stop_by_user(bio_dev * dev); /* * Base64编码 * 将二进制数据以Base64编码方式编码 * * @param[in] bin_data 二进制数据 * @param[in] base64 base64编码后,数据存放位置 * @param[in] bin_len 二进制数据长度 * @return Base64编码后,数据长度 */ int bio_base64_encode(unsigned char * bin_data, char * base64, int bin_len ); /* * Base64解码 * 将以Base64编码方式编码的数据解码为二进制数据 * @param[in] base64 base64编码数据缓冲区 * @param[in] bin_data base64解码后,二进制数据存放位置 * @return Base64解码后,二进制数据长度 */ int bio_base64_decode(char * base64, unsigned char * bin_data); /* * 获取、设置设备状态 * * bio_get_dev_status 获取设备状态 * bio_set_dev_status 设置设备状态(相对值),该函数会根据当前设备状态(dev_status)来修 * 正输入值。 * 例如,设备正在录入(enroll),设置的状态为"DEVS_COMM_STOP_BY_USER", * 最终的状态为"DEVS_ENROLL_STOP_BY_USER" * bio_set_dev_abs_status 设置设备状态(绝对值),该函数会不会修正输入值。 * 例如,设备正在录入(enroll),设置的状态为"DEVS_COMM_STOP_BY_USER", * 最终的状态为"DEVS_COMM_STOP_BY_USER" */ int bio_get_dev_status(bio_dev * dev); void bio_set_dev_status(bio_dev * dev, int status); void bio_set_dev_abs_status(bio_dev * dev, int status); /* * 获取、设置操作结果 * * bio_get_ops_result 获取操作结果 * bio_set_ops_result 设置操作结果(相对值),该函数会根据当前设备状态(dev_status)来修 * 正输入值。 * 例如,设备正在录入(enroll),设置的操作结果为"OPS_COMM_ERROR", * 最终的操作结果为"OPS_ENROLL_ERROR" * bio_set_ops_abs_result 设置操作结果(绝对值),该函数会不会修正输入值。 * 例如,设备正在录入(enroll),设置的操作结果为"OPS_COMM_ERROR", * 最终的操作结果为"OPS_COMM_ERROR" */ int bio_get_ops_result(bio_dev * dev); void bio_set_ops_result(bio_dev * dev, int result); void bio_set_ops_abs_result(bio_dev * dev, int result); /* * 获取、设置提示消息ID * * bio_get_notify_mid 获取提示消息ID * bio_set_notify_mid 设置提示消息ID(相对值),该函数会根据当前设备状态(dev_status)来修 * 正输入值。 * 例如,设备正在录入(enroll),设置的提示消息ID为"NOTIFY_COMM_TIMEOUT", * 最终的提示消息ID为"NOTIFY_ENROLL_TIMEOUT" * bio_set_notify_abs_mid 设置提示消息ID(绝对值),该函数会不会修正输入值。 * 例如,设备正在录入(enroll),设置的提示消息ID为"NOTIFY_COMM_TIMEOUT", * 最终的提示消息ID为"NOTIFY_COMM_TIMEOUT" */ int bio_get_notify_mid(bio_dev * dev); void bio_set_notify_mid(bio_dev * dev, int status); void bio_set_notify_abs_mid(bio_dev * dev, int status); /* 一次性设置设备状态、操作结果、提示消息ID(相对值) */ void bio_set_all_status(bio_dev * dev, int dev_status, int ops_result, int notify_mid); /* 一次性设置设备状态、操作结果、提示消息ID(绝对值) */ void bio_set_all_abs_status(bio_dev * dev, int dev_status, int ops_result, int notify_mid); /* 获取设备状态的文本消息 */ const char * bio_get_dev_status_mesg(bio_dev *dev); /* 获取操作结果的文本消息 */ const char * bio_get_ops_result_mesg(bio_dev *dev); /* 获取面向用户的提示消息 */ const char * bio_get_notify_mid_mesg(bio_dev *dev); /* 获取空闲的Driver ID */ int bio_get_empty_driver_id(); /* * 获取当前的驱动链表 * @return GList * */ GList * bio_get_drv_list(void); /* * 获取当前的设备链表 * @return GList * */ GList * bio_get_dev_list(void); /* 打印驱动列表 */ void bio_print_drv_list(int print_level); /* 打印设备列表 */ void bio_print_dev_list(int print_level); /* 释放驱动链表及其指向的资源 */ void bio_free_drv_list(void); /* 释放设备链表及其指向的资源 */ void bio_free_dev_list(void); char * bio_new_string(char * old_str); /* * 查询空闲索引号 * 在数据库中查询指定用户指定范围的空闲索引号 * @param[in] dev 设备结构体 * @param[in] uid 用户ID * @param[in] start 开始的索引值 * @param[in] end 结束的索引值,-1代表不限大小 * @return 空闲的索引号,-1代表指定范围索引全被占用 */ int bio_common_get_empty_index(bio_dev *dev, int uid, int start, int end); /* 数据库中查询空闲采样编号 */ int bio_common_get_empty_sample_no(bio_dev *dev, int start, int end); /* 通用的USB设备探测方式 */ int bio_common_detect_usb_device(bio_dev *dev); /* 通用的信息输出函数 */ int bio_vprint_by_level(int print_level, FILE * __restrict stream, const char * __restrict format, va_list args); int bio_print_by_level(int print_level, FILE * stream, char * format, ...); int bio_print_debug(const char *format, ...); int bio_print_info(const char * format, ...); int bio_print_notice(const char * format, ...); int bio_print_warning(const char *format, ...); int bio_print_error(const char * format, ...); typedef void (*BIO_STATUS_CHANGED_CALLBACK)(int drvid, int type); typedef void (*BIO_USB_DEVICE_HOT_PLUG_CALLBACK)(int drvid, int action, int dev_num_now); /* * 打开及初始化生物识别框架 * * @return int 返回初始化结果 * @retval 0 成功 * 其他 失败 */ int bio_init(void); /* * 关闭生物识别框架,释放资源 * * @return int 返回初始化结果 * @retval 0 成功 * 其他 失败 */ int bio_close(void); /* * 初始化驱动链表 * @return 返回初始化后的驱动链表 */ GList * bio_driver_list_init(void); /* * 初始化设备列表 * 搜索系统中支持生物识别的设备,构建设备链表 * * @return GList* GList链表,data指针指向bio_dev结构体 * @note 设备链表的data指针与驱动链表的data指针指向同一个bio_dev结构体,设备链表只 * 记录当前有驱动并且已连接的设备 */ GList * bio_device_list_init(GList *); /* 声明全局变量 */ extern GList * bio_drv_list; extern GList * bio_dev_list; extern BIO_STATUS_CHANGED_CALLBACK bio_status_changed_callback; extern BIO_USB_DEVICE_HOT_PLUG_CALLBACK bio_usb_device_hot_plug_callback; #ifdef __cplusplus } #endif #endif // BIOMETRIC_COMM_H biometric-authentication/src/lib/biometric_config.h0000644000175000017500000000331513517470404021507 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef CONFIG_H #define CONFIG_H #include #include #ifdef __cplusplus extern "C" { #endif #define _STR(s) #s #define DEF2STR(s) _STR(s) #ifdef BIO_CONFIG_DIR #define CONFIG_DIR DEF2STR(BIO_CONFIG_DIR) #else #define CONFIG_DIR "/etc/biometric-auth" #endif #define DRIVERS_CONFIG_FILE CONFIG_DIR "/biometric-drivers.conf" /* * 初始化配置(仅由框架内部调用) * 加载配置文件,并初始化全局配置结构体 * * @return 返回初始化结果 * @retval 0 成功 * 其他 失败 */ int bio_conf_init(); /* * 释放配置相关资源(仅由框架内部调用) * * @return 无 */ void bio_conf_free(); /* * 获取配置文件 * * @return 返回配置文件结构体 */ GKeyFile * get_bio_conf(); /* 全局配置文件声明 */ extern GKeyFile * bioconf; #ifdef __cplusplus } #endif #endif // CONFIG_H biometric-authentication/src/lib/libbiometric.pc.in0000644000175000017500000000043313517470404021427 0ustar fengfengprefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libbiometric Description: UKUI Biometric Identification DRIVER API - development files Version: @VERSION@ Libs: -L${libdir} -lbiometric Libs.private: @LIBS@ Cflags: -I${includedir}/libbiometric biometric-authentication/src/lib/biometric_storage.c0000644000175000017500000007355513755706021021717 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "biometric_common.h" #include "biometric_intl.h" #include "biometric_storage.h" const unsigned char kFirstBitMask = 128;// 1000000 const unsigned char kSecondBitMask = 64;// 0100000 const unsigned char kThirdBitMask = 32; // 0010000 const unsigned char kFourthBitMask = 16;// 0001000 const unsigned char kFifthBitMask = 8; // 0000100 // UUID_BUF_LEN = 32(UUID_LEN) + 4(Symbol '-') + 1(terminator '\0') = 37 #define UUID_BUF_LEN 37 #define UUID_DEFAULT "01234567-0123-0123-0123-0123456789AB" /****************** 内部函数声明 ******************/ int internal_utf8_char_len(char firstByte); int internal_utf8_str_len(char *str); int internal_utf8_str_width(char *str); char * internal_newstr(char * old_str); int internal_create_dir(const char *new_dir); void internal_get_uuid_by_uid(int uid, char * uuid); int internal_upgrade_db_format_from_null(sqlite3 *db); int internal_create_eigen_info_table(sqlite3 *db); int internal_create_datebase_info(sqlite3 *db); int bio_sto_create_table(sqlite3 *db); /****************** 外部函数实现 ******************/ char * bio_sto_new_str(char * old_str) { return internal_newstr(old_str); } /* 输出特征信息结构体 */ void print_feature_info(feature_info * info_list) { int uid = 0; int olduid = -1; int biotype = 0; int oldbiotype = -1; char * driver = NULL; char * olddriver = NULL; int idx = 0; int oldidx = -1; int ustr_l = 0; int bstr_l = 0; int dstr_l = 0; int istr_l = 0; #define SL 1024 char ustr[SL]; char bstr[SL]; char dstr[SL]; char istr[SL]; feature_info * info = NULL; feature_sample *sample = NULL; if (info_list == NULL) return ; info = info_list; sample = info->sample; while(info != NULL){ uid = info->uid; biotype = info->biotype; driver = info->driver; idx = info->index; if (olduid != uid) { olduid = uid; oldbiotype = -1; olddriver = NULL; oldidx = -1; sprintf(ustr, "U:%04d,", uid); ustr_l = internal_utf8_str_width(ustr); } else { memset(ustr, ' ', SL); ustr[ustr_l] = '\0'; } if (oldbiotype != biotype) { oldbiotype = biotype; olddriver = NULL; oldidx = -1; sprintf(bstr, "B:%02d,", biotype); bstr_l = internal_utf8_str_width(bstr); } else { memset(bstr, ' ', SL); bstr[bstr_l] = '\0'; } if ( (olddriver == NULL) || strcmp(olddriver, driver) != 0) { olddriver = driver; oldidx = -1; sprintf(dstr, "D:%s,", olddriver); dstr_l = internal_utf8_str_width(dstr); } else { memset(dstr, ' ', SL); dstr[dstr_l] = '\0'; } if (oldidx != idx) { oldidx = idx; sprintf(istr, "I:%04d(%s),", idx, info->index_name); istr_l = internal_utf8_str_width(istr); } else { memset(istr, ' ', SL); istr[istr_l] = '\0'; } bio_print_debug("%s %s %s %s S:%04d, D:%.16s\n", ustr, bstr, dstr, istr, sample->no, sample->data); sample = sample->next; if (sample == NULL){ info = info->next; if (info != NULL) sample = info->sample; } } #undef SL } sqlite3 *bio_sto_connect_db() { sqlite3 *db = NULL; int ret = -1; bool need_create = false; ret = access(DB_PATH, F_OK); if (ret != 0) { need_create = true; ret = access(DB_DIR, F_OK); if (ret != 0) { internal_create_dir(DB_DIR); } /* 创建数据库 */ ret = sqlite3_open_v2(DB_PATH, &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); if (ret != SQLITE_OK) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); return NULL; } sqlite3_close_v2(db); /* 设置默认权限:0600(只允许root用户读写) */ ret = chmod(DB_PATH, S_IRUSR | S_IWUSR); if (ret != 0) bio_print_error(_("Unable to set database(%s) permissions. ERROR" "[%d]: %s\n"), DB_PATH, errno, strerror(errno)); } ret = sqlite3_open_v2(DB_PATH, &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); if (ret != SQLITE_OK) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); return NULL; } if (need_create) { ret = bio_sto_create_table(db); if (ret != 0) { sqlite3_close_v2(db); return NULL; } } return db; } void bio_sto_disconnect_db(sqlite3 *db) { sqlite3_close_v2(db); } feature_sample * bio_sto_new_feature_sample(int no, char * data) { feature_sample * new_sample = malloc(sizeof(feature_sample)); if (new_sample == NULL) { bio_print_error(_("Unable to allocate memory\n")); } else { new_sample->no = no; if (data == NULL) new_sample->data = NULL; else new_sample->data = internal_newstr(data); new_sample->next = NULL; } return new_sample; } void bio_sto_free_feature_sample(feature_sample * sample) { if (sample != NULL) { if (sample->data != NULL) free(sample->data); free(sample); } } void bio_sto_free_feature_sample_list(feature_sample * sample_list) { feature_sample * sample; while (sample_list != NULL) { sample = sample_list; sample_list = sample_list->next; bio_sto_free_feature_sample(sample); } } feature_info * bio_sto_new_feature_info(int uid, int biotype, char *driver, int index, char *index_name) { feature_info * info = NULL; info = malloc(sizeof(feature_info)); if (info == NULL) goto FREE_INFO; memset(info, 0, sizeof(feature_info)); if (driver == NULL) info->driver = NULL; else info->driver = internal_newstr(driver); if (info->driver == NULL) goto FREE_DRIVER; if (index_name == NULL) info->index_name = NULL; else info->index_name = internal_newstr(index_name); if (info->index_name == NULL) goto FREE_INDEX_NAME; info->uid = uid; info->biotype = biotype; info->index = index; info->sample = NULL; info->next = NULL; return info; FREE_INDEX_NAME: free(info->driver); FREE_DRIVER: free(info); FREE_INFO: bio_print_error(_("Unable to allocate memory\n")); return NULL; } void bio_sto_free_feature_info(feature_info * info) { if (info != NULL) { if (info->driver != NULL) free(info->driver); if (info->index_name != NULL) free(info->index_name); bio_sto_free_feature_sample_list(info->sample); free(info); } } void bio_sto_free_feature_info_list(feature_info * info_list) { feature_info * info; while (info_list != NULL) { info = info_list; info_list = info_list->next; bio_sto_free_feature_info(info); } } feature_info *bio_sto_get_feature_info(sqlite3 *db, int uid, int biotype, char *driver, int index_start, int index_end) { feature_info *info_list = NULL; feature_info *info = NULL; feature_sample *sample = NULL; sqlite3_stmt *stmt = NULL; char uuid[UUID_BUF_LEN] = {0}; char user_uuid[UUID_BUF_LEN] = {0}; int ret = -1; int l = 0; char old_uuid[UUID_BUF_LEN] = {0}; int old_uid = -1; int old_bio_type = -1; char *old_driver = NULL; int idx = -1; int old_idx = -1; char *base_sql_str = "SELECT ID, UID, UUID, BioType, Driver, EigenIndex, " " EigenIndexName, SampleNo, EigenData " "FROM EIGEN_INFO " "WHERE EigenIndex >= :index_start"; char *uid_sql_str = " AND UID = :uid "; char *biotype_sql_str = " AND BioType = :biotype "; char *driver_sql_str = " AND Driver = :driver "; char *idx_end_sql_str = " AND EigenIndex <= :index_end "; char *order_sql_str = " ORDER BY UID, UUID, BioType, Driver, EigenIndex, " "EigenIndexName, SampleNo "; char *all_sql_str = NULL; l = strlen(base_sql_str) + strlen(uid_sql_str) + strlen(biotype_sql_str) + strlen(driver_sql_str) + strlen(idx_end_sql_str) + strlen(order_sql_str) + 1; all_sql_str = malloc(l); if (all_sql_str == NULL) { bio_print_error(_("Unable to allocate memory\n")); return NULL; } memset(all_sql_str, 0, l); l = sprintf(all_sql_str, "%s", base_sql_str); if (uid != -1) l += sprintf(all_sql_str + l, "%s", uid_sql_str); if (biotype != -1) l += sprintf(all_sql_str + l, "%s", biotype_sql_str); if (driver != NULL) l += sprintf(all_sql_str + l, "%s", driver_sql_str); if (index_end != -1) l += sprintf(all_sql_str + l, "%s", idx_end_sql_str); l += sprintf(all_sql_str + l, "%s", order_sql_str); bio_print_debug("get sql : %s\n", all_sql_str); ret = sqlite3_prepare_v2(db, all_sql_str, -1, &stmt, NULL); free(all_sql_str); if (ret != SQLITE_OK) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); return NULL; } idx = sqlite3_bind_parameter_index(stmt, ":uid"); sqlite3_bind_int64(stmt, idx, uid); idx = sqlite3_bind_parameter_index(stmt, ":biotype"); sqlite3_bind_int64(stmt, idx, biotype); idx = sqlite3_bind_parameter_index(stmt, ":driver"); sqlite3_bind_text(stmt, idx, driver, -1, SQLITE_TRANSIENT); idx = sqlite3_bind_parameter_index(stmt, ":index_start"); sqlite3_bind_int64(stmt, idx, index_start); idx = sqlite3_bind_parameter_index(stmt, ":index_end"); sqlite3_bind_int64(stmt, idx, index_end); /* 为了之后处理方便,创建表头空白项 */ info_list = malloc(sizeof(feature_info)); if (info_list == NULL) { bio_print_error(_("Unable to allocate memory\n")); sqlite3_finalize(stmt); return NULL; } memset(info_list, 0, sizeof(feature_info)); info = info_list; while( sqlite3_step(stmt) == SQLITE_ROW ) { uid = sqlite3_column_int(stmt, 1); strncpy(uuid, (char *)sqlite3_column_text(stmt, 2), UUID_BUF_LEN); biotype = sqlite3_column_int(stmt, 3); driver = (char *)sqlite3_column_text(stmt, 4); idx = sqlite3_column_int(stmt, 5); /* 条件判断成功,代表uid、biotype、driver或index任意一个值有变化, * 需要新建表项存储 */ if ( (old_uid < uid) || (old_bio_type < biotype) || (strcmp(old_driver, driver) != 0) || (old_idx < idx) || (strcmp(old_uuid, uuid) != 0) ) { if (old_uid != uid) { // UID变化,UUID也需要跟着变化 internal_get_uuid_by_uid(uid, user_uuid); old_uid = uid; } // 检测数据库中的UUID是否与当前UID的UUID匹配,不匹配则弃用该条记录 if (strcmp(uuid, user_uuid) != 0) { continue; } old_uid = uid; old_bio_type = biotype; old_driver = internal_newstr(driver); old_idx = idx; strncpy(old_uuid, uuid, UUID_BUF_LEN); info->next = malloc(sizeof(feature_info)); info = info->next; if (info == NULL) { /* malloc失败,释放资源 */ bio_sto_free_feature_info_list(info_list); return NULL; } memset(info, 0, sizeof(feature_info)); info->uid = uid; info->biotype = biotype; info->driver = old_driver; info->index = idx; info->index_name = internal_newstr((char *)sqlite3_column_text(stmt, 6)); sample = malloc(sizeof(feature_sample)); if (sample == NULL) { bio_sto_free_feature_info_list(info_list); return NULL; } memset(sample, 0, sizeof(feature_sample)); info->sample = sample; } else { /* 检测数据库中的UUID是否与当前UID的UUID匹配 */ if (strcmp(uuid, user_uuid) != 0) { continue; } sample->next = malloc(sizeof(feature_sample)); sample = sample->next; if (sample == NULL) { bio_sto_free_feature_info_list(info_list); return NULL; } memset(sample, 0, sizeof(feature_sample)); } sample->dbid = sqlite3_column_int64(stmt, 0); sample->no = sqlite3_column_int(stmt, 7); sample->data = internal_newstr((char *)sqlite3_column_text(stmt, 8)); } /* 移除表头空白项 */ info = info_list->next; free(info_list); info_list = info; sqlite3_finalize(stmt); return info_list; } int bio_sto_set_feature_info(sqlite3 *db, feature_info * info_list) { feature_info *info = NULL; feature_sample *sample = NULL; sqlite3_stmt *stmt = NULL; char uuid[UUID_BUF_LEN] = {0}; int ret = -1; int idx = -1; int old_uid = -1; char *all_sql_str = "INSERT INTO [EIGEN_INFO] (ID, UID, UUID, BioType, Driver, " " EigenIndex, EigenIndexName, SampleNo, EigenData) " "VALUES (NULL, :uid, :uuid, :biotype, :driver, :idx, " " :idx_name, :sno, :sdata);"; ret = sqlite3_prepare_v2(db, all_sql_str, -1, &stmt, NULL); if (ret != SQLITE_OK) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); return -1; } info = info_list; if (info == NULL) return 0; sample = info->sample; while (info != NULL) { if (old_uid != info->uid) { old_uid = info->uid; internal_get_uuid_by_uid(info->uid, uuid); } idx = sqlite3_bind_parameter_index(stmt, ":uid"); sqlite3_bind_int64(stmt, idx, info->uid); idx = sqlite3_bind_parameter_index(stmt, ":uuid"); sqlite3_bind_text(stmt, idx, uuid, -1, SQLITE_TRANSIENT); idx = sqlite3_bind_parameter_index(stmt, ":biotype"); sqlite3_bind_int64(stmt, idx, info->biotype); idx = sqlite3_bind_parameter_index(stmt, ":driver"); sqlite3_bind_text(stmt, idx, info->driver, -1, SQLITE_TRANSIENT); idx = sqlite3_bind_parameter_index(stmt, ":idx"); sqlite3_bind_int64(stmt, idx, info->index); idx = sqlite3_bind_parameter_index(stmt, ":idx_name"); sqlite3_bind_text(stmt, idx, info->index_name, -1, SQLITE_TRANSIENT); idx = sqlite3_bind_parameter_index(stmt, ":sno"); sqlite3_bind_int64(stmt, idx, sample->no); idx = sqlite3_bind_parameter_index(stmt, ":sdata"); sqlite3_bind_text(stmt, idx, sample->data, -1, SQLITE_TRANSIENT); if (sqlite3_step(stmt) != SQLITE_DONE) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); sqlite3_finalize(stmt); return -2; } sqlite3_reset(stmt); sample = sample->next; if (sample == NULL){ info = info->next; if (info != NULL) sample = info->sample; } } sqlite3_finalize(stmt); return 0; } int bio_sto_clean_feature_info(sqlite3 *db, int uid, int biotype, char *driver, int index_start, int index_end) { sqlite3_stmt *stmt = NULL; int ret = -1; int idx = -1; int l = 0; char *base_sql_str = "DELETE FROM [EIGEN_INFO] WHERE " "EigenIndex >= :index_start"; char *uid_sql_str = " AND UID = :uid "; char *biotype_sql_str = " AND BioType = :biotype "; char *driver_sql_str = " AND Driver = :driver "; char *idx_end_sql_str = " AND EigenIndex <= :index_end "; char *all_sql_str = NULL; l = strlen(base_sql_str) + strlen(uid_sql_str) + strlen(biotype_sql_str) + strlen(driver_sql_str) + strlen(idx_end_sql_str) + 1; all_sql_str = malloc(l); if (all_sql_str == NULL) { bio_print_error(_("Unable to allocate memory\n")); return -1; } memset(all_sql_str, 0, l); l = sprintf(all_sql_str, "%s", base_sql_str); if (uid != -1) l += sprintf(all_sql_str + l, "%s", uid_sql_str); if (biotype != -1) l += sprintf(all_sql_str + l, "%s", biotype_sql_str); if (driver != NULL && driver[0] != '\0') l += sprintf(all_sql_str + l, "%s", driver_sql_str); if (index_end != -1) l += sprintf(all_sql_str + l, "%s", idx_end_sql_str); bio_print_debug("Clean sql : %s\n", all_sql_str); ret = sqlite3_prepare_v2(db, all_sql_str, -1, &stmt, NULL); free(all_sql_str); if (ret != SQLITE_OK) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); return -2; } idx = sqlite3_bind_parameter_index(stmt, ":uid"); sqlite3_bind_int64(stmt, idx, uid); idx = sqlite3_bind_parameter_index(stmt, ":biotype"); sqlite3_bind_int64(stmt, idx, biotype); idx = sqlite3_bind_parameter_index(stmt, ":driver"); sqlite3_bind_text(stmt, idx, driver, -1, SQLITE_TRANSIENT); idx = sqlite3_bind_parameter_index(stmt, ":index_start"); sqlite3_bind_int64(stmt, idx, index_start); idx = sqlite3_bind_parameter_index(stmt, ":index_end"); sqlite3_bind_int64(stmt, idx, index_end); if (sqlite3_step(stmt) != SQLITE_DONE) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); sqlite3_finalize(stmt); return -2; } sqlite3_finalize(stmt); return 0; } int bio_sto_update_feature_info_by_dbid(sqlite3 *db, unsigned long long dbid, int uid, int biotype, char *driver, int index, char * index_name, int sample_no) { sqlite3_stmt *stmt = NULL; int ret = -1; int idx = -1; char *all_sql_str = "UPDATE [EIGEN_INFO] SET UID = :uid, BioType = :biotype, " "Driver = :driver, EigenIndex = :index, " "EigenIndexName = :index_name, SampleNo = :sample_no " "WHERE ID = :dbid"; bio_print_debug("Update sql : %s\n", all_sql_str); ret = sqlite3_prepare_v2(db, all_sql_str, -1, &stmt, NULL); if (ret != SQLITE_OK) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); return -2; } idx = sqlite3_bind_parameter_index(stmt, ":uid"); sqlite3_bind_int64(stmt, idx, uid); idx = sqlite3_bind_parameter_index(stmt, ":biotype"); sqlite3_bind_int64(stmt, idx, biotype); idx = sqlite3_bind_parameter_index(stmt, ":driver"); sqlite3_bind_text(stmt, idx, driver, -1, SQLITE_TRANSIENT); idx = sqlite3_bind_parameter_index(stmt, ":index"); sqlite3_bind_int64(stmt, idx, index); idx = sqlite3_bind_parameter_index(stmt, ":index_name"); sqlite3_bind_text(stmt, idx, index_name, -1, SQLITE_TRANSIENT); idx = sqlite3_bind_parameter_index(stmt, ":sample_no"); sqlite3_bind_int64(stmt, idx, sample_no); idx = sqlite3_bind_parameter_index(stmt, ":dbid"); sqlite3_bind_int64(stmt, idx, dbid); if (sqlite3_step(stmt) != SQLITE_DONE) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); sqlite3_finalize(stmt); return -2; } sqlite3_finalize(stmt); return 0; } int bio_sto_check_and_upgrade_db_format(sqlite3 *db) { char sql_cmd[MAX_PATH_LEN] = {0}; char **dbResult = NULL; char *errmsg = NULL; sqlite3_stmt *stmt = NULL; int ret = 0; int nRow = 0; int nColumn = 0; int formatMajor = 0; int formatMinor = 0; int formatFunc = 0; bio_print_debug(_("Check database format version ...\n")); snprintf(sql_cmd, MAX_PATH_LEN, "SELECT name FROM sqlite_master WHERE type = 'table' AND name = '%s';", TABLE_DATABASE_FORMAT); ret = sqlite3_get_table(db, sql_cmd, &dbResult, &nRow, &nColumn, &errmsg); if (ret != SQLITE_OK) { bio_print_error(_("Find Table '%s' Error: %s\n"), TABLE_DATABASE_FORMAT, sqlite3_errmsg(db)); sqlite3_free(errmsg); sqlite3_free_table(dbResult); return -1; } sqlite3_free(errmsg); sqlite3_free_table(dbResult); if (nRow == 0) { formatMajor = 0; formatMinor = 0; formatFunc = 0; } else { snprintf(sql_cmd, MAX_PATH_LEN, "SELECT * FROM %s;", TABLE_DATABASE_FORMAT); ret = sqlite3_prepare_v2(db, sql_cmd, -1, &stmt, NULL); if (ret != SQLITE_OK) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); return -1; } if ( sqlite3_step(stmt) == SQLITE_ROW ) { formatMajor = sqlite3_column_int(stmt, 1); formatMinor = sqlite3_column_int(stmt, 2); formatFunc = sqlite3_column_int(stmt, 3); } sqlite3_finalize(stmt); } bio_print_notice(_("Database format version is %d.%d.%d\n"), formatMajor, formatMinor, formatFunc); if (formatMajor == 0 && formatMinor == 0 && formatFunc == 0) { ret = internal_upgrade_db_format_from_null(db); if (ret < 0) { bio_print_error(_("Failed to upgrade database format:version " "%d.%d.%d to %d.%d.%d\n"), formatMajor, formatMinor, formatFunc, DATABASE_FORMAT_MAJOR, DATABASE_FORMAT_MINOR, DATABASE_FORMAT_FUNC); return -2; } return 0; } if (formatMajor == 1 && formatMinor == 1 && formatFunc >= 0) { bio_print_notice(_("The database format is compatible with the " "current framework\n")); return 0; } bio_print_error(_("Incompatible version of the database format: %d.%d.%d. " "Version required for the current framework: %d.%d.x"), formatMajor, formatMinor, formatFunc, DATABASE_FORMAT_MAJOR, DATABASE_FORMAT_MINOR, DATABASE_FORMAT_FUNC); return -1; } /****************** 内部函数实现 ******************/ /* 获取UTF-8的字符宽度 */ int internal_utf8_char_len(char firstByte) { int offset = 1; if(firstByte & kFirstBitMask) { /* 第一个字节值超大于127,超出了ASCII码的范围 */ if(firstByte & kThirdBitMask) { /* 第一个字节大于224,字符长度至少为3字节 */ if(firstByte & kFourthBitMask) offset = 4; // 第一个字节大于240,字符长度为4字节 else offset = 3; } else { offset = 2; } } return offset; } /* 获取UTF-8字符串长度 */ int internal_utf8_str_len(char *str) { int len = 0; int l = 0; char *p = str; while (*p != '\0') { len ++; l = internal_utf8_char_len(*p); p = p + l; } return len; } /* 获取UTF-8字符串输出宽度 */ int internal_utf8_str_width(char *str) { int len = 0; int l = 0; char *p = str; while (*p != '\0') { len ++; l = internal_utf8_char_len(*p); /* 特殊字符占用两个字符宽度 */ if (l > 2) len ++; p = p + l; } return len; } /* 拷贝字符串 */ char * internal_newstr(char * old_str) { char * str = NULL; if (old_str == NULL) { str = malloc(1); if (str != NULL) *str = '\0'; } else { int l = strlen(old_str) + 1; str = malloc(l); if (str != NULL) strncpy(str, old_str, l); } return str; } /* 递归创建目录 */ int internal_create_dir(const char *new_dir) { int i = 0; int len = 0; char dir_name[256]; len = strlen(new_dir); strcpy(dir_name, new_dir); if (dir_name[len - 1] != '/') strcat(dir_name, "/"); len = strlen(dir_name); for(i = 1; i < len; i++) { if (dir_name[i] == '/') { dir_name[i] = 0; if (access(dir_name, F_OK) != 0) { if (mkdir(dir_name, 0755) == -1) { bio_print_error(_("Create Biometric Datebase Directory (%s)" " Error\n"), new_dir); return -1; } } dir_name[i] = '/'; } } return 0; } /* 通过UID获取UUID */ void internal_get_uuid_by_uid(int uid, char * uuid) { int ret; struct passwd *pwd = NULL; uuid_t uu; char user_conf_file[MAX_PATH_LEN] = {0}; char uuid_buf[UUID_BUF_LEN] = {0}; FILE *fd; pwd = getpwuid(uid); if (pwd == NULL) { snprintf(uuid, sizeof(UUID_DEFAULT), UUID_DEFAULT); return ; } if (access(pwd->pw_dir, F_OK) != 0) { snprintf(uuid, sizeof(UUID_DEFAULT), UUID_DEFAULT); return ; } snprintf(user_conf_file, MAX_PATH_LEN, "%s/.biometric_auth/", pwd->pw_dir); ret = access(user_conf_file, F_OK); if (ret != 0) { internal_create_dir(user_conf_file); ret = chown(user_conf_file, pwd->pw_uid, pwd->pw_gid); if (ret != 0) bio_print_error(_("Failure to modify the owner and group of " "%s. ERROR[%d]: %s\n"), user_conf_file, errno, strerror(errno)); } snprintf(user_conf_file, MAX_PATH_LEN, "%s/.biometric_auth/UUID", pwd->pw_dir); ret = access(user_conf_file, F_OK); if (ret != 0) { // UUID文件不存在,则生成一个新的UUID,并保存到"~/.biometric_auth/UUID"中 uuid_generate(uu); uuid_unparse_lower(uu, uuid); fd = fopen(user_conf_file, "w"); fprintf(fd, "%s\n", uuid); fclose(fd); ret = chown(user_conf_file, pwd->pw_uid, pwd->pw_gid); if (ret != 0) bio_print_error(_("Failure to modify the owner and group of %s. " "ERROR[%d]: %s\n"), user_conf_file, errno, strerror(errno)); } else { char * ret_string = NULL; fd = fopen(user_conf_file, "r"); ret_string = fgets(uuid_buf, UUID_BUF_LEN, fd); fclose(fd); if (ret_string == NULL) ret = -1; else ret = uuid_parse(uuid_buf, uu); // 读取或者解析UUID失败,则代表UUID无效,重新生成一个新的UUID if (ret != 0) { uuid_generate(uu); uuid_unparse_lower(uu, uuid); fd = fopen(user_conf_file, "w"); fprintf(fd, "%s\n", uuid); fclose(fd); ret = chown(user_conf_file, pwd->pw_uid, pwd->pw_gid); if (ret != 0) bio_print_error(_("Failure to modify the owner and group of " "%s. ERROR[%d]: %s\n"), user_conf_file, errno, strerror(errno)); } else { uuid_unparse_lower(uu, uuid); } } } /* 升级数据库,从最原始版本到当前版本 */ int internal_upgrade_db_format_from_null(sqlite3 *db) { sqlite3_stmt *stmt = NULL; int uid = 0; int ret = 0; char uuid[UUID_BUF_LEN] = {0}; char sql_cmd[MAX_PATH_LEN] = {0}; bio_print_notice(_("Upgrade database ...\n")); // 开启事物模式 sqlite3_exec(db, "BEGIN TRANSACTION;", NULL, NULL, NULL); // 重命名原始表,重命名后备份不删除,以防数据损坏时无法修复 snprintf(sql_cmd, MAX_PATH_LEN, "ALTER TABLE EIGEN_INFO RENAME TO EIGEN_INFO_VERSION_0_0_0;"); ret = sqlite3_exec(db, sql_cmd, NULL, NULL, NULL); if (ret != SQLITE_OK) { bio_print_error(_("Rename Table 'EIGEN_INFO' to " "'EIGEN_INFO_VERSION_0_0_0' Error: %s\n"), sqlite3_errmsg(db)); // 回滚数据 sqlite3_exec(db, "ROLLBACK;", NULL, NULL, NULL); return -1; } // 创建当前格式的 EIGEN_INFO 表 ret = internal_create_eigen_info_table(db); if (ret != 0) { // 回滚数据 sqlite3_exec(db, "ROLLBACK;", NULL, NULL, NULL); return -1; } // 迁移数据 snprintf(sql_cmd, MAX_PATH_LEN, "INSERT INTO EIGEN_INFO (ID, UID, BioType, Driver, EigenIndex, " " EigenIndexName, SampleNo, EigenData) " "SELECT ID, UID, BioType, Driver, " " EigenIndex, EigenIndexName, SampleNo, EigenData " "FROM EIGEN_INFO_VERSION_0_0_0;"); ret = sqlite3_exec(db, sql_cmd, NULL, NULL, NULL); if (ret != SQLITE_OK) { bio_print_error(_("Failed to migrate data from the original table: %s\n"), sqlite3_errmsg(db)); // 回滚数据 sqlite3_exec(db, "ROLLBACK;", NULL, NULL, NULL); return -1; } // 更新UUID snprintf(sql_cmd, MAX_PATH_LEN, "SELECT UID FROM %s GROUP BY UID order by UID;", TABLE_EIGEN_INFO); ret = sqlite3_prepare_v2(db, sql_cmd, -1, &stmt, NULL); if (ret != SQLITE_OK) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); // 回滚数据 sqlite3_exec(db, "ROLLBACK;", NULL, NULL, NULL); return -1; } while ( sqlite3_step(stmt) == SQLITE_ROW ) { char sql_cmd[MAX_PATH_LEN] = {0}; uid = sqlite3_column_int(stmt, 0); internal_get_uuid_by_uid(uid, uuid); printf("UID = %d, UUID = %s\n", uid, uuid); bio_print_debug(_("Update UUID=%s to database(UID=%d) ...\n"), uuid, uid); snprintf(sql_cmd, MAX_PATH_LEN, "UPDATE %s SET UUID = \"%s\" WHERE UID = %d;", TABLE_EIGEN_INFO, uuid, uid); ret = sqlite3_exec(db, sql_cmd, NULL, NULL, NULL); if (ret != SQLITE_OK) { bio_print_error(_("Update column \"UUID\" to Table \"%s\" " "Error: %s\n"), TABLE_EIGEN_INFO, sqlite3_errmsg(db)); // 回滚数据 sqlite3_exec(db, "ROLLBACK;", NULL, NULL, NULL); return -1; } } sqlite3_finalize(stmt); ret = internal_create_datebase_info(db); if (ret < 0) { // 回滚数据 sqlite3_exec(db, "ROLLBACK;", NULL, NULL, NULL); return -1; } // 迁移完成,关闭事物模式,提交数据 sqlite3_exec(db, "COMMIT;", NULL, NULL, NULL); return 0; } int internal_create_eigen_info_table(sqlite3 *db) { int ret; char *sql_cmd = NULL; sql_cmd = "CREATE TABLE IF NOT EXISTS " TABLE_EIGEN_INFO "( " \ " ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," \ " UID INTEGER NOT NULL," \ " UUID TEXT," \ " BioType INTEGER NOT NULL," \ " Driver TEXT NOT NULL," \ " EigenIndex INTEGER NOT NULL," \ " EigenIndexName TEXT NOT NULL," \ " SampleNo INTEGER NOT NULL," \ " EigenData TEXT NOT NULL" \ ")"; bio_print_info(_("Create Table %s:\n%s\n"), TABLE_EIGEN_INFO, sql_cmd); ret = sqlite3_exec(db, sql_cmd, NULL, NULL, NULL); if (ret != SQLITE_OK) { bio_print_error(_("Create Table '%s' Error: %s\n"), TABLE_EIGEN_INFO, sqlite3_errmsg(db)); return -1; } return 0; } int internal_create_datebase_info(sqlite3 *db) { int ret, idx; char *sql_cmd = NULL; sqlite3_stmt *stmt = NULL; sql_cmd = "CREATE TABLE IF NOT EXISTS " TABLE_DATABASE_FORMAT "( " \ " ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," \ " FormatMajor INTEGER NOT NULL," \ " FormatMinor INTEGER NOT NULL," \ " FormatFunction INTEGER NOT NULL" \ ")"; bio_print_info(_("Create Table %s:\n%s\n"), TABLE_DATABASE_FORMAT, sql_cmd); ret = sqlite3_exec(db, sql_cmd, NULL, NULL, NULL); if (ret != SQLITE_OK) { bio_print_error(_("Create Table '%s' Error: %s\n"), TABLE_DATABASE_FORMAT, sqlite3_errmsg(db)); return -1; } sql_cmd = "INSERT INTO [" TABLE_DATABASE_FORMAT "] (ID, FormatMajor, " " FormatMinor, FormatFunction) VALUES (NULL, :FormatMajor, " " :FormatMinor, :FormatFunction);"; bio_print_info(_("Set Database Format(%d.%d.%d):\n%s\n"), DATABASE_FORMAT_MAJOR, DATABASE_FORMAT_MINOR, DATABASE_FORMAT_FUNC, sql_cmd); ret = sqlite3_prepare_v2(db, sql_cmd, -1, &stmt, NULL); if (ret != SQLITE_OK) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); return -1; } idx = sqlite3_bind_parameter_index(stmt, ":FormatMajor"); sqlite3_bind_int64(stmt, idx, DATABASE_FORMAT_MAJOR); idx = sqlite3_bind_parameter_index(stmt, ":FormatMinor"); sqlite3_bind_int64(stmt, idx, DATABASE_FORMAT_MINOR); idx = sqlite3_bind_parameter_index(stmt, ":FormatFunction"); sqlite3_bind_int64(stmt, idx, DATABASE_FORMAT_FUNC); if (sqlite3_step(stmt) != SQLITE_DONE) { bio_print_error(_("sqlite3 prepare err: %s\n"), sqlite3_errmsg(db)); sqlite3_finalize(stmt); return -1; } sqlite3_finalize(stmt); return 0; } int bio_sto_create_table(sqlite3 *db) { int ret; ret = internal_create_eigen_info_table(db); if (ret != 0) return -1; ret = internal_create_datebase_info(db); if (ret != 0) return -1; return 0; } biometric-authentication/src/biometric-dbus-common.c0000644000175000017500000000726413517470404021637 0ustar fengfeng/* * Copyright (C) 2018 Tianjin KYLIN Information Technology Co., Ltd. * * Author: Droiing * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include #include #include #include #include "lib/biometric_common.h" #include "biometric-dbus-common.h" gboolean get_dbus_caller_uid (GDBusMethodInvocation *invocation, gint *uid) { GVariant *reply; GError *error; error = NULL; reply = g_dbus_connection_call_sync (g_dbus_method_invocation_get_connection (invocation), GET_CALLER_BUS_NAME, GET_CALLER_OBJECT_PATH, GET_CALLER_INTERFACE_NAME, GET_CALLER_METHOD_UID, g_variant_new ("(s)", g_dbus_method_invocation_get_sender (invocation)), G_VARIANT_TYPE ("(u)"), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); if (reply == NULL) { bio_print_warning (_("The UID information of the requester (%s) " "could not be obtained. Error: %s\n"), g_dbus_method_invocation_get_sender (invocation), error->message); g_error_free (error); return FALSE; } g_variant_get (reply, "(u)", uid); g_variant_unref (reply); return TRUE; } gboolean get_dbus_caller_pid (GDBusMethodInvocation *invocation, gint *pid) { GVariant *reply; GError *error; error = NULL; reply = g_dbus_connection_call_sync (g_dbus_method_invocation_get_connection (invocation), GET_CALLER_BUS_NAME, GET_CALLER_OBJECT_PATH, GET_CALLER_INTERFACE_NAME, GET_CALLER_METHOD_PID, g_variant_new ("(s)", g_dbus_method_invocation_get_sender (invocation)), G_VARIANT_TYPE ("(u)"), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); if (reply == NULL) { bio_print_warning (_("The PID information of the requester (%s) " "could not be obtained. Error: %s\n"), g_dbus_method_invocation_get_sender (invocation), error->message); g_error_free (error); return FALSE; } g_variant_get (reply, "(u)", pid); g_variant_unref (reply); return TRUE; } gboolean authority_check_by_polkit (PolkitAuthority *pAuthority, GDBusMethodInvocation *invocation, const char *action_id) { PolkitSubject *subject; PolkitCheckAuthorizationFlags flags; PolkitAuthorizationResult * polkit_ret = NULL; gboolean auth_ret = FALSE; subject = polkit_system_bus_name_new (g_dbus_method_invocation_get_sender (invocation)); flags = POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE; flags |= POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION; polkit_ret = polkit_authority_check_authorization_sync(pAuthority, subject, action_id, NULL, flags, NULL, NULL); if (polkit_authorization_result_get_is_authorized (polkit_ret)) { auth_ret = TRUE; }; g_object_unref (polkit_ret); g_object_unref (subject); return auth_ret; } biometric-authentication/configure.ac0000644000175000017500000001072713755706021016773 0ustar fengfeng# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([biometric-authentication], [0.9.62], [https://github.com/ukui/biometric-authentication/issues]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/biometric-authenticationd.c]) AC_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_CC AC_PROG_CXX AC_PROG_MAKE_SET AC_PROG_INSTALL AC_PROG_RANLIB AC_PROG_LIBTOOL PKG_PROG_PKG_CONFIG AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.18.1]) IT_PROG_INTLTOOL([0.40]) # Checks for libraries. PKG_CHECK_MODULES(GLIB_2, glib-2.0 >= 2.48) PKG_CHECK_MODULES(GIO_2, gio-2.0 >= 2.48) PKG_CHECK_MODULES(GIO_UNIX_2, gio-unix-2.0 >= 2.48) PKG_CHECK_MODULES(GOBJECT_2, gobject-2.0 >= 2.48) PKG_CHECK_MODULES(GTK_3, gtk+-3.0 >= 3.18) PKG_CHECK_MODULES(LIBFPRINT, libfprint-2 >= 1.90.1) PKG_CHECK_MODULES(LIBUSB_1, libusb-1.0 >= 1.0.20) PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.8) PKG_CHECK_MODULES(UUID, uuid >= 2.27) PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.105) AC_CHECK_LIB([dl], [dlsym]) AC_CHECK_LIB([m], [pow]) AC_CHECK_LIB([pthread], [pthread_mutex_trylock]) AC_CHECK_LIB([sqlite3], [sqlite3_prepare_v2]) AC_CHECK_LIB([libfprint], [fp_discover_devs]) AC_CHECK_LIB([usb-1.0], [libusb_hotplug_register_callback]) AC_CHECK_LIB([glib-2.0], [g_key_file_get_string]) AC_CHECK_LIB([uuid], [uuid_generate]) # Checks for header files. AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h memory.h stdint.h stdlib.h \ string.h termios.h unistd.h dlfcn.h libgen.h \ libfprint/fprint.h]) # Checks for typedefs, structures, and compiler characteristics. AC_CHECK_HEADER_STDBOOL # Checks for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([bzero memset mkdir pow strerror dlopen dlclose dlsym dlerror \ pthread_create pthread_mutex_init pthread_mutex_trylock pthread_mutex_unlock \ sqlite3_bind_int64 sqlite3_bind_parameter_index sqlite3_bind_text \ sqlite3_column_int sqlite3_column_text sqlite3_close_v2 sqlite3_errmsg \ sqlite3_exec sqlite3_finalize sqlite3_open_v2 sqlite3_close_v2 \ sqlite3_prepare_v2 sqlite3_reset sqlite3_step \ libusb_error_name libusb_exit libusb_get_device_descriptor \ libusb_hotplug_register_callback libusb_init \ g_error_free g_key_file_free g_key_file_get_boolean g_key_file_get_groups \ g_key_file_get_string g_key_file_load_from_file g_key_file_new \ g_list_append g_list_foreach g_list_free g_list_index g_list_remove \ uuid_generate uuid_unparse_lower uuid_parse]) GETTEXT_PACKAGE=${PACKAGE_TARNAME} AC_SUBST([GETTEXT_PACKAGE]) AC_CANONICAL_HOST case "$host_cpu" in aarch64*) HOST_ARCH=arm64 ;; x86?64*) HOST_ARCH=amd64 ;; esac AM_CONDITIONAL(NEED_UD650, [test "X$HOST_ARCH" = "Xamd64" -o "X$HOST_ARCH" = "Xarm64"]) AC_ARG_WITH([bio-db-dir], AS_HELP_STRING([--with-bio-db-dir=DIR], [Directory for database file]), [BIO_DB_DIR="$withval"], [BIO_DB_DIR=""]) AC_SUBST([BIO_DB_DIR]) AM_CONDITIONAL(HAS_BIO_DB_DIR, test "X$BIO_DB_DIR" != "X") AC_ARG_WITH([bio-db-name], AS_HELP_STRING([--with-bio-db-name=FILE], [Database file name]), [BIO_DB_NAME="$withval"], [BIO_DB_NAME=""]) AC_SUBST([BIO_DB_NAME]) AM_CONDITIONAL(HAS_BIO_DB_NAME, test "X$BIO_DB_NAME" != "X") AC_ARG_WITH([bio-config-dir], AS_HELP_STRING([--with-bio-config-dir=DIR], [Directory for biometric config file]), [BIO_CONFIG_DIR="$withval"], [BIO_CONFIG_DIR="$"]) AC_SUBST([BIO_CONFIG_DIR]) AM_CONDITIONAL(HAS_BIO_CONFIG_DIR, test "X$BIO_CONFIG_DIR" != "X") AC_ARG_WITH([bio-driver-dir], AS_HELP_STRING([--with-bio-driver-dir=DIR], [Directory for driver files]), [BIO_DRIVER_DIR="$withval"], [BIO_DRIVER_DIR=""]) AC_SUBST([BIO_DRIVER_DIR]) AM_CONDITIONAL(HAS_BIO_DRIVER_DIR, test "X$BIO_DRIVER_DIR" != "X") AC_ARG_WITH([bio-extra-dir], AS_HELP_STRING([--with-bio-extra-dir=DIR], [Directory for extra files(driver and extra tools)]), [BIO_EXTRA_DIR="$withval"], [BIO_EXTRA_DIR=""]) AC_SUBST([BIO_EXTRA_DIR]) AM_CONDITIONAL(HAS_BIO_EXTRA_DIR, test "X$BIO_EXTRA_DIR" != "X") AC_CONFIG_FILES([Makefile data/Makefile src/Makefile src/lib/Makefile src/lib/libbiometric.pc src/drivers/Makefile src/drivers/community-multidevice/Makefile src/drivers/community-multidevice/drivers/Makefile src/utils/Makefile src/utils/biometric-auth-client/Makefile src/utils/biometric-config-tool/Makefile src/utils/biometric-device-discover/Makefile src/utils/biometric-device-discover/community-multidevice/Makefile po/Makefile.in]) AC_OUTPUT biometric-authentication/README.md0000777000175000017500000000000013517470404016631 2READMEustar fengfengbiometric-authentication/po/0000755000175000017500000000000013755706021015114 5ustar fengfengbiometric-authentication/po/Makevars0000644000175000017500000000341713517470404016614 0ustar fengfeng# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = UKUI Teams # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT) # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = biometric-authentication/po/ru.po0000644000175000017500000020137713755706021016114 0ustar fengfeng# Russian translations for biometric-authentication package. # Copyright (C) 2018 THE biometric-authentication'S COPYRIGHT HOLDER # This file is distributed under the same license as the biometric-authentication package. # droiing , 2018. # msgid "" msgstr "" "Project-Id-Version: biometric-authentication 0.9.62\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-07-31 11:01+0800\n" "PO-Revision-Date: 2018-10-12 10:20+0800\n" "Last-Translator: droiing \n" "Language-Team: Chinese (simplified)\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7.1\n" #: ../src/biometric-authenticationd.c:304 #: ../src/biometric-authenticationd.c:382 #: ../src/biometric-authenticationd.c:571 #: ../src/biometric-authenticationd.c:676 #: ../src/biometric-authenticationd.c:792 #: ../src/biometric-authenticationd.c:872 #: ../src/biometric-authenticationd.c:1010 #: ../src/biometric-authenticationd.c:1173 #: ../src/biometric-authenticationd.c:1280 #: ../src/biometric-authenticationd.c:1357 #: ../src/biometric-authenticationd.c:1485 #: ../src/biometric-authenticationd.c:1656 #, c-format msgid "Can't create thread: %s\n" msgstr "Не удалось создать поток: %s\n" #: ../src/biometric-authenticationd.c:503 #, c-format msgid "" "Framework automatically assigns the free index '%d' to driver %s user %d\n" msgstr "" "Framework автоматически назначает свободный индекс '%d' для драйвера %s " "пользователя %d \n" #: ../src/biometric-authenticationd.c:511 msgid "Enroll Result: Success\n" msgstr "Задать результат: Успех\n" #: ../src/biometric-authenticationd.c:514 msgid "Enroll Result: Fail\n" msgstr "Результат регистрации: Fail\n" #: ../src/biometric-authenticationd.c:618 msgid "Verify Result: Match\n" msgstr "Проверить результат: Матч\n" #: ../src/biometric-authenticationd.c:622 msgid "Verify Result: No Match\n" msgstr "Результат проверки: Нет соответствия\n" #: ../src/biometric-authenticationd.c:727 #, c-format msgid "Identify Result: UID = %d\n" msgstr "Идентификация результата: UID = %d\n" #: ../src/biometric-authenticationd.c:731 msgid "Identify Result: No Match\n" msgstr "Идентифицировать результат: Нет соответствия\n" #: ../src/biometric-authenticationd.c:829 #, c-format msgid "Capture Result: %.*s\n" msgstr "Результат захвата: %.*s\n" #: ../src/biometric-authenticationd.c:832 msgid "Capture Result: ERROR\n" msgstr "Capture Result: ERROR\n" #: ../src/biometric-authenticationd.c:1032 #, c-format msgid "%s Clean Result: Success\n" msgstr "%s Чистый результат: Успех\n" #: ../src/biometric-authenticationd.c:1035 #, c-format msgid "%s Clean Result: Failed\n" msgstr "%s Чистый результат: сбой\n" #. 系统层清理进行彻底的清理,免受当前不可用设备遗留的生物特征信息影响 #: ../src/biometric-authenticationd.c:1103 msgid "" "System level cleaning of the specified range of biometric features (all " "drivers)\n" msgstr "" "Очистка уровня системы указанного диапазона биометрических функций (все " "драйверы)\n" #: ../src/biometric-authenticationd.c:1111 msgid "System level Clean Result: Success\n" msgstr "Уровень системы Чистый результат: Успех\n" #: ../src/biometric-authenticationd.c:1114 msgid "System level Clean Result: Failed\n" msgstr "Уровень системы Чистый результат: сбой\n" #: ../src/biometric-authenticationd.c:1441 #, c-format msgid "Error: Failed to export object. Reason: %s\n" msgstr "Ошибка: не удалось экспортировать объект. Причина: %s\n" #: ../src/biometric-authenticationd.c:1451 #, c-format msgid "name_acquired_cb called, Acquired bus name: %s\n" msgstr "name_acquired_cb, имя приобретенной шины: %s\n" #: ../src/biometric-authenticationd.c:1460 msgid "name_lost_cb called, Error: Failed to connect to dbus\n" msgstr "name_lost_cb, Ошибка: Не удалось подключиться к dbus\n" #: ../src/biometric-authenticationd.c:1462 #, c-format msgid "name_lost_cb called, Error: Failed to obtain bus name: %s\n" msgstr "name_lost_cb, Ошибка: не удалось получить имя шины: %s\n" #: ../src/biometric-authenticationd.c:1470 msgid "run called in the server\n" msgstr "выполнить вызов на сервере\n" #: ../src/biometric-authenticationd.c:1487 #: ../src/biometric-authenticationd.c:1658 #, c-format msgid "New thread created: %s\n" msgstr "Создана новая тема: %s\n" #. * init for usage of "g" types #. g_type_init(); #: ../src/biometric-authenticationd.c:1500 msgid "InitDBusCommunicationServer: Server started\n" msgstr "InitDBusCommunicationServer: Сервер запущен\n" #: ../src/biometric-authenticationd.c:1576 #, c-format msgid "libusb_handle_events failed: %s\n" msgstr "Ошибка libusb_handle_events: %s\n" #: ../src/biometric-authenticationd.c:1593 msgid "" "The biometric authentication server failed to start, requiring administrator " "permission to start\n" msgstr "" "Не удалось запустить биометрический сервер аутентификации, требуя разрешения " "администратора на запуск\n" #: ../src/biometric-authenticationd.c:1616 #, c-format msgid "Can not open PID file: %s\n" msgstr "Не удается открыть файл PID: %s\n" #: ../src/biometric-authenticationd.c:1623 msgid "" "Biometric authentication server is running, Do not restart it repeatedly\n" msgstr "" "Сервер биометрической аутентификации запущен, не перезапускайте его " "повторно\n" #: ../src/biometric-authenticationd.c:1632 #, c-format msgid "There is an exception to write PID file: %s\n" msgstr "Существует исключение для записи PID-файла: %s\n" #: ../src/biometric-authenticationd.c:1640 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:155 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:173 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:192 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:226 msgid "No such device" msgstr "Нет такого устройства" #: ../src/biometric-authenticationd.c:1641 msgid "Device busy" msgstr "Устройство занято" #: ../src/biometric-authenticationd.c:1646 msgid "Initial biometric recognition framework failed\n" msgstr "Исходная структура биометрического распознавания не выполнена\n" #: ../src/biometric-dbus-common.c:51 #, c-format msgid "" "The UID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "" "Информация UID запрашивающей стороны (%s) не может быть получена. Ошибка: " "%s \n" #: ../src/biometric-dbus-common.c:87 #, c-format msgid "" "The PID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "" "Информация PID запрашивающей стороны (%s) не может быть получена. Ошибка: " "%s \n" #: ../src/lib/biometric_common.c:170 msgid "Current driver list:" msgstr "Текущий список драйверов:" #: ../src/lib/biometric_common.c:208 msgid "Current device list:" msgstr "Список текущих устройств:" #: ../src/lib/biometric_common.c:267 ../src/lib/biometric_common.c:285 #: ../src/lib/biometric_common.c:331 ../src/lib/biometric_config.c:39 #, c-format msgid "Error[%d]: %s\n" msgstr "Ошибка [%d]: %s\n" #: ../src/lib/biometric_common.c:311 msgid "" "can't find \"bioconf\" struct, maybe someone forget use \"bio_conf_init()\" " "before\n" msgstr "" "не может найти структуру \"bioconf\", возможно, кто-то забыл использовать " "\"bio_conf_init()\" перед\n" #: ../src/lib/biometric_common.c:323 ../src/lib/biometric_storage.c:229 #: ../src/lib/biometric_storage.c:300 ../src/lib/biometric_storage.c:367 #: ../src/lib/biometric_storage.c:409 ../src/lib/biometric_storage.c:597 msgid "Unable to allocate memory\n" msgstr "Невозможно выделить память\n" #: ../src/lib/biometric_common.c:338 #, c-format msgid "No define driver in [%s]\n" msgstr "Нет драйвера определения в [%s]\n" #: ../src/lib/biometric_common.c:351 #, c-format msgid "Loaded Driver: %s\n" msgstr "Загруженный драйвер: %s\n" #: ../src/lib/biometric_common.c:360 #, c-format msgid "%s driver configure failed\n" msgstr "%s удалось установить драйвер\n" #. 检测驱动版本兼容性 #: ../src/lib/biometric_common.c:368 #, c-format msgid "%s driver DRV_API version: %d.%d.%d\n" msgstr "%s драйвер DRV_API версия: %d.%d.%d\n" #: ../src/lib/biometric_common.c:380 #, c-format msgid "" "Detected Compatibility issues: %s driver version is higher than biometric " "framework\n" msgstr "" "Обнаруженные проблемы совместимости: версия драйвера %s выше, чем " "биометрическая структура\n" #: ../src/lib/biometric_common.c:384 #, c-format msgid "" "Detected Compatibility issues: %s driver version is lower than biometric " "framework\n" msgstr "" "Обнаруженные проблемы совместимостью: версия драйвера %s ниже, чем " "биометрическая структура\n" #: ../src/lib/biometric_common.c:395 #, c-format msgid "Driver %s initialization failed\n" msgstr "Ошибка инициализации драйвера %s\n" #: ../src/lib/biometric_common.c:430 msgid "Error: Can not register attach callback error\n" msgstr "" "Ошибка: невозможно зарегистрировать ошибку обратного вызова присоединения\n" #: ../src/lib/biometric_common.c:443 msgid "Error: Can not register detach callback error\n" msgstr "" "Ошибка: невозможно зарегистрировать ошибку обратного вызова отсоединения\n" #: ../src/lib/biometric_common.c:494 msgid "Biometric framework API version:\n" msgstr "Версия API биометрической структуры:\n" #: ../src/lib/biometric_common.c:495 #, c-format msgid " Driver API(DRV_API): %d.%d.%d\n" msgstr " API-интерфейс драйвера (DRV_API): %d.%d.%d\n" #: ../src/lib/biometric_common.c:499 #, c-format msgid " Application API(APP_API): %d.%d.%d\n" msgstr " API приложения (APP_API): %d.%d.%d\n" #: ../src/lib/biometric_common.c:506 msgid "bio_conf_init failed\n" msgstr "Ошибка bio_conf_init\n" #: ../src/lib/biometric_common.c:522 #, c-format msgid "failed to initialise libusb: %s\n" msgstr "не удалось инициализировать libusb: %s\n" #: ../src/lib/biometric_common.c:570 ../src/lib/biometric_common.c:616 #: ../src/lib/biometric_common.c:660 ../src/lib/biometric_common.c:706 #: ../src/lib/biometric_common.c:754 ../src/lib/biometric_common.c:798 #: ../src/lib/biometric_common.c:848 ../src/lib/biometric_common.c:890 #, c-format msgid "Open Result: %d\n" msgstr "Открыть результат: %d\n" #: ../src/lib/biometric_common.c:586 ../src/lib/biometric_common.c:632 #: ../src/lib/biometric_common.c:676 ../src/lib/biometric_common.c:722 #: ../src/lib/biometric_common.c:770 ../src/lib/biometric_common.c:814 #: ../src/lib/biometric_common.c:857 #, c-format msgid "Close Device: %s\n" msgstr "Закрыть устройство: %s\n" #: ../src/lib/biometric_common.c:587 ../src/lib/biometric_common.c:633 #: ../src/lib/biometric_common.c:677 ../src/lib/biometric_common.c:723 #: ../src/lib/biometric_common.c:771 ../src/lib/biometric_common.c:815 #: ../src/lib/biometric_common.c:858 #, c-format msgid "Device Status: [%d]%s\n" msgstr "Состояние устройства: [%d] %s\n" #: ../src/lib/biometric_common.c:627 ../src/lib/biometric_common.c:717 #: ../src/lib/biometric_common.c:765 #, c-format msgid "%s\n" msgstr "%s\n" #: ../src/lib/biometric_common.c:1056 ../src/lib/biometric_common.c:1247 msgid "Device idle" msgstr "Устройство в режиме ожидания" #: ../src/lib/biometric_common.c:1058 msgid "Device is in process" msgstr "Устройство находится в процессе" #: ../src/lib/biometric_common.c:1060 msgid "Terminating current operation" msgstr "Завершение текущей операции" #: ../src/lib/biometric_common.c:1062 msgid "Device is disabled" msgstr "Устройство отключено" #: ../src/lib/biometric_common.c:1065 msgid "Opening device" msgstr "Открывающееся устройство" #: ../src/lib/biometric_common.c:1067 msgid "Terminating open operation" msgstr "Прекращение операции открытия" #: ../src/lib/biometric_common.c:1070 msgid "Enrolling" msgstr "поступив" #: ../src/lib/biometric_common.c:1072 msgid "Terminating enroll operation" msgstr "Завершение регистрации" #: ../src/lib/biometric_common.c:1075 msgid "Verifying" msgstr "проверка" #: ../src/lib/biometric_common.c:1077 msgid "Terminating Verify operation" msgstr "Операция завершения проверки" #: ../src/lib/biometric_common.c:1080 msgid "Identifying" msgstr "идентифицирующий" #: ../src/lib/biometric_common.c:1082 msgid "Terminating identify operation" msgstr "Прекращение операции идентификации" #: ../src/lib/biometric_common.c:1085 msgid "Capturing" msgstr "Захватив" #: ../src/lib/biometric_common.c:1087 msgid "Terminating capture operation" msgstr "Прекращение операции захвата" #: ../src/lib/biometric_common.c:1090 msgid "Searching" msgstr "поиск" #: ../src/lib/biometric_common.c:1092 msgid "Terminating search operation" msgstr "Прекращение операции поиска" #: ../src/lib/biometric_common.c:1095 msgid "Cleaning" msgstr "очищающий" #: ../src/lib/biometric_common.c:1097 msgid "Terminating clean operation" msgstr "Прекращение очистки" #: ../src/lib/biometric_common.c:1100 msgid "Getting feature list" msgstr "Получение списка функций" #: ../src/lib/biometric_common.c:1102 msgid "Terminating get feature list operation" msgstr "Прекращение работы функции списка функций" #: ../src/lib/biometric_common.c:1105 msgid "Renaming feature" msgstr "Функция переименования" #: ../src/lib/biometric_common.c:1107 msgid "Terminating feature rename operation" msgstr "Операция переименования функции завершения" #: ../src/lib/biometric_common.c:1110 msgid "Closing" msgstr "закрытие" #: ../src/lib/biometric_common.c:1112 msgid "Terminating close operation" msgstr "Прекращение закрытия" #: ../src/lib/biometric_common.c:1115 #, c-format msgid "Device unknown status code: %d\n" msgstr "Неизвестный код состояния устройства: %d\n" #: ../src/lib/biometric_common.c:1116 msgid "Device is in an unknown status..." msgstr "Устройство находится в неизвестном состоянии ..." #: ../src/lib/biometric_common.c:1128 msgid "Operation successful" msgstr "Операция успешна" #: ../src/lib/biometric_common.c:1130 ../src/lib/biometric_common.c:1249 msgid "Operation failed" msgstr "Операция не удалась" #: ../src/lib/biometric_common.c:1132 ../src/lib/biometric_common.c:1251 msgid "An error was encountered during the operation" msgstr "Во время операции возникла ошибка" #: ../src/lib/biometric_common.c:1134 ../src/lib/biometric_common.c:1253 msgid "The operation was interrupted by the user" msgstr "Операция была прервана пользователем" #: ../src/lib/biometric_common.c:1136 ../src/lib/biometric_common.c:1255 msgid "Operation timeout" msgstr "Тайм-аут работы" #: ../src/lib/biometric_common.c:1138 ../src/lib/biometric_common.c:1259 msgid "Out of memory" msgstr "Недостаточно памяти" #: ../src/lib/biometric_common.c:1141 ../src/lib/biometric_common.c:1264 msgid "Open device completion" msgstr "Завершение открытого устройства" #: ../src/lib/biometric_common.c:1143 ../src/lib/biometric_common.c:1266 msgid "Open device failed" msgstr "Не удалось открыть устройство" #: ../src/lib/biometric_common.c:1145 ../src/lib/biometric_common.c:1268 msgid "An error was encountered during the opening" msgstr "Во время открытия возникла ошибка" #: ../src/lib/biometric_common.c:1148 ../src/lib/biometric_common.c:1271 msgid "Enroll feature successful" msgstr "Функция регистрации успешно" #: ../src/lib/biometric_common.c:1150 ../src/lib/biometric_common.c:1273 msgid "Enroll feature failed" msgstr "Не удалось выполнить функцию регистрации" #: ../src/lib/biometric_common.c:1152 ../src/lib/biometric_common.c:1275 msgid "An error was encountered during enrolling" msgstr "Во время регистрации произошла ошибка" #: ../src/lib/biometric_common.c:1154 ../src/lib/biometric_common.c:1277 msgid "Enroll operation was interrupted by the user" msgstr "Операция регистрации была прервана пользователем" #: ../src/lib/biometric_common.c:1156 ../src/lib/biometric_common.c:1279 msgid "Enroll operation timeout" msgstr "Завершить сеанс работы" #: ../src/lib/biometric_common.c:1159 ../src/lib/biometric_common.c:1282 msgid "Verify feature match" msgstr "Проверка соответствия функции" #: ../src/lib/biometric_common.c:1161 ../src/lib/biometric_common.c:1284 msgid "Verify feature no match" msgstr "Функция проверки не соответствует" #: ../src/lib/biometric_common.c:1163 ../src/lib/biometric_common.c:1286 msgid "An error was encountered during verifying" msgstr "При проверке возникла ошибка" #: ../src/lib/biometric_common.c:1165 ../src/lib/biometric_common.c:1288 msgid "Verify operation was interrupted by the user" msgstr "Операция подтверждения была прервана пользователем" #: ../src/lib/biometric_common.c:1167 ../src/lib/biometric_common.c:1290 msgid "Verify operation timeout" msgstr "Проверка тайм-аута работы" #: ../src/lib/biometric_common.c:1170 ../src/lib/biometric_common.c:1293 msgid "Identify feature match" msgstr "Определить соответствие характеристик" #: ../src/lib/biometric_common.c:1172 ../src/lib/biometric_common.c:1295 msgid "Identify feature no match" msgstr "Идентифицировать функцию не соответствует" #: ../src/lib/biometric_common.c:1174 ../src/lib/biometric_common.c:1297 msgid "An error was encountered during identifying" msgstr "При идентификации" #: ../src/lib/biometric_common.c:1176 ../src/lib/biometric_common.c:1299 msgid "Identify operation was interrupted by the user" msgstr "Идентификация операции была прервана пользователем" #: ../src/lib/biometric_common.c:1178 ../src/lib/biometric_common.c:1301 msgid "Identify operation timeout" msgstr "Определение тайм-аута работы" #: ../src/lib/biometric_common.c:1181 ../src/lib/biometric_common.c:1304 msgid "Capture feature successful" msgstr "Функция захвата выполнена успешно" #: ../src/lib/biometric_common.c:1183 ../src/lib/biometric_common.c:1306 msgid "Capture feature failed" msgstr "Сбой функции захвата" #: ../src/lib/biometric_common.c:1185 ../src/lib/biometric_common.c:1308 msgid "An error was encountered during capturing" msgstr "При захвате возникла ошибка" #: ../src/lib/biometric_common.c:1187 ../src/lib/biometric_common.c:1310 msgid "Capture operation was interrupted by the user" msgstr "Операция захвата была прервана пользователем" #: ../src/lib/biometric_common.c:1189 ../src/lib/biometric_common.c:1312 msgid "Capture operation timeout" msgstr "Тайм-аут захвата" #: ../src/lib/biometric_common.c:1192 ../src/lib/biometric_common.c:1315 msgid "Find the specified features" msgstr "Найти указанные функции" #: ../src/lib/biometric_common.c:1194 ../src/lib/biometric_common.c:1317 msgid "No specified features were found" msgstr "Никаких определенных функций не найдено" #: ../src/lib/biometric_common.c:1196 ../src/lib/biometric_common.c:1319 msgid "An error was encountered during searching" msgstr "Во время поиска возникла ошибка" #: ../src/lib/biometric_common.c:1198 ../src/lib/biometric_common.c:1321 msgid "Search operation was interrupted by the user" msgstr "Операция поиска была прервана пользователем" #: ../src/lib/biometric_common.c:1200 ../src/lib/biometric_common.c:1323 msgid "Search operation timeout" msgstr "Тайм-аут поисковой операции" #: ../src/lib/biometric_common.c:1203 ../src/lib/biometric_common.c:1326 msgid "Clean feature successful" msgstr "Чистая функция выполнена успешно" #: ../src/lib/biometric_common.c:1205 ../src/lib/biometric_common.c:1328 msgid "Clean feature failed" msgstr "Не удалось выполнить очистку" #: ../src/lib/biometric_common.c:1207 ../src/lib/biometric_common.c:1330 msgid "An error was encountered during cleaning" msgstr "Во время очистки возникла ошибка" #: ../src/lib/biometric_common.c:1209 ../src/lib/biometric_common.c:1332 msgid "Clean operation was interrupted by the user" msgstr "Операция очистки была прервана пользователем" #: ../src/lib/biometric_common.c:1211 ../src/lib/biometric_common.c:1334 msgid "Clean operation timeout" msgstr "Тайм-аут чистой работы" #: ../src/lib/biometric_common.c:1214 ../src/lib/biometric_common.c:1337 msgid "Get feature list completion" msgstr "Получить список функций" #: ../src/lib/biometric_common.c:1216 ../src/lib/biometric_common.c:1339 msgid "Get feature list failed" msgstr "Не удалось получить список функций" #: ../src/lib/biometric_common.c:1218 ../src/lib/biometric_common.c:1341 msgid "An error was encountered during getting feature list" msgstr "При получении списка функций произошла ошибка" #: ../src/lib/biometric_common.c:1221 ../src/lib/biometric_common.c:1344 msgid "Rename feature successful" msgstr "Функция переименования успешно" #: ../src/lib/biometric_common.c:1223 ../src/lib/biometric_common.c:1346 msgid "Rename feature failed" msgstr "Не удалось переименовать" #: ../src/lib/biometric_common.c:1225 ../src/lib/biometric_common.c:1348 msgid "An error was encountered during renaming" msgstr "При переименовании возникла ошибка" #: ../src/lib/biometric_common.c:1228 ../src/lib/biometric_common.c:1353 msgid "Close device completion" msgstr "Закрытие устройства" #: ../src/lib/biometric_common.c:1230 ../src/lib/biometric_common.c:1355 msgid "Close device failed" msgstr "Не удалось закрыть устройство" #: ../src/lib/biometric_common.c:1232 ../src/lib/biometric_common.c:1357 msgid "An error was encountered during closing" msgstr "При закрытии" #: ../src/lib/biometric_common.c:1235 msgid "Operation is in an unknown status......" msgstr "Операция находится в неизвестном состоянии ......" #: ../src/lib/biometric_common.c:1257 msgid "Device is disable" msgstr "Устройство отключено" #: ../src/lib/biometric_common.c:1261 msgid "The device or driver does not support this operation" msgstr "Устройство или драйвер не поддерживают эту операцию" #: ../src/lib/biometric_common.c:1350 msgid "Feature renaming is not complete, please try again" msgstr "Переименование функции не завершено, повторите попытку" #: ../src/lib/biometric_common.c:1360 msgid "Device internal error" msgstr "Внутренняя ошибка устройства" #: ../src/lib/biometric_common.c:1473 msgid "Init libusb Error\n" msgstr "Init libusb Error\n" #: ../src/lib/biometric_common.c:1480 msgid "Get USB Device List Error\n" msgstr "Ошибка получения списка устройств USB\n" #: ../src/lib/biometric_common.c:1489 msgid "Can not get usb information\n" msgstr "Не удается получить информацию о USB-файле\n" #: ../src/lib/biometric_common.c:1506 #, c-format msgid "libbiometric detected usb device(%s): %d\n" msgstr "libbiometric обнаруженное устройство usb ( %s ): %d\n" #: ../src/lib/biometric_common.c:1747 #, c-format msgid "Get function %s handle error: %s\n" msgstr "Получить функцию %s ошибка дескриптора: %s\n" #: ../src/lib/biometric_common.c:1764 msgid "Error: Can not get device descriptor\n" msgstr "Ошибка: не удается получить дескриптор устройства\n" #: ../src/lib/biometric_common.c:1767 #, c-format msgid "Device attached: %04x:%04x\n" msgstr "Прилагаемое устройство: %04x:%04x\n" #: ../src/lib/biometric_common.c:1828 msgid "Error getting device descriptor" msgstr "Ошибка при получении дескриптора устройства" #: ../src/lib/biometric_common.c:1831 #, c-format msgid "Device detached: %04x:%04x\n" msgstr "Устройство отсоединено: %04x:%04x\n" #: ../src/lib/biometric_common.c:1957 msgid "Unable to find feature that require renaming\n" msgstr "Не удалось найти функцию, требующую переименования\n" #: ../src/lib/biometric_common.c:1960 #, c-format msgid "There are %d feature samples to renaming failed, please try again\n" msgstr "Есть примеры образцов %d для переименования, попробуйте еще раз\n" #: ../src/lib/biometric_storage.c:190 ../src/lib/biometric_storage.c:206 #: ../src/lib/biometric_storage.c:387 ../src/lib/biometric_storage.c:517 #: ../src/lib/biometric_storage.c:559 ../src/lib/biometric_storage.c:616 #: ../src/lib/biometric_storage.c:636 ../src/lib/biometric_storage.c:663 #: ../src/lib/biometric_storage.c:689 ../src/lib/biometric_storage.c:740 #: ../src/lib/biometric_storage.c:1046 ../src/lib/biometric_storage.c:1155 #: ../src/lib/biometric_storage.c:1169 #, c-format msgid "sqlite3 prepare err: %s\n" msgstr "sqlite3 подготовить err: %s\n" #: ../src/lib/biometric_storage.c:198 #, c-format msgid "Unable to set database(%s) permissions. ERROR[%d]: %s\n" msgstr "Невозможно установить разрешения базы данных ( %s ). ОШИБКА [%d]: %s\n" #: ../src/lib/biometric_storage.c:712 msgid "Check database format version ...\n" msgstr "Проверьте версию формата базы данных ...\n" #: ../src/lib/biometric_storage.c:720 #, c-format msgid "Find Table '%s' Error: %s\n" msgstr "Найти таблицу « %s » Ошибка: %s\n" #: ../src/lib/biometric_storage.c:754 #, c-format msgid "Database format version is %d.%d.%d\n" msgstr "Версия формата базы данных: %d.%d.%d\n" #: ../src/lib/biometric_storage.c:762 #, c-format msgid "Failed to upgrade database format:version %d.%d.%d to %d.%d.%d\n" msgstr "Не удалось обновить формат базы данных: версия %d.%d.%d до %d.%d.%d\n" #: ../src/lib/biometric_storage.c:775 msgid "The database format is compatible with the current framework\n" msgstr "Формат базы данных совместим с текущей структурой\n" #: ../src/lib/biometric_storage.c:780 #, c-format msgid "" "Incompatible version of the database format: %d.%d.%d. Version required for " "the current framework: %d.%d.x" msgstr "" "Несовместимая версия формата базы данных: %d.%d.%d . Версия, необходимая для " "текущей структуры: %d . %d .x" #: ../src/lib/biometric_storage.c:886 #, c-format msgid "Create Biometric Datebase Directory (%s) Error\n" msgstr "Создание каталога биометрических дат ( %s ) Ошибка\n" #: ../src/lib/biometric_storage.c:928 ../src/lib/biometric_storage.c:947 #: ../src/lib/biometric_storage.c:973 #, c-format msgid "Failure to modify the owner and group of %s. ERROR[%d]: %s\n" msgstr "Невозможность изменить владельца и группу %s . ОШИБКА [%d]: %s\n" #: ../src/lib/biometric_storage.c:992 msgid "Upgrade database ...\n" msgstr "Обновление базы данных ...\n" #: ../src/lib/biometric_storage.c:1002 #, c-format msgid "Rename Table 'EIGEN_INFO' to 'EIGEN_INFO_VERSION_0_0_0' Error: %s\n" msgstr "" "Переименуйте таблицу «EIGEN_INFO» в «EIGEN_INFO_VERSION_0_0_0» Ошибка: %s\n" #: ../src/lib/biometric_storage.c:1031 #, c-format msgid "Failed to migrate data from the original table: %s\n" msgstr "Не удалось перенести данные из исходной таблицы: %s\n" #: ../src/lib/biometric_storage.c:1061 #, c-format msgid "Update UUID=%s to database(UID=%d) ...\n" msgstr "Обновить UUID = %s для базы данных (UID = %d ) ...\n" #: ../src/lib/biometric_storage.c:1068 #, c-format msgid "Update column \"UUID\" to Table \"%s\" Error: %s\n" msgstr "Обновить столбец \"UUID\" в таблицу \"%s\" Ошибка: %s\n" #: ../src/lib/biometric_storage.c:1111 ../src/lib/biometric_storage.c:1135 #, c-format msgid "" "Create Table %s:\n" "%s\n" msgstr "" "Создать таблицу %s :\n" " %s\n" #: ../src/lib/biometric_storage.c:1115 ../src/lib/biometric_storage.c:1139 #, c-format msgid "Create Table '%s' Error: %s\n" msgstr "Создать таблицу « %s » Ошибка: %s\n" #: ../src/lib/biometric_storage.c:1147 #, c-format msgid "" "Set Database Format(%d.%d.%d):\n" "%s\n" msgstr "" "Установить формат базы данных ( %d . %d %d ):\n" " %s\n" #: ../src/drivers/community-multidevice/community_ops.c:129 #, c-format msgid "Get AES Key File Error[%d]: %s, use default Key.\n" msgstr "" "Получить AES Key File Error [%d]: %s , использовать ключ по умолчанию.\n" #: ../src/drivers/community-multidevice/community_ops.c:142 #, c-format msgid "" "AES Key File (%s) does not Exist or has no Read Permission, use default " "key.\n" msgstr "" "Файл ключа AES ( %s ) не существует или не имеет разрешения на чтение, " "используйте ключ по умолчанию.\n" #: ../src/drivers/community-multidevice/community_ops.c:159 #, c-format msgid "Can not open AES Key File: %s, use default key.\n" msgstr "Не удается открыть файл AES Key: %s , используйте ключ по умолчанию.\n" #: ../src/drivers/community-multidevice/community_ops.c:174 msgid "AES Key File is Enpty, use default Key.\n" msgstr "Файл ключа AES - Enpty, используйте ключ по умолчанию.\n" #: ../src/drivers/community-multidevice/community_ops.c:198 msgid "AES Key is Enpty, use default Key.\n" msgstr "AES Key - Enpty, используйте ключ по умолчанию.\n" #: ../src/drivers/community-multidevice/community_ops.c:234 #, c-format msgid "Detect %s device\n" msgstr "Обнаружить %s устройство\n" #: ../src/drivers/community-multidevice/community_ops.c:242 #: ../src/drivers/community-multidevice/community_ops.c:247 #, c-format msgid "No %s fingerprint device detected\n" msgstr "Не обнаружено устройство отпечатков пальцев %s\n" #: ../src/drivers/community-multidevice/community_ops.c:251 #, c-format msgid "There is %d %s fingerprint device detected\n" msgstr "Существует обнаруженное %d %s устройство отпечатков пальцев\n" #: ../src/drivers/community-multidevice/community_ops.c:277 #, c-format msgid "Device failed to open" msgstr "Не удалось открыть устройство" #: ../src/drivers/community-multidevice/community_ops.c:333 #: ../src/drivers/community-multidevice/community_ops.c:1089 #: ../src/drivers/community-multidevice/community_ops.c:1277 #, c-format msgid "Unknown error, error code: %d" msgstr "Неизвестная ошибка, код ошибки: %d" #: ../src/drivers/community-multidevice/community_ops.c:458 #: ../src/drivers/community-multidevice/community_ops.c:541 #: ../src/drivers/community-multidevice/community_ops.c:676 msgid "Find the following feature matching:\n" msgstr "Найдите следующее соответствие:\n" #: ../src/drivers/community-multidevice/community_ops.c:625 #, c-format msgid "" "Search from offset %d, index %d has been searched, global index %d(%d + %d)\n" msgstr "" "Поиск из смещения %d , индекс %d был просмотрен, глобальный индекс %d ( %d + " "%d )\n" #: ../src/drivers/community-multidevice/community_ops.c:630 #, c-format msgid "" "The %d feature has been searched(UID = %d, Index = %d, Index Name = %s), " "please press your finger to continue the search" msgstr "" "Была просмотрена функция %d (UID = %d , Index = %d , Index Name = %s ), " "пожалуйста, нажмите пальцем, чтобы продолжить поиск" #: ../src/drivers/community-multidevice/community_ops.c:774 #, c-format msgid "Device %s[%d] received interrupt request\n" msgstr "Устройство %s [%d] получено запрос прерывания\n" #: ../src/drivers/community-multidevice/community_ops.c:819 msgid "Sample complete" msgstr "Образец завершен" #: ../src/drivers/community-multidevice/community_ops.c:821 msgid "" "Enrollment failed due to incomprehensible data. (Please use the same finger " "at different sampling stages of the same enroll)" msgstr "" "Зачисление закончилось из-за непонятных данных. (Пожалуйста, используйте " "один и тот же палец на разных этапах выборки одной и той же записи)" #: ../src/drivers/community-multidevice/community_ops.c:825 msgid "" "Please place your finger again because of poor quality of the sample or " "other scanning problems" msgstr "" "Поместите палец снова из-за низкого качества образца или других проблем " "сканирования" #: ../src/drivers/community-multidevice/community_ops.c:828 msgid "Your swipe was too short, please place your finger again." msgstr "" "Ваш салфетка была слишком короткой, пожалуйста, поместите свой палец снова." #: ../src/drivers/community-multidevice/community_ops.c:831 msgid "" "Didn't catch that, please center your finger on the sensor and try again." msgstr "" "Не поймайте это, пожалуйста, сосредоточьте свой палец на датчике и повторите " "попытку." #: ../src/drivers/community-multidevice/community_ops.c:834 msgid "" "Because of the scanning image quality or finger pressure problem, the " "sampling failed, please remove the finger and retry" msgstr "" "Из-за качества изображения сканирования или проблемы с давлением пальца, " "выборка не удалась, удалите палец и повторите попытку" #: ../src/drivers/community-multidevice/community_ops.c:838 msgid "Unable to generate feature data, enroll failure" msgstr "Невозможно генерировать данные функции, регистрировать сбой" #: ../src/drivers/community-multidevice/community_ops.c:840 msgid "" "Sample start, please press and lift your finger (Some devices need to swipe " "your finger)" msgstr "" "Пример начала, пожалуйста, нажмите и поднимите палец (некоторые устройства " "должны пронести пальцем)" #: ../src/drivers/community-multidevice/community_ops.c:895 #, c-format msgid "Could not open device (driver %s)" msgstr "Не удалось открыть устройство (драйвер %s )" #: ../src/drivers/community-multidevice/community_ops.c:1064 #: ../src/drivers/community-multidevice/community_ops.c:1229 #, c-format msgid "Failed to call function %s\n" msgstr "Не удалось вызвать функцию %s\n" #: ../src/drivers/community-multidevice/community_ops.c:1112 #, c-format msgid "" "Enroll failed: The feature was successfully sampled, but the encoding of the " "sampling feature could not be generated" msgstr "" "Ошибка регистрации: функция была успешно отобрана, но кодирование функции " "выборки не может быть сгенерировано" #: ../src/drivers/community-multidevice/community_ops.c:1129 #, c-format msgid "" "The %d [%d/%d] sampling was successful, in the next sampling: please press " "and lift your finger (Some devices need to swipe your finger)" msgstr "" "Выборка %d [%d / %d] была успешной в следующем отборе проб: пожалуйста, " "нажмите и поднимите палец (некоторые устройства должны провести пальцем)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Disable" msgstr "запрещать" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Enable" msgstr "включить" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Print" msgstr "Отпечаток пальца" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Vein" msgstr "Finger Vein" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Iris" msgstr "Ирис" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Face" msgstr "Лицо" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Voice Print" msgstr "Голосовая печать" # #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device" msgstr "устройство" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "OS" msgstr "Операционные системы" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device and OS" msgstr "Устройство и ОС" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Original Data" msgstr "Исходные данные" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Value" msgstr "Собственная ценность" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Vector" msgstr "Собственный вектор" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Hardware" msgstr "аппаратные средства" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Software" msgstr "Программного обеспечения" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Mix" msgstr "Смешивание" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:71 msgid "Other" msgstr "Другие" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "Serial" msgstr "последовательный" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "USB" msgstr "USB" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "PCIE" msgstr "PCIE" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:70 msgid "Any" msgstr "Любые" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Common" msgstr "общий" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Open" msgstr "открыто" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Enroll" msgstr "зачислять" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Verify" msgstr "проверить" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Identify" msgstr "отождествлять" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Capture" msgstr "Захватить" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Search" msgstr "Поиск" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Clean" msgstr "чистый" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "GetFeatureList" msgstr "GetFeatureList" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Rename" msgstr "переименовывать" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Close" msgstr "Закрыть" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:76 msgid "" "Usage:\n" " biometric-auth-client BuiltinCommands ...\n" "\n" "BuiltinCommands:\n" " get-driver-list Get Driver List\n" " get-device-list Get Device List\n" " get-feature-list Get Feature List\n" " enroll Enroll Feature\n" " verify Verify Feature\n" " capture Capture Feature\n" " search Search Feature\n" " clean Clean Feature\n" " rename Rename Feature\n" "\n" "Options:\n" " -h, --help show this help message and exit\n" msgstr "" "Использование:\n" " biometric-auth-client BuiltinCommands ...\n" "\n" "BuiltinCommands:\n" " get-driver-list Получить список драйверов\n" " получить список устройств Получить список устройств\n" " get-feature-list Получить список функций\n" " enroll Enroll Feature\n" " проверить Verify Feature\n" " capture Capture Feature\n" " search Функция поиска\n" " clean Clean Feature\n" " переименовать функцию Rename\n" "\n" "Options:\n" " -h, --help показать это справочное сообщение и выйти\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:116 msgid "non-existent user" msgstr "несуществующий пользователь" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:152 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:170 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:189 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:223 msgid "The device is busy, please try again later" msgstr "Устройство занято, повторите попытку позже" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:158 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:176 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:195 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:229 msgid "No permission to perform this operation" msgstr "Нет разрешения на выполнение этой операции" # c-format #: ../src/utils/biometric-auth-client/biometric-auth-client.in:179 #, c-format msgid "Character string: %s\n" msgstr "Строка символов: %s\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "No." msgstr "Нет." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User ID" msgstr "Идентификатор пользователя" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User Name" msgstr "Имя пользователя" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:452 msgid "Feature Index" msgstr "Индекс функций" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:391 msgid "Feature Name" msgstr "Название функции" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:212 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:250 msgid "List of features found:" msgstr "Список функций:" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:347 msgid "Biometric Type" msgstr "Биометрический тип" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver Name" msgstr "Имя драйвера" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:271 msgid "Show all fields (Highest priority)" msgstr "Показать все поля (Наивысший приоритет)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:273 msgid "Show 'Driver Full Name' fields" msgstr "Показывать поля «Полное имя драйвера»" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:275 msgid "Show 'Biometric Type' fields" msgstr "Показать поля «Биометрический тип»" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:277 msgid "Show 'Storge Type' fields" msgstr "Показать поля «Тип хранилища»" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:279 msgid "Show 'Eigen Type' fields" msgstr "Показать поля «Eigen Type»" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:281 msgid "Show 'Verify Type' fields" msgstr "Показывать поля «Проверить тип»" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:283 msgid "Show 'Identify Type' fields" msgstr "Показать поля «Определить тип»" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver ID" msgstr "ID драйвера" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:342 msgid "Driver Full Name" msgstr "Полное имя драйвера" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:344 msgid "Status" msgstr "Положение дел" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:350 msgid "Storge Type" msgstr "Тип Storge" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:353 msgid "Eigen Type" msgstr "Eigen Type" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:356 msgid "Verify Type" msgstr "Проверить тип" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:359 msgid "Identify Type" msgstr "Определить тип" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:361 msgid "Bus Type" msgstr "Тип шины" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:294 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:411 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:472 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:525 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:590 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:656 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:714 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:778 msgid "Biometric identification backend framework service is not started" msgstr "" "Служба бэкэнд-идентификации биометрической идентификации не запускается" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:300 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:419 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:480 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:533 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:598 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:664 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:722 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:786 msgid "" "Client APP_API is newer than biometric identification framework service. " "Please upgrade framework service or degrade client.\n" msgstr "" "Клиент APP_API является новее, чем служба фреймворческой идентификации. " "Обновите службу инфраструктуры или деградируйте клиента.\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:304 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:423 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:484 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:537 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:602 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:668 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:726 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:790 msgid "" "Client APP_API is older than biometric identification framework service. " "Please degrade framework service or upgrade client.\n" msgstr "" "Клиент APP_API старше, чем служба оценки биометрической идентификации. " "Пожалуйста, деградируйте сервис-сервис инфраструктуры или обновления.\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:383 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:387 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:448 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:627 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:693 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:751 #, c-format msgid "User Name (Default is current user: %s)" msgstr "Имя пользователя (по умолчанию - текущий пользователь: %s )" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:389 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:450 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:509 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:564 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:629 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:695 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:753 msgid "Driver(or Device) ID" msgstr "Идентификатор драйвера (или устройства)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:401 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:462 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:515 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:580 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:641 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:704 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:768 msgid "Input parameter error\n" msgstr "Ошибка входного параметра\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:444 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:623 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -i ИНДЕКС" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:505 #, c-format msgid "%s %s -d DRIVER_ID" msgstr "%s %s -d DRIVER_ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:558 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:562 msgid "User Name (Not set to search for all users)" msgstr "Имя пользователя (не для поиска для всех пользователей)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:566 msgid "Start of Feature Index (default 0)" msgstr "Начало индекса функции (по умолчанию 0)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:568 msgid "End of Feature Index (default -1, means search all)" msgstr "End of Feature Index (по умолчанию -1, означает поиск всех)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:631 msgid "The Feature Index You Want To Delete (-1 means delete all)" msgstr "Индекс функций, который вы хотите удалить (-1 означает удаление всех)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:689 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:747 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:755 msgid "The Feature Index that needs to be renamed" msgstr "Индекс функций, который необходимо переименовать" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:757 msgid "New Feature Name" msgstr "Новое имя функции" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:814 msgid "" "The abort operation failed and the current operation will continue in the " "background." msgstr "" "Операция отмены завершилась неудачно, и текущая операция будет продолжена в " "фоновом режиме." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:815 msgid "The device may have to wait a while before being used." msgstr "" "Возможно, устройству придется подождать некоторое время, прежде чем его " "использовать." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:816 msgid "" "The wait problem can be solved by restarting the biometrics backend " "framework service." msgstr "" "Проблема ожидания может быть решена путем перезапуска службы фреймворка базы " "данных биометрии." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:860 #, c-format msgid "Unknown Builtin Commands: %s\n" msgstr "Неизвестные команды: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:39 msgid "When there is a driver of the same name, force to override it" msgstr "Когда есть драйвер с тем же именем, принудительно его переопределить" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:41 msgid "Only add driver and Not enable driver" msgstr "Добавлять драйвер и не включать драйвер" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:52 msgid "DriverName DriverFilePath" msgstr "DriverName DriverFilePath" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:61 #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:75 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:280 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:64 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:78 #, c-format msgid "Error parsing commandline options: %s\n" msgstr "Ошибка анализа параметров командной строки: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:74 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:77 msgid "The number of parameters is incorrect" msgstr "Количество параметров неверно." #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:86 #, c-format msgid "" "This driver already exists, using the -f parameter if you need to override " "the configuration\n" msgstr "" "Этот драйвер уже существует, используя параметр -f, если вам нужно " "переопределить конфигурацию\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:104 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:96 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:93 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:124 #, c-format msgid "Write configuration failure: %s\n" msgstr "Ошибка конфигурации записи: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:38 msgid "Ignore nonexistent drivers" msgstr "Игнорировать несуществующие драйверы" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:48 msgid "Driver1 [Driver2 ...]" msgstr "Driver1 [Driver2 ...]" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:79 #, c-format msgid "" "Driver %s does not exist, if you need to ignore the problem, use -i " "parameter\n" msgstr "" "Драйвер %s не существует, если вам нужно игнорировать проблему, используйте " "параметр -i\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:53 msgid "Add driver" msgstr "Добавить драйвер" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:54 msgid "Remove drive" msgstr "Удалить привод" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:55 msgid "Enable driver" msgstr "Включить драйвер" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:56 msgid "Disable driver" msgstr "Отключить драйвер" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:57 msgid "Set the key value of the specified driver" msgstr "Задайте значение ключа указанного драйвера" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:58 msgid "remove the key value of the specified driver" msgstr "удалить значение ключа указанного драйвера" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:105 msgid "BuiltinCommands" msgstr "BuiltinCommands" #. g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:108 msgid "Builtin commands: " msgstr "Встроенные команды: " #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:222 #, c-format msgid "Unknown command %s" msgstr "Неизвестная команда %s" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:231 msgid "Missing builtin command" msgstr "Отсутствует встроенная команда" #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:48 msgid "DriverName Key" msgstr "Ключ DriverName" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:41 msgid "Forcibly overrides the existing key" msgstr "Принудительно отменяет существующий ключ" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:43 msgid "Ignore this setting if the key already exists" msgstr "Игнорируйте этот параметр, если ключ уже существует" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:55 msgid "DriverName Key Value" msgstr "Значение ключа DriverName" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:98 #, c-format msgid "Driver %s does not exist\n" msgstr "Драйвер %s не существует\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:108 #, c-format msgid "" "The key already exists and is not forcibly overwritten, ignoring the setting " "operation\n" "If you want to ignore this error, use the \"-i\" parameter\n" msgstr "" "Ключ уже существует и не перезаписывается принудительно, игнорируя операцию " "установки\n" "Если вы хотите проигнорировать эту ошибку, используйте параметр \"-i\"\n" #: ../src/utils/biometric-device-discover/community-multidevice/community_multidevice_discover_tool.c:119 #, c-format msgid "Failed to initialize libfprint\n" msgstr "Не удалось инициализировать libfprint\n" biometric-authentication/po/POTFILES.in0000644000175000017500000000526613755706021016702 0ustar fengfengsrc/biometric-authenticationd.c src/biometric-authenticationd.h src/biometric-dbus-common.h src/biometric-dbus-common.c src/dbus_comm.h src/lib/biometric_common.c src/lib/biometric_common.h src/lib/biometric_config.c src/lib/biometric_config.h src/lib/biometric_storage.c src/lib/biometric_storage.h src/lib/biometric_version.c src/lib/biometric_version.h src/drivers/community-multidevice/community_define.h src/drivers/community-multidevice/community_ops.c src/drivers/community-multidevice/community_ops.h src/drivers/community-multidevice/drivers/aes1610.c src/drivers/community-multidevice/drivers/aes1660.c src/drivers/community-multidevice/drivers/aes2501.c src/drivers/community-multidevice/drivers/aes2550.c src/drivers/community-multidevice/drivers/aes2660.c src/drivers/community-multidevice/drivers/aes3500.c src/drivers/community-multidevice/drivers/aes4000.c src/drivers/community-multidevice/drivers/elan.c src/drivers/community-multidevice/drivers/etes603.c src/drivers/community-multidevice/drivers/fdu2000.c src/drivers/community-multidevice/drivers/upeksonly.c src/drivers/community-multidevice/drivers/upektc.c src/drivers/community-multidevice/drivers/upektc_img.c src/drivers/community-multidevice/drivers/upekts.c src/drivers/community-multidevice/drivers/uru4000.c src/drivers/community-multidevice/drivers/vcom5s.c src/drivers/community-multidevice/drivers/vfs0050.c src/drivers/community-multidevice/drivers/vfs101.c src/drivers/community-multidevice/drivers/vfs301.c src/drivers/community-multidevice/drivers/vfs5011.c src/utils/biometric-auth-client/biometric-auth-client.in src/utils/biometric-config-tool/biometric-config-tool-add-driver.c src/utils/biometric-config-tool/biometric-config-tool-add-driver.h src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c src/utils/biometric-config-tool/biometric-config-tool-disable-driver.h src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c src/utils/biometric-config-tool/biometric-config-tool-enable-driver.h src/utils/biometric-config-tool/biometric-config-tool-main.c src/utils/biometric-config-tool/biometric-config-tool-main.h src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c src/utils/biometric-config-tool/biometric-config-tool-remove-driver.h src/utils/biometric-config-tool/biometric-config-tool-remove-key.c src/utils/biometric-config-tool/biometric-config-tool-remove-key.h src/utils/biometric-config-tool/biometric-config-tool-set-key.c src/utils/biometric-config-tool/biometric-config-tool-set-key.h src/utils/biometric-device-discover/community-multidevice/community_multidevice_discover_tool.c src/utils/biometric-device-discover/community-multidevice/community_multidevice_discover_tool.h biometric-authentication/po/es.po0000644000175000017500000016320613755706021016073 0ustar fengfeng# Spanish translations for biometric-authentication package. # Copyright (C) 2018 THE biometric-authentication'S COPYRIGHT HOLDER # This file is distributed under the same license as the biometric-authentication package. # droiing , 2018. # msgid "" msgstr "" "Project-Id-Version: biometric-authentication 0.9.62\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-07-31 11:01+0800\n" "PO-Revision-Date: 2018-11-01 15:39+0800\n" "Last-Translator: droiing \n" "Language-Team: Chinese (simplified)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7.1\n" #: ../src/biometric-authenticationd.c:304 #: ../src/biometric-authenticationd.c:382 #: ../src/biometric-authenticationd.c:571 #: ../src/biometric-authenticationd.c:676 #: ../src/biometric-authenticationd.c:792 #: ../src/biometric-authenticationd.c:872 #: ../src/biometric-authenticationd.c:1010 #: ../src/biometric-authenticationd.c:1173 #: ../src/biometric-authenticationd.c:1280 #: ../src/biometric-authenticationd.c:1357 #: ../src/biometric-authenticationd.c:1485 #: ../src/biometric-authenticationd.c:1656 #, c-format msgid "Can't create thread: %s\n" msgstr "No se puede crear el hilo: %s\n" #: ../src/biometric-authenticationd.c:503 #, c-format msgid "" "Framework automatically assigns the free index '%d' to driver %s user %d\n" msgstr "" "Framework asigna automáticamente el índice libre '%d' al usuario %s del " "controlador %d \n" #: ../src/biometric-authenticationd.c:511 msgid "Enroll Result: Success\n" msgstr "Resultado de la inscripción: éxito\n" #: ../src/biometric-authenticationd.c:514 msgid "Enroll Result: Fail\n" msgstr "Resultado de la inscripción: Error\n" #: ../src/biometric-authenticationd.c:618 msgid "Verify Result: Match\n" msgstr "Verificar resultado: Coincidencia\n" #: ../src/biometric-authenticationd.c:622 msgid "Verify Result: No Match\n" msgstr "Verificar resultado: No hay coincidencia\n" #: ../src/biometric-authenticationd.c:727 #, c-format msgid "Identify Result: UID = %d\n" msgstr "Identifique el resultado: UID = %d\n" #: ../src/biometric-authenticationd.c:731 msgid "Identify Result: No Match\n" msgstr "Identificar el resultado: No hay coincidencia\n" #: ../src/biometric-authenticationd.c:829 #, c-format msgid "Capture Result: %.*s\n" msgstr "Resultado de captura: %.*s\n" #: ../src/biometric-authenticationd.c:832 msgid "Capture Result: ERROR\n" msgstr "Resultado de captura: ERROR\n" #: ../src/biometric-authenticationd.c:1032 #, c-format msgid "%s Clean Result: Success\n" msgstr "%s Resultado limpio: éxito\n" #: ../src/biometric-authenticationd.c:1035 #, c-format msgid "%s Clean Result: Failed\n" msgstr "%s Resultado limpio: Falló\n" #. 系统层清理进行彻底的清理,免受当前不可用设备遗留的生物特征信息影响 #: ../src/biometric-authenticationd.c:1103 msgid "" "System level cleaning of the specified range of biometric features (all " "drivers)\n" msgstr "" "Limpieza a nivel del sistema de la gama especificada de características " "biométricas (todos los controladores)\n" #: ../src/biometric-authenticationd.c:1111 msgid "System level Clean Result: Success\n" msgstr "Nivel de sistema Resultado limpio: éxito\n" #: ../src/biometric-authenticationd.c:1114 msgid "System level Clean Result: Failed\n" msgstr "Resultado limpio del nivel del sistema: Falló\n" #: ../src/biometric-authenticationd.c:1441 #, c-format msgid "Error: Failed to export object. Reason: %s\n" msgstr "Error: Error al exportar el objeto. Motivo: %s\n" #: ../src/biometric-authenticationd.c:1451 #, c-format msgid "name_acquired_cb called, Acquired bus name: %s\n" msgstr "nombre_acquirido_cb llamado, Nombre de bus adquirido: %s\n" #: ../src/biometric-authenticationd.c:1460 msgid "name_lost_cb called, Error: Failed to connect to dbus\n" msgstr "name_lost_cb called, Error: Error al conectarse a dbus\n" #: ../src/biometric-authenticationd.c:1462 #, c-format msgid "name_lost_cb called, Error: Failed to obtain bus name: %s\n" msgstr "name_lost_cb called, Error: Error al obtener el nombre del bus: %s\n" #: ../src/biometric-authenticationd.c:1470 msgid "run called in the server\n" msgstr "ejecutar llamado en el servidor\n" #: ../src/biometric-authenticationd.c:1487 #: ../src/biometric-authenticationd.c:1658 #, c-format msgid "New thread created: %s\n" msgstr "Nuevo hilo creado: %s\n" #. * init for usage of "g" types #. g_type_init(); #: ../src/biometric-authenticationd.c:1500 msgid "InitDBusCommunicationServer: Server started\n" msgstr "InitDBusCommunicationServer: servidor iniciado\n" #: ../src/biometric-authenticationd.c:1576 #, c-format msgid "libusb_handle_events failed: %s\n" msgstr "libusb_handle_events falló: %s\n" #: ../src/biometric-authenticationd.c:1593 msgid "" "The biometric authentication server failed to start, requiring administrator " "permission to start\n" msgstr "" "El servidor de autenticación biométrica no pudo iniciarse, requiriendo " "permiso de administrador para iniciarse\n" #: ../src/biometric-authenticationd.c:1616 #, c-format msgid "Can not open PID file: %s\n" msgstr "No se puede abrir el archivo PID: %s\n" #: ../src/biometric-authenticationd.c:1623 msgid "" "Biometric authentication server is running, Do not restart it repeatedly\n" msgstr "" "El servidor de autenticación biométrica se está ejecutando, no lo reinicie " "repetidamente\n" #: ../src/biometric-authenticationd.c:1632 #, c-format msgid "There is an exception to write PID file: %s\n" msgstr "Hay una excepción para escribir el archivo PID: %s\n" #: ../src/biometric-authenticationd.c:1640 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:155 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:173 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:192 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:226 msgid "No such device" msgstr "Hay tal dispositivo" #: ../src/biometric-authenticationd.c:1641 msgid "Device busy" msgstr "Dispositivo ocupado" #: ../src/biometric-authenticationd.c:1646 msgid "Initial biometric recognition framework failed\n" msgstr "Falló el marco de reconocimiento biométrico inicial\n" #: ../src/biometric-dbus-common.c:51 #, c-format msgid "" "The UID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "" "No se pudo obtener la información UID del solicitante (%s). Error:%s \n" #: ../src/biometric-dbus-common.c:87 #, c-format msgid "" "The PID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "" "La información PID del solicitante (%s) no se pudo obtener. Error:%s \n" #: ../src/lib/biometric_common.c:170 msgid "Current driver list:" msgstr "Lista de controladores actuales:" #: ../src/lib/biometric_common.c:208 msgid "Current device list:" msgstr "Lista de dispositivos actual:" #: ../src/lib/biometric_common.c:267 ../src/lib/biometric_common.c:285 #: ../src/lib/biometric_common.c:331 ../src/lib/biometric_config.c:39 #, c-format msgid "Error[%d]: %s\n" msgstr "Error [%d]: %s\n" #: ../src/lib/biometric_common.c:311 msgid "" "can't find \"bioconf\" struct, maybe someone forget use \"bio_conf_init()\" " "before\n" msgstr "" "no puedo encontrar la estructura \"bioconf\", tal vez alguien olvide usar " "\"bio_conf_init ()\" antes de\n" #: ../src/lib/biometric_common.c:323 ../src/lib/biometric_storage.c:229 #: ../src/lib/biometric_storage.c:300 ../src/lib/biometric_storage.c:367 #: ../src/lib/biometric_storage.c:409 ../src/lib/biometric_storage.c:597 msgid "Unable to allocate memory\n" msgstr "No se puede asignar memoria\n" #: ../src/lib/biometric_common.c:338 #, c-format msgid "No define driver in [%s]\n" msgstr "No definir controlador en [%s]\n" #: ../src/lib/biometric_common.c:351 #, c-format msgid "Loaded Driver: %s\n" msgstr "Controlador cargado: %s\n" #: ../src/lib/biometric_common.c:360 #, c-format msgid "%s driver configure failed\n" msgstr "Error de configuración del controlador %s\n" #. 检测驱动版本兼容性 #: ../src/lib/biometric_common.c:368 #, c-format msgid "%s driver DRV_API version: %d.%d.%d\n" msgstr "Versión del controlador DRV_API de %s: %d.%d.%d\n" #: ../src/lib/biometric_common.c:380 #, c-format msgid "" "Detected Compatibility issues: %s driver version is higher than biometric " "framework\n" msgstr "" "Problemas de compatibilidad detectados: %s versión del controlador es más " "alta que el marco biométrico\n" #: ../src/lib/biometric_common.c:384 #, c-format msgid "" "Detected Compatibility issues: %s driver version is lower than biometric " "framework\n" msgstr "" "Problemas de compatibilidad detectados: %s versión del controlador es más " "baja que el marco biométrico\n" #: ../src/lib/biometric_common.c:395 #, c-format msgid "Driver %s initialization failed\n" msgstr "Falló la inicialización del controlador %s\n" #: ../src/lib/biometric_common.c:430 msgid "Error: Can not register attach callback error\n" msgstr "Error: No se puede registrar adjuntar error de devolución de llamada\n" #: ../src/lib/biometric_common.c:443 msgid "Error: Can not register detach callback error\n" msgstr "" "Error: no se puede registrar el error de devolución de llamada de " "desvinculación\n" #: ../src/lib/biometric_common.c:494 msgid "Biometric framework API version:\n" msgstr "Versión del API del marco biométrico:\n" #: ../src/lib/biometric_common.c:495 #, c-format msgid " Driver API(DRV_API): %d.%d.%d\n" msgstr " API del controlador (DRV_API): %d.%d.%d\n" #: ../src/lib/biometric_common.c:499 #, c-format msgid " Application API(APP_API): %d.%d.%d\n" msgstr " Aplicación API (APP_API): %d.%d.%d\n" #: ../src/lib/biometric_common.c:506 msgid "bio_conf_init failed\n" msgstr "bio_conf_init fallido\n" #: ../src/lib/biometric_common.c:522 #, c-format msgid "failed to initialise libusb: %s\n" msgstr "Error al inicializar libusb: %s\n" #: ../src/lib/biometric_common.c:570 ../src/lib/biometric_common.c:616 #: ../src/lib/biometric_common.c:660 ../src/lib/biometric_common.c:706 #: ../src/lib/biometric_common.c:754 ../src/lib/biometric_common.c:798 #: ../src/lib/biometric_common.c:848 ../src/lib/biometric_common.c:890 #, c-format msgid "Open Result: %d\n" msgstr "Resultado abierto: %d\n" #: ../src/lib/biometric_common.c:586 ../src/lib/biometric_common.c:632 #: ../src/lib/biometric_common.c:676 ../src/lib/biometric_common.c:722 #: ../src/lib/biometric_common.c:770 ../src/lib/biometric_common.c:814 #: ../src/lib/biometric_common.c:857 #, c-format msgid "Close Device: %s\n" msgstr "Cerrar dispositivo: %s\n" #: ../src/lib/biometric_common.c:587 ../src/lib/biometric_common.c:633 #: ../src/lib/biometric_common.c:677 ../src/lib/biometric_common.c:723 #: ../src/lib/biometric_common.c:771 ../src/lib/biometric_common.c:815 #: ../src/lib/biometric_common.c:858 #, c-format msgid "Device Status: [%d]%s\n" msgstr "Estado del dispositivo: [%d] %s\n" #: ../src/lib/biometric_common.c:627 ../src/lib/biometric_common.c:717 #: ../src/lib/biometric_common.c:765 #, c-format msgid "%s\n" msgstr "%s\n" #: ../src/lib/biometric_common.c:1056 ../src/lib/biometric_common.c:1247 msgid "Device idle" msgstr "Dispositivo inactivo" #: ../src/lib/biometric_common.c:1058 msgid "Device is in process" msgstr "El dispositivo está en proceso" #: ../src/lib/biometric_common.c:1060 msgid "Terminating current operation" msgstr "Terminando la operación actual" #: ../src/lib/biometric_common.c:1062 msgid "Device is disabled" msgstr "El dispositivo esta deshabilitado" #: ../src/lib/biometric_common.c:1065 msgid "Opening device" msgstr "Dispositivo de apertura" #: ../src/lib/biometric_common.c:1067 msgid "Terminating open operation" msgstr "Terminar la operación abierta" #: ../src/lib/biometric_common.c:1070 msgid "Enrolling" msgstr "Inscribirse" #: ../src/lib/biometric_common.c:1072 msgid "Terminating enroll operation" msgstr "Terminando la operación de inscripción" #: ../src/lib/biometric_common.c:1075 msgid "Verifying" msgstr "Verificando" #: ../src/lib/biometric_common.c:1077 msgid "Terminating Verify operation" msgstr "Terminar verificar la operación" #: ../src/lib/biometric_common.c:1080 msgid "Identifying" msgstr "Identificando" #: ../src/lib/biometric_common.c:1082 msgid "Terminating identify operation" msgstr "Terminando la operación de identificación" #: ../src/lib/biometric_common.c:1085 msgid "Capturing" msgstr "Capturando" #: ../src/lib/biometric_common.c:1087 msgid "Terminating capture operation" msgstr "Terminando la operación de captura" #: ../src/lib/biometric_common.c:1090 msgid "Searching" msgstr "buscando" #: ../src/lib/biometric_common.c:1092 msgid "Terminating search operation" msgstr "Terminando la operación de búsqueda" #: ../src/lib/biometric_common.c:1095 msgid "Cleaning" msgstr "Limpieza" #: ../src/lib/biometric_common.c:1097 msgid "Terminating clean operation" msgstr "Terminar la operación limpia" #: ../src/lib/biometric_common.c:1100 msgid "Getting feature list" msgstr "Obtención de lista de características" #: ../src/lib/biometric_common.c:1102 msgid "Terminating get feature list operation" msgstr "Terminar la operación de obtener la lista de características" #: ../src/lib/biometric_common.c:1105 msgid "Renaming feature" msgstr "Característica de cambio de nombre" #: ../src/lib/biometric_common.c:1107 msgid "Terminating feature rename operation" msgstr "Operación de cambio de nombre de la función de terminación" #: ../src/lib/biometric_common.c:1110 msgid "Closing" msgstr "Clausura" #: ../src/lib/biometric_common.c:1112 msgid "Terminating close operation" msgstr "Terminar la operación de cierre" #: ../src/lib/biometric_common.c:1115 #, c-format msgid "Device unknown status code: %d\n" msgstr "Código de estado desconocido del dispositivo: %d\n" #: ../src/lib/biometric_common.c:1116 msgid "Device is in an unknown status..." msgstr "El dispositivo está en un estado desconocido ..." #: ../src/lib/biometric_common.c:1128 msgid "Operation successful" msgstr "Operación exitosa" #: ../src/lib/biometric_common.c:1130 ../src/lib/biometric_common.c:1249 msgid "Operation failed" msgstr "Operación fallida" #: ../src/lib/biometric_common.c:1132 ../src/lib/biometric_common.c:1251 msgid "An error was encountered during the operation" msgstr "Se encontró un error durante la operación." #: ../src/lib/biometric_common.c:1134 ../src/lib/biometric_common.c:1253 msgid "The operation was interrupted by the user" msgstr "La operación fue interrumpida por el usuario." #: ../src/lib/biometric_common.c:1136 ../src/lib/biometric_common.c:1255 msgid "Operation timeout" msgstr "Tiempo de expiración de operación" #: ../src/lib/biometric_common.c:1138 ../src/lib/biometric_common.c:1259 msgid "Out of memory" msgstr "Sin memoria" #: ../src/lib/biometric_common.c:1141 ../src/lib/biometric_common.c:1264 msgid "Open device completion" msgstr "Completar dispositivo abierto" #: ../src/lib/biometric_common.c:1143 ../src/lib/biometric_common.c:1266 msgid "Open device failed" msgstr "Dispositivo abierto falló" #: ../src/lib/biometric_common.c:1145 ../src/lib/biometric_common.c:1268 msgid "An error was encountered during the opening" msgstr "Se encontró un error durante la apertura." #: ../src/lib/biometric_common.c:1148 ../src/lib/biometric_common.c:1271 msgid "Enroll feature successful" msgstr "Característica de inscripción exitosa" #: ../src/lib/biometric_common.c:1150 ../src/lib/biometric_common.c:1273 msgid "Enroll feature failed" msgstr "Falló la función de inscripción" #: ../src/lib/biometric_common.c:1152 ../src/lib/biometric_common.c:1275 msgid "An error was encountered during enrolling" msgstr "Se encontró un error durante la inscripción" #: ../src/lib/biometric_common.c:1154 ../src/lib/biometric_common.c:1277 msgid "Enroll operation was interrupted by the user" msgstr "La operación de inscripción fue interrumpida por el usuario" #: ../src/lib/biometric_common.c:1156 ../src/lib/biometric_common.c:1279 msgid "Enroll operation timeout" msgstr "Tiempo de espera de la operación de inscripción" #: ../src/lib/biometric_common.c:1159 ../src/lib/biometric_common.c:1282 msgid "Verify feature match" msgstr "Verificar la coincidencia de características" #: ../src/lib/biometric_common.c:1161 ../src/lib/biometric_common.c:1284 msgid "Verify feature no match" msgstr "Verifique que la característica no coincida" #: ../src/lib/biometric_common.c:1163 ../src/lib/biometric_common.c:1286 msgid "An error was encountered during verifying" msgstr "Se ha encontrado un error durante la verificación." #: ../src/lib/biometric_common.c:1165 ../src/lib/biometric_common.c:1288 msgid "Verify operation was interrupted by the user" msgstr "Verificar que la operación fue interrumpida por el usuario." #: ../src/lib/biometric_common.c:1167 ../src/lib/biometric_common.c:1290 msgid "Verify operation timeout" msgstr "Verifique el tiempo de espera de la operación" #: ../src/lib/biometric_common.c:1170 ../src/lib/biometric_common.c:1293 msgid "Identify feature match" msgstr "Identificar coincidencia de características" #: ../src/lib/biometric_common.c:1172 ../src/lib/biometric_common.c:1295 msgid "Identify feature no match" msgstr "Identificar la característica no coincide" #: ../src/lib/biometric_common.c:1174 ../src/lib/biometric_common.c:1297 msgid "An error was encountered during identifying" msgstr "Se encontró un error durante la identificación" #: ../src/lib/biometric_common.c:1176 ../src/lib/biometric_common.c:1299 msgid "Identify operation was interrupted by the user" msgstr "La operación de identificación fue interrumpida por el usuario" #: ../src/lib/biometric_common.c:1178 ../src/lib/biometric_common.c:1301 msgid "Identify operation timeout" msgstr "Identificar tiempo de espera de operación" #: ../src/lib/biometric_common.c:1181 ../src/lib/biometric_common.c:1304 msgid "Capture feature successful" msgstr "Función de captura exitosa" #: ../src/lib/biometric_common.c:1183 ../src/lib/biometric_common.c:1306 msgid "Capture feature failed" msgstr "La característica de captura falló" #: ../src/lib/biometric_common.c:1185 ../src/lib/biometric_common.c:1308 msgid "An error was encountered during capturing" msgstr "Se encontró un error durante la captura." #: ../src/lib/biometric_common.c:1187 ../src/lib/biometric_common.c:1310 msgid "Capture operation was interrupted by the user" msgstr "La operación de captura fue interrumpida por el usuario" #: ../src/lib/biometric_common.c:1189 ../src/lib/biometric_common.c:1312 msgid "Capture operation timeout" msgstr "Tiempo de espera de la operación de captura" #: ../src/lib/biometric_common.c:1192 ../src/lib/biometric_common.c:1315 msgid "Find the specified features" msgstr "Encuentra las características especificadas" #: ../src/lib/biometric_common.c:1194 ../src/lib/biometric_common.c:1317 msgid "No specified features were found" msgstr "No se encontraron características específicas" #: ../src/lib/biometric_common.c:1196 ../src/lib/biometric_common.c:1319 msgid "An error was encountered during searching" msgstr "Se encontró un error durante la búsqueda" #: ../src/lib/biometric_common.c:1198 ../src/lib/biometric_common.c:1321 msgid "Search operation was interrupted by the user" msgstr "La operación de búsqueda fue interrumpida por el usuario" #: ../src/lib/biometric_common.c:1200 ../src/lib/biometric_common.c:1323 msgid "Search operation timeout" msgstr "Tiempo de espera de la operación de búsqueda" #: ../src/lib/biometric_common.c:1203 ../src/lib/biometric_common.c:1326 msgid "Clean feature successful" msgstr "Característica limpia exitosa" #: ../src/lib/biometric_common.c:1205 ../src/lib/biometric_common.c:1328 msgid "Clean feature failed" msgstr "La función de limpieza falló" #: ../src/lib/biometric_common.c:1207 ../src/lib/biometric_common.c:1330 msgid "An error was encountered during cleaning" msgstr "Se encontró un error durante la limpieza." #: ../src/lib/biometric_common.c:1209 ../src/lib/biometric_common.c:1332 msgid "Clean operation was interrupted by the user" msgstr "La operación limpia fue interrumpida por el usuario" #: ../src/lib/biometric_common.c:1211 ../src/lib/biometric_common.c:1334 msgid "Clean operation timeout" msgstr "Tiempo de espera de operación limpia" #: ../src/lib/biometric_common.c:1214 ../src/lib/biometric_common.c:1337 msgid "Get feature list completion" msgstr "Obtener la lista de características completa" #: ../src/lib/biometric_common.c:1216 ../src/lib/biometric_common.c:1339 msgid "Get feature list failed" msgstr "Obtener lista de características fallada" #: ../src/lib/biometric_common.c:1218 ../src/lib/biometric_common.c:1341 msgid "An error was encountered during getting feature list" msgstr "Se encontró un error al obtener la lista de características" #: ../src/lib/biometric_common.c:1221 ../src/lib/biometric_common.c:1344 msgid "Rename feature successful" msgstr "Renombrar función exitosa" #: ../src/lib/biometric_common.c:1223 ../src/lib/biometric_common.c:1346 msgid "Rename feature failed" msgstr "La función de cambio de nombre falló" #: ../src/lib/biometric_common.c:1225 ../src/lib/biometric_common.c:1348 msgid "An error was encountered during renaming" msgstr "Se encontró un error durante el cambio de nombre" #: ../src/lib/biometric_common.c:1228 ../src/lib/biometric_common.c:1353 msgid "Close device completion" msgstr "Cerrar dispositivo completo" #: ../src/lib/biometric_common.c:1230 ../src/lib/biometric_common.c:1355 msgid "Close device failed" msgstr "Cerrar dispositivo fallado" #: ../src/lib/biometric_common.c:1232 ../src/lib/biometric_common.c:1357 msgid "An error was encountered during closing" msgstr "Se encontró un error durante el cierre." #: ../src/lib/biometric_common.c:1235 msgid "Operation is in an unknown status......" msgstr "La operación está en un estado desconocido ......" #: ../src/lib/biometric_common.c:1257 msgid "Device is disable" msgstr "El dispositivo esta deshabilitado" #: ../src/lib/biometric_common.c:1261 msgid "The device or driver does not support this operation" msgstr "El dispositivo o controlador no admite esta operación." #: ../src/lib/biometric_common.c:1350 msgid "Feature renaming is not complete, please try again" msgstr "El cambio de nombre de la función no está completo, inténtalo de nuevo" #: ../src/lib/biometric_common.c:1360 msgid "Device internal error" msgstr "Error interno del dispositivo" #: ../src/lib/biometric_common.c:1473 msgid "Init libusb Error\n" msgstr "Error de inicio de libusb\n" #: ../src/lib/biometric_common.c:1480 msgid "Get USB Device List Error\n" msgstr "Obtener error de lista de dispositivos USB\n" #: ../src/lib/biometric_common.c:1489 msgid "Can not get usb information\n" msgstr "No se puede obtener información del usb\n" #: ../src/lib/biometric_common.c:1506 #, c-format msgid "libbiometric detected usb device(%s): %d\n" msgstr "Libbiometric dispositivo usb detectado (%s): %d\n" #: ../src/lib/biometric_common.c:1747 #, c-format msgid "Get function %s handle error: %s\n" msgstr "Error en el manejo de la función %s : %s\n" #: ../src/lib/biometric_common.c:1764 msgid "Error: Can not get device descriptor\n" msgstr "Error: No se puede obtener el descriptor del dispositivo\n" #: ../src/lib/biometric_common.c:1767 #, c-format msgid "Device attached: %04x:%04x\n" msgstr "Dispositivo conectado: %04x:%04x\n" #: ../src/lib/biometric_common.c:1828 msgid "Error getting device descriptor" msgstr "Error al obtener el descriptor del dispositivo" #: ../src/lib/biometric_common.c:1831 #, c-format msgid "Device detached: %04x:%04x\n" msgstr "Dispositivo desconectado: %04x:%04x\n" #: ../src/lib/biometric_common.c:1957 msgid "Unable to find feature that require renaming\n" msgstr "No se puede encontrar la función que requiere el cambio de nombre\n" #: ../src/lib/biometric_common.c:1960 #, c-format msgid "There are %d feature samples to renaming failed, please try again\n" msgstr "" "Hay %d ejemplos de funciones para cambiar el nombre, inténtelo de nuevo\n" #: ../src/lib/biometric_storage.c:190 ../src/lib/biometric_storage.c:206 #: ../src/lib/biometric_storage.c:387 ../src/lib/biometric_storage.c:517 #: ../src/lib/biometric_storage.c:559 ../src/lib/biometric_storage.c:616 #: ../src/lib/biometric_storage.c:636 ../src/lib/biometric_storage.c:663 #: ../src/lib/biometric_storage.c:689 ../src/lib/biometric_storage.c:740 #: ../src/lib/biometric_storage.c:1046 ../src/lib/biometric_storage.c:1155 #: ../src/lib/biometric_storage.c:1169 #, c-format msgid "sqlite3 prepare err: %s\n" msgstr "sqlite3 prepare err: %s\n" #: ../src/lib/biometric_storage.c:198 #, c-format msgid "Unable to set database(%s) permissions. ERROR[%d]: %s\n" msgstr "" "No se pueden establecer permisos de la base de datos (%s). ERROR [%d]: %s\n" #: ../src/lib/biometric_storage.c:712 msgid "Check database format version ...\n" msgstr "Verifique la versión del formato de la base de datos ...\n" #: ../src/lib/biometric_storage.c:720 #, c-format msgid "Find Table '%s' Error: %s\n" msgstr "Error en la tabla ' %s ': %s\n" #: ../src/lib/biometric_storage.c:754 #, c-format msgid "Database format version is %d.%d.%d\n" msgstr "La versión del formato de la base de datos es %d.%d.%d\n" #: ../src/lib/biometric_storage.c:762 #, c-format msgid "Failed to upgrade database format:version %d.%d.%d to %d.%d.%d\n" msgstr "" "Error al actualizar el formato de la base de datos: versión %d.%d.%d a %d.%d." "%d\n" #: ../src/lib/biometric_storage.c:775 msgid "The database format is compatible with the current framework\n" msgstr "El formato de la base de datos es compatible con el marco actual\n" #: ../src/lib/biometric_storage.c:780 #, c-format msgid "" "Incompatible version of the database format: %d.%d.%d. Version required for " "the current framework: %d.%d.x" msgstr "" "Versión incompatible del formato de base de datos: %d.%d.%d. Versión " "requerida para el framework actual: %d.%d.x" #: ../src/lib/biometric_storage.c:886 #, c-format msgid "Create Biometric Datebase Directory (%s) Error\n" msgstr "Crear un directorio biométrico de base de datos (%s) Error\n" #: ../src/lib/biometric_storage.c:928 ../src/lib/biometric_storage.c:947 #: ../src/lib/biometric_storage.c:973 #, c-format msgid "Failure to modify the owner and group of %s. ERROR[%d]: %s\n" msgstr "Error al modificar el propietario y el grupo de %s . ERROR [%d]: %s\n" #: ../src/lib/biometric_storage.c:992 msgid "Upgrade database ...\n" msgstr "Actualizar base de datos ...\n" #: ../src/lib/biometric_storage.c:1002 #, c-format msgid "Rename Table 'EIGEN_INFO' to 'EIGEN_INFO_VERSION_0_0_0' Error: %s\n" msgstr "" "Cambie el nombre de la tabla 'EIGEN_INFO' a 'EIGEN_INFO_VERSION_0_0_0' " "Error: %s\n" #: ../src/lib/biometric_storage.c:1031 #, c-format msgid "Failed to migrate data from the original table: %s\n" msgstr "Error al migrar datos de la tabla original: %s\n" #: ../src/lib/biometric_storage.c:1061 #, c-format msgid "Update UUID=%s to database(UID=%d) ...\n" msgstr "Actualizar UUID = %s a la base de datos (UID = %d) ...\n" #: ../src/lib/biometric_storage.c:1068 #, c-format msgid "Update column \"UUID\" to Table \"%s\" Error: %s\n" msgstr "Actualizar la columna \"UUID \" a la tabla \"%s\" Error: %s\n" #: ../src/lib/biometric_storage.c:1111 ../src/lib/biometric_storage.c:1135 #, c-format msgid "" "Create Table %s:\n" "%s\n" msgstr "" "Crear tabla %s :\n" " %s\n" #: ../src/lib/biometric_storage.c:1115 ../src/lib/biometric_storage.c:1139 #, c-format msgid "Create Table '%s' Error: %s\n" msgstr "Error al crear la tabla '%s': %s\n" #: ../src/lib/biometric_storage.c:1147 #, c-format msgid "" "Set Database Format(%d.%d.%d):\n" "%s\n" msgstr "" "Establecer formato de base de datos (%d.%d.%d):\n" "%s\n" #: ../src/drivers/community-multidevice/community_ops.c:129 #, c-format msgid "Get AES Key File Error[%d]: %s, use default Key.\n" msgstr "Error de archivo de clave AES [%d]: %s, use la clave predeterminada.\n" #: ../src/drivers/community-multidevice/community_ops.c:142 #, c-format msgid "" "AES Key File (%s) does not Exist or has no Read Permission, use default " "key.\n" msgstr "" "El archivo de clave AES (%s) no existe o no tiene permiso de lectura, use la " "clave predeterminada.\n" #: ../src/drivers/community-multidevice/community_ops.c:159 #, c-format msgid "Can not open AES Key File: %s, use default key.\n" msgstr "" "No se puede abrir el archivo de clave AES: %s, use la clave predeterminada.\n" #: ../src/drivers/community-multidevice/community_ops.c:174 msgid "AES Key File is Enpty, use default Key.\n" msgstr "El archivo de clave AES es Enpty, use la clave predeterminada.\n" #: ../src/drivers/community-multidevice/community_ops.c:198 msgid "AES Key is Enpty, use default Key.\n" msgstr "La clave AES es Enpty, use la clave predeterminada.\n" #: ../src/drivers/community-multidevice/community_ops.c:234 #, c-format msgid "Detect %s device\n" msgstr "Detectar dispositivo %s\n" #: ../src/drivers/community-multidevice/community_ops.c:242 #: ../src/drivers/community-multidevice/community_ops.c:247 #, c-format msgid "No %s fingerprint device detected\n" msgstr "No se detectó el dispositivo de huella digital %s\n" #: ../src/drivers/community-multidevice/community_ops.c:251 #, c-format msgid "There is %d %s fingerprint device detected\n" msgstr "Se detectó el dispositivo de huella digital %d %s\n" #: ../src/drivers/community-multidevice/community_ops.c:277 #, c-format msgid "Device failed to open" msgstr "El dispositivo no se abrió" #: ../src/drivers/community-multidevice/community_ops.c:333 #: ../src/drivers/community-multidevice/community_ops.c:1089 #: ../src/drivers/community-multidevice/community_ops.c:1277 #, c-format msgid "Unknown error, error code: %d" msgstr "Error desconocido, código de error: %d" #: ../src/drivers/community-multidevice/community_ops.c:458 #: ../src/drivers/community-multidevice/community_ops.c:541 #: ../src/drivers/community-multidevice/community_ops.c:676 msgid "Find the following feature matching:\n" msgstr "Encuentra las siguientes características que coinciden:\n" #: ../src/drivers/community-multidevice/community_ops.c:625 #, c-format msgid "" "Search from offset %d, index %d has been searched, global index %d(%d + %d)\n" msgstr "" "Buscar desde el desplazamiento %d, índice %d se ha buscado, índice global %d " "(%d + %d)\n" #: ../src/drivers/community-multidevice/community_ops.c:630 #, c-format msgid "" "The %d feature has been searched(UID = %d, Index = %d, Index Name = %s), " "please press your finger to continue the search" msgstr "" "Se ha buscado la función %d (UID = %d, Índice = %d, Nombre del índice = %s), " "presione su dedo para continuar la búsqueda" #: ../src/drivers/community-multidevice/community_ops.c:774 #, c-format msgid "Device %s[%d] received interrupt request\n" msgstr "El dispositivo %s [%d] recibió una solicitud de interrupción\n" #: ../src/drivers/community-multidevice/community_ops.c:819 msgid "Sample complete" msgstr "Muestra completa" #: ../src/drivers/community-multidevice/community_ops.c:821 msgid "" "Enrollment failed due to incomprehensible data. (Please use the same finger " "at different sampling stages of the same enroll)" msgstr "" "Inscripción fallida debido a datos incomprensibles. (Utilice el mismo dedo " "en diferentes etapas de muestreo de la misma inscripción)" #: ../src/drivers/community-multidevice/community_ops.c:825 msgid "" "Please place your finger again because of poor quality of the sample or " "other scanning problems" msgstr "" "Coloque el dedo nuevamente debido a la mala calidad de la muestra u otros " "problemas de escaneo" #: ../src/drivers/community-multidevice/community_ops.c:828 msgid "Your swipe was too short, please place your finger again." msgstr "Su golpe fue demasiado corto, por favor, vuelva a colocar el dedo." #: ../src/drivers/community-multidevice/community_ops.c:831 msgid "" "Didn't catch that, please center your finger on the sensor and try again." msgstr "No captó eso, centre el dedo en el sensor e inténtelo de nuevo." #: ../src/drivers/community-multidevice/community_ops.c:834 msgid "" "Because of the scanning image quality or finger pressure problem, the " "sampling failed, please remove the finger and retry" msgstr "" "Debido a la calidad de la imagen de escaneo o al problema de la presión del " "dedo, el muestreo falló, retire el dedo y vuelva a intentarlo" #: ../src/drivers/community-multidevice/community_ops.c:838 msgid "Unable to generate feature data, enroll failure" msgstr "No se pueden generar datos de características, inscriba fallas" #: ../src/drivers/community-multidevice/community_ops.c:840 msgid "" "Sample start, please press and lift your finger (Some devices need to swipe " "your finger)" msgstr "" "Inicio de la muestra, presione y levante el dedo (algunos dispositivos deben " "deslizar el dedo)" #: ../src/drivers/community-multidevice/community_ops.c:895 #, c-format msgid "Could not open device (driver %s)" msgstr "No se pudo abrir el dispositivo (controlador %s)" #: ../src/drivers/community-multidevice/community_ops.c:1064 #: ../src/drivers/community-multidevice/community_ops.c:1229 #, c-format msgid "Failed to call function %s\n" msgstr "Error al llamar a la función %s\n" #: ../src/drivers/community-multidevice/community_ops.c:1112 #, c-format msgid "" "Enroll failed: The feature was successfully sampled, but the encoding of the " "sampling feature could not be generated" msgstr "" "Falló la inscripción: la función se ha muestreado correctamente, pero no se " "pudo generar la codificación de la función de muestreo" #: ../src/drivers/community-multidevice/community_ops.c:1129 #, c-format msgid "" "The %d [%d/%d] sampling was successful, in the next sampling: please press " "and lift your finger (Some devices need to swipe your finger)" msgstr "" "La muestra %d [%d/%d] fue exitosa, en la siguiente muestra: presione y " "levante el dedo (algunos dispositivos deben deslizar el dedo)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Disable" msgstr "Inhabilitar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Enable" msgstr "Habilitar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Print" msgstr "Huella dactilar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Vein" msgstr "Vena del dedo" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Iris" msgstr "Iris" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Face" msgstr "Cara" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Voice Print" msgstr "Impresión de voz" # #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device" msgstr "Dispositivo" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "OS" msgstr "OS" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device and OS" msgstr "Dispositivo y sistema operativo" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Original Data" msgstr "Datos originales" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Value" msgstr "Valor propio" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Vector" msgstr "Vector propio" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Hardware" msgstr "Hardware" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Software" msgstr "Software" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Mix" msgstr "Mezcla" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:71 msgid "Other" msgstr "Otro" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "Serial" msgstr "De serie" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "USB" msgstr "USB" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "PCIE" msgstr "PCIE" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:70 msgid "Any" msgstr "Alguna" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Common" msgstr "Común" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Open" msgstr "Abierto" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Enroll" msgstr "Inscribirse" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Verify" msgstr "Verificar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Identify" msgstr "Identificar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Capture" msgstr "Capturar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Search" msgstr "Buscar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Clean" msgstr "Limpiar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "GetFeatureList" msgstr "GetFeatureList" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Rename" msgstr "Rebautizar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Close" msgstr "Cerrar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:76 msgid "" "Usage:\n" " biometric-auth-client BuiltinCommands ...\n" "\n" "BuiltinCommands:\n" " get-driver-list Get Driver List\n" " get-device-list Get Device List\n" " get-feature-list Get Feature List\n" " enroll Enroll Feature\n" " verify Verify Feature\n" " capture Capture Feature\n" " search Search Feature\n" " clean Clean Feature\n" " rename Rename Feature\n" "\n" "Options:\n" " -h, --help show this help message and exit\n" msgstr "" "Uso:\n" " biometric-auth-client BuiltinCommands ...\n" "\n" "BuiltinCommands:\n" " get-driver-list Get Driver List\n" " get-device-list Get Device List\n" " get-feature-list Obtener Feature List\n" " inscriba la función de inscripción\n" " verifique la función de verificación\n" " capture la función de captura\n" " busque la función de búsqueda\n" " limpie la función\n" " cambie el nombre de la función de cambio de nombre\n" "\n" "Opciones:\n" " -h, --help muestra este mensaje de ayuda y sale\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:116 msgid "non-existent user" msgstr "usuario inexistente" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:152 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:170 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:189 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:223 msgid "The device is busy, please try again later" msgstr "El dispositivo está ocupado, inténtalo de nuevo más tarde." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:158 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:176 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:195 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:229 msgid "No permission to perform this operation" msgstr "No hay permiso para realizar esta operación." # c-format #: ../src/utils/biometric-auth-client/biometric-auth-client.in:179 #, c-format msgid "Character string: %s\n" msgstr "Cadena de caracteres: %s\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "No." msgstr "No." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User ID" msgstr "ID de usuario" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User Name" msgstr "Nombre de usuario" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:452 msgid "Feature Index" msgstr "Índice de características" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:391 msgid "Feature Name" msgstr "Nombre de la característica" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:212 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:250 msgid "List of features found:" msgstr "Lista de características encontradas:" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:347 msgid "Biometric Type" msgstr "Tipo biometrico" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver Name" msgstr "Nombre del conductor" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:271 msgid "Show all fields (Highest priority)" msgstr "Mostrar todos los campos (prioridad más alta)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:273 msgid "Show 'Driver Full Name' fields" msgstr "Mostrar los campos de 'Nombre completo del conductor'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:275 msgid "Show 'Biometric Type' fields" msgstr "Mostrar campos 'Tipo biométrico'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:277 msgid "Show 'Storge Type' fields" msgstr "Mostrar campos 'Tipo de Storge'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:279 msgid "Show 'Eigen Type' fields" msgstr "Mostrar los campos 'Tipo Eigen'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:281 msgid "Show 'Verify Type' fields" msgstr "Mostrar los campos 'Verificar tipo'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:283 msgid "Show 'Identify Type' fields" msgstr "Mostrar los campos 'Identificar Tipo'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver ID" msgstr "ID de conductor" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:342 msgid "Driver Full Name" msgstr "Nombre completo del conductor" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:344 msgid "Status" msgstr "Estado" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:350 msgid "Storge Type" msgstr "Tipo de storge" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:353 msgid "Eigen Type" msgstr "Tipo propio" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:356 msgid "Verify Type" msgstr "Verificar el tipo" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:359 msgid "Identify Type" msgstr "Tipo de identificación" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:361 msgid "Bus Type" msgstr "Tipo de bus" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:294 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:411 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:472 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:525 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:590 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:656 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:714 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:778 msgid "Biometric identification backend framework service is not started" msgstr "" "No se ha iniciado el servicio de marco de backend de identificación " "biométrica." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:300 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:419 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:480 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:533 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:598 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:664 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:722 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:786 msgid "" "Client APP_API is newer than biometric identification framework service. " "Please upgrade framework service or degrade client.\n" msgstr "" "El cliente APP_API es más nuevo que el servicio de marco de identificación " "biométrica. Por favor, actualice el servicio de marco o degradar el " "cliente.\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:304 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:423 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:484 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:537 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:602 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:668 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:726 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:790 msgid "" "Client APP_API is older than biometric identification framework service. " "Please degrade framework service or upgrade client.\n" msgstr "" "El cliente APP_API es más antiguo que el servicio de marco de identificación " "biométrica. Por favor, degradar el servicio de marco o actualizar el " "cliente.\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:383 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:387 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:448 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:627 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:693 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:751 #, c-format msgid "User Name (Default is current user: %s)" msgstr "Nombre de usuario (el predeterminado es el usuario actual: %s)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:389 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:450 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:509 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:564 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:629 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:695 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:753 msgid "Driver(or Device) ID" msgstr "ID del controlador (o dispositivo)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:401 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:462 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:515 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:580 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:641 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:704 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:768 msgid "Input parameter error\n" msgstr "Error de parámetro de entrada\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:444 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:623 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:505 #, c-format msgid "%s %s -d DRIVER_ID" msgstr "%s %s -d DRIVER_ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:558 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:562 msgid "User Name (Not set to search for all users)" msgstr "Nombre de usuario (no configurado para buscar todos los usuarios)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:566 msgid "Start of Feature Index (default 0)" msgstr "Inicio del índice de características (predeterminado 0)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:568 msgid "End of Feature Index (default -1, means search all)" msgstr "" "Fin del índice de características (predeterminado -1, significa buscar todo)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:631 msgid "The Feature Index You Want To Delete (-1 means delete all)" msgstr "El índice de funciones que desea eliminar (-1 significa eliminar todo)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:689 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:747 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:755 msgid "The Feature Index that needs to be renamed" msgstr "El índice de características que necesita ser renombrado" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:757 msgid "New Feature Name" msgstr "Nombre de la nueva característica" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:814 msgid "" "The abort operation failed and the current operation will continue in the " "background." msgstr "" "La operación de cancelación falló y la operación actual continuará en " "segundo plano." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:815 msgid "The device may have to wait a while before being used." msgstr "" "El dispositivo puede tener que esperar un tiempo antes de ser utilizado." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:816 msgid "" "The wait problem can be solved by restarting the biometrics backend " "framework service." msgstr "" "El problema de la espera se puede resolver reiniciando el servicio de marco " "de respaldo biométrico." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:860 #, c-format msgid "Unknown Builtin Commands: %s\n" msgstr "Comandos incorporados desconocidos: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:39 msgid "When there is a driver of the same name, force to override it" msgstr "Cuando hay un controlador del mismo nombre, forzar para anularlo" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:41 msgid "Only add driver and Not enable driver" msgstr "Solo agregar controlador y No habilitar controlador" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:52 msgid "DriverName DriverFilePath" msgstr "DriverName DriverFilePath" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:61 #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:75 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:280 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:64 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:78 #, c-format msgid "Error parsing commandline options: %s\n" msgstr "Error al analizar las opciones de la línea de comandos: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:74 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:77 msgid "The number of parameters is incorrect" msgstr "El número de parámetros es incorrecto." #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:86 #, c-format msgid "" "This driver already exists, using the -f parameter if you need to override " "the configuration\n" msgstr "" "Este controlador ya existe, utilizando el parámetro -f si necesita anular la " "configuración\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:104 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:96 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:93 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:124 #, c-format msgid "Write configuration failure: %s\n" msgstr "Error de configuración de escritura: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:38 msgid "Ignore nonexistent drivers" msgstr "Ignorar los controladores inexistentes" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:48 msgid "Driver1 [Driver2 ...]" msgstr "Driver1 [Driver2 ...]" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:79 #, c-format msgid "" "Driver %s does not exist, if you need to ignore the problem, use -i " "parameter\n" msgstr "" "El controlador %s no existe, si necesita ignorar el problema, use el " "parámetro -i\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:53 msgid "Add driver" msgstr "Añadir controlador" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:54 msgid "Remove drive" msgstr "Quitar la unidad" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:55 msgid "Enable driver" msgstr "Habilitar controlador" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:56 msgid "Disable driver" msgstr "Deshabilitar conductor" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:57 msgid "Set the key value of the specified driver" msgstr "Establecer el valor clave del controlador especificado" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:58 msgid "remove the key value of the specified driver" msgstr "eliminar el valor clave del controlador especificado" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:105 msgid "BuiltinCommands" msgstr "BuiltinCommands" #. g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:108 msgid "Builtin commands: " msgstr "Comandos incorporados: " #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:222 #, c-format msgid "Unknown command %s" msgstr "Comando desconocido %s" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:231 msgid "Missing builtin command" msgstr "Falta el comando incorporado" #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:48 msgid "DriverName Key" msgstr "Clave de DriverName" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:41 msgid "Forcibly overrides the existing key" msgstr "Anula a la fuerza la clave existente" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:43 msgid "Ignore this setting if the key already exists" msgstr "Ignora esta configuración si la clave ya existe" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:55 msgid "DriverName Key Value" msgstr "Valor de clave de DriverName" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:98 #, c-format msgid "Driver %s does not exist\n" msgstr "El controlador %s no existe\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:108 #, c-format msgid "" "The key already exists and is not forcibly overwritten, ignoring the setting " "operation\n" "If you want to ignore this error, use the \"-i\" parameter\n" msgstr "" "La clave ya existe y no se sobrescribe a la fuerza, ignorando la operación " "de configuración\n" "Si desea ignorar este error, use el parámetro \"-i\"\n" #: ../src/utils/biometric-device-discover/community-multidevice/community_multidevice_discover_tool.c:119 #, c-format msgid "Failed to initialize libfprint\n" msgstr "Error al inicializar libfprint\n" biometric-authentication/po/LINGUAS0000644000175000017500000000002513702331633016131 0ustar fengfengzh_CN bo fr ru pt es biometric-authentication/po/fr.po0000644000175000017500000016442313755706021016075 0ustar fengfeng# French translations for biometric-authentication package. # Copyright (C) 2018 THE biometric-authentication'S COPYRIGHT HOLDER # This file is distributed under the same license as the biometric-authentication package. # droiing , 2018. # msgid "" msgstr "" "Project-Id-Version: biometric-authentication 0.9.62\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-07-31 11:01+0800\n" "PO-Revision-Date: 2018-10-12 09:59+0800\n" "Last-Translator: droiing \n" "Language-Team: Chinese (simplified)\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7.1\n" #: ../src/biometric-authenticationd.c:304 #: ../src/biometric-authenticationd.c:382 #: ../src/biometric-authenticationd.c:571 #: ../src/biometric-authenticationd.c:676 #: ../src/biometric-authenticationd.c:792 #: ../src/biometric-authenticationd.c:872 #: ../src/biometric-authenticationd.c:1010 #: ../src/biometric-authenticationd.c:1173 #: ../src/biometric-authenticationd.c:1280 #: ../src/biometric-authenticationd.c:1357 #: ../src/biometric-authenticationd.c:1485 #: ../src/biometric-authenticationd.c:1656 #, c-format msgid "Can't create thread: %s\n" msgstr "Impossible de créer un fil: %s\n" #: ../src/biometric-authenticationd.c:503 #, c-format msgid "" "Framework automatically assigns the free index '%d' to driver %s user %d\n" msgstr "" "Framework attribue automatiquement l'index libre '%d' à l'utilisateur du " "pilote %s %d \n" #: ../src/biometric-authenticationd.c:511 msgid "Enroll Result: Success\n" msgstr "Résultat d'inscription: succès\n" #: ../src/biometric-authenticationd.c:514 msgid "Enroll Result: Fail\n" msgstr "Résultat d'inscription: Echec\n" #: ../src/biometric-authenticationd.c:618 msgid "Verify Result: Match\n" msgstr "Résultat de vérification: correspondance\n" #: ../src/biometric-authenticationd.c:622 msgid "Verify Result: No Match\n" msgstr "Résultat de vérification: pas de correspondance\n" #: ../src/biometric-authenticationd.c:727 #, c-format msgid "Identify Result: UID = %d\n" msgstr "Identifier le résultat: UID = %d\n" #: ../src/biometric-authenticationd.c:731 msgid "Identify Result: No Match\n" msgstr "Identifier le résultat: pas de correspondance\n" #: ../src/biometric-authenticationd.c:829 #, c-format msgid "Capture Result: %.*s\n" msgstr "Résultat de la capture: %.*s\n" #: ../src/biometric-authenticationd.c:832 msgid "Capture Result: ERROR\n" msgstr "Résultat de la capture: ERREUR\n" #: ../src/biometric-authenticationd.c:1032 #, c-format msgid "%s Clean Result: Success\n" msgstr "%s Résultat propre: succès\n" #: ../src/biometric-authenticationd.c:1035 #, c-format msgid "%s Clean Result: Failed\n" msgstr "%s résultat propre: échec\n" #. 系统层清理进行彻底的清理,免受当前不可用设备遗留的生物特征信息影响 #: ../src/biometric-authenticationd.c:1103 msgid "" "System level cleaning of the specified range of biometric features (all " "drivers)\n" msgstr "" "Nettoyage au niveau du système de la plage spécifiée de fonctions " "biométriques (tous les pilotes)\n" #: ../src/biometric-authenticationd.c:1111 msgid "System level Clean Result: Success\n" msgstr "Niveau système Nettoyer Résultat: succès\n" #: ../src/biometric-authenticationd.c:1114 msgid "System level Clean Result: Failed\n" msgstr "Niveau de nettoyage du système Résultat: Echec\n" #: ../src/biometric-authenticationd.c:1441 #, c-format msgid "Error: Failed to export object. Reason: %s\n" msgstr "Erreur: Impossible d'exporter l'objet. Raison: %s\n" #: ../src/biometric-authenticationd.c:1451 #, c-format msgid "name_acquired_cb called, Acquired bus name: %s\n" msgstr "name_acquired_cb appelé, Nom du bus acquis: %s\n" #: ../src/biometric-authenticationd.c:1460 msgid "name_lost_cb called, Error: Failed to connect to dbus\n" msgstr "name_lost_cb appelé, Erreur: échec de la connexion à dbus\n" #: ../src/biometric-authenticationd.c:1462 #, c-format msgid "name_lost_cb called, Error: Failed to obtain bus name: %s\n" msgstr "name_lost_cb appelé, Erreur: échec de l'obtention du nom du bus: %s\n" #: ../src/biometric-authenticationd.c:1470 msgid "run called in the server\n" msgstr "exécuter appelé dans le serveur\n" #: ../src/biometric-authenticationd.c:1487 #: ../src/biometric-authenticationd.c:1658 #, c-format msgid "New thread created: %s\n" msgstr "Nouveau thread créé: %s\n" #. * init for usage of "g" types #. g_type_init(); #: ../src/biometric-authenticationd.c:1500 msgid "InitDBusCommunicationServer: Server started\n" msgstr "InitDBusCommunicationServer: serveur démarré\n" #: ../src/biometric-authenticationd.c:1576 #, c-format msgid "libusb_handle_events failed: %s\n" msgstr "échec de libusb_handle_events: %s\n" #: ../src/biometric-authenticationd.c:1593 msgid "" "The biometric authentication server failed to start, requiring administrator " "permission to start\n" msgstr "" "Le serveur d'authentification biométrique n'a pas pu démarrer, nécessitant " "l'autorisation de l'administrateur pour démarrer\n" #: ../src/biometric-authenticationd.c:1616 #, c-format msgid "Can not open PID file: %s\n" msgstr "Impossible d'ouvrir le fichier PID: %s\n" #: ../src/biometric-authenticationd.c:1623 msgid "" "Biometric authentication server is running, Do not restart it repeatedly\n" msgstr "" "Le serveur d'authentification biométrique est en cours d'exécution, ne le " "redémarrez pas à plusieurs reprises\n" #: ../src/biometric-authenticationd.c:1632 #, c-format msgid "There is an exception to write PID file: %s\n" msgstr "Il existe une exception pour écrire le fichier PID: %s\n" #: ../src/biometric-authenticationd.c:1640 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:155 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:173 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:192 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:226 msgid "No such device" msgstr "Aucun appareil de ce type" #: ../src/biometric-authenticationd.c:1641 msgid "Device busy" msgstr "Appareil occupé" #: ../src/biometric-authenticationd.c:1646 msgid "Initial biometric recognition framework failed\n" msgstr "Echec du cadre de reconnaissance biométrique initial\n" #: ../src/biometric-dbus-common.c:51 #, c-format msgid "" "The UID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "" "Les informations UID du demandeur (%s) n'ont pas pu être obtenues. Erreur:" "%s \n" #: ../src/biometric-dbus-common.c:87 #, c-format msgid "" "The PID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "" "Les informations PID du demandeur (%s) n'ont pas pu être obtenues. Erreur:" "%s \n" #: ../src/lib/biometric_common.c:170 msgid "Current driver list:" msgstr "Liste de pilotes actuelle:" #: ../src/lib/biometric_common.c:208 msgid "Current device list:" msgstr "Liste actuelle des appareils:" #: ../src/lib/biometric_common.c:267 ../src/lib/biometric_common.c:285 #: ../src/lib/biometric_common.c:331 ../src/lib/biometric_config.c:39 #, c-format msgid "Error[%d]: %s\n" msgstr "Erreur [%d]: %s\n" #: ../src/lib/biometric_common.c:311 msgid "" "can't find \"bioconf\" struct, maybe someone forget use \"bio_conf_init()\" " "before\n" msgstr "" "impossible de trouver la structure \"bioconf\", peut-être que quelqu'un " "oubliera d'utiliser \"bio_conf_init()\" avant\n" #: ../src/lib/biometric_common.c:323 ../src/lib/biometric_storage.c:229 #: ../src/lib/biometric_storage.c:300 ../src/lib/biometric_storage.c:367 #: ../src/lib/biometric_storage.c:409 ../src/lib/biometric_storage.c:597 msgid "Unable to allocate memory\n" msgstr "Impossible d'allouer de la mémoire\n" #: ../src/lib/biometric_common.c:338 #, c-format msgid "No define driver in [%s]\n" msgstr "Aucun pilote défini dans [%s]\n" #: ../src/lib/biometric_common.c:351 #, c-format msgid "Loaded Driver: %s\n" msgstr "Pilote chargé: %s\n" #: ../src/lib/biometric_common.c:360 #, c-format msgid "%s driver configure failed\n" msgstr "%s configuration du pilote échoué\n" #. 检测驱动版本兼容性 #: ../src/lib/biometric_common.c:368 #, c-format msgid "%s driver DRV_API version: %d.%d.%d\n" msgstr "Version du pilote %s DRV_API: %d.%d.%d\n" #: ../src/lib/biometric_common.c:380 #, c-format msgid "" "Detected Compatibility issues: %s driver version is higher than biometric " "framework\n" msgstr "" "Problèmes de compatibilité détectés: la version du pilote %s est supérieure " "à la structure biométrique\n" #: ../src/lib/biometric_common.c:384 #, c-format msgid "" "Detected Compatibility issues: %s driver version is lower than biometric " "framework\n" msgstr "" "Problèmes de compatibilité détectés: la version du pilote %s est inférieure " "à la structure biométrique\n" #: ../src/lib/biometric_common.c:395 #, c-format msgid "Driver %s initialization failed\n" msgstr "Échec d'initialisation du pilote %s\n" #: ../src/lib/biometric_common.c:430 msgid "Error: Can not register attach callback error\n" msgstr "" "Erreur: impossible d'enregistrer une erreur de rappel de la pièce jointe\n" #: ../src/lib/biometric_common.c:443 msgid "Error: Can not register detach callback error\n" msgstr "Erreur: impossible d'enregistrer, détachez l'erreur de rappel\n" #: ../src/lib/biometric_common.c:494 msgid "Biometric framework API version:\n" msgstr "Version de l'API du cadre biométrique:\n" #: ../src/lib/biometric_common.c:495 #, c-format msgid " Driver API(DRV_API): %d.%d.%d\n" msgstr " API de pilote (DRV_API): %d.%d.%d\n" #: ../src/lib/biometric_common.c:499 #, c-format msgid " Application API(APP_API): %d.%d.%d\n" msgstr " API d'application (APP_API): %d.%d.%d\n" #: ../src/lib/biometric_common.c:506 msgid "bio_conf_init failed\n" msgstr "bio_conf_init a échoué\n" #: ../src/lib/biometric_common.c:522 #, c-format msgid "failed to initialise libusb: %s\n" msgstr "Échec d'initialisation de libusb: %s\n" #: ../src/lib/biometric_common.c:570 ../src/lib/biometric_common.c:616 #: ../src/lib/biometric_common.c:660 ../src/lib/biometric_common.c:706 #: ../src/lib/biometric_common.c:754 ../src/lib/biometric_common.c:798 #: ../src/lib/biometric_common.c:848 ../src/lib/biometric_common.c:890 #, c-format msgid "Open Result: %d\n" msgstr "Résultat ouvert: %d\n" #: ../src/lib/biometric_common.c:586 ../src/lib/biometric_common.c:632 #: ../src/lib/biometric_common.c:676 ../src/lib/biometric_common.c:722 #: ../src/lib/biometric_common.c:770 ../src/lib/biometric_common.c:814 #: ../src/lib/biometric_common.c:857 #, c-format msgid "Close Device: %s\n" msgstr "Fermer le périphérique: %s\n" #: ../src/lib/biometric_common.c:587 ../src/lib/biometric_common.c:633 #: ../src/lib/biometric_common.c:677 ../src/lib/biometric_common.c:723 #: ../src/lib/biometric_common.c:771 ../src/lib/biometric_common.c:815 #: ../src/lib/biometric_common.c:858 #, c-format msgid "Device Status: [%d]%s\n" msgstr "État du périphérique: [%d] %s\n" #: ../src/lib/biometric_common.c:627 ../src/lib/biometric_common.c:717 #: ../src/lib/biometric_common.c:765 #, c-format msgid "%s\n" msgstr "%s\n" #: ../src/lib/biometric_common.c:1056 ../src/lib/biometric_common.c:1247 msgid "Device idle" msgstr "Appareil en veille" #: ../src/lib/biometric_common.c:1058 msgid "Device is in process" msgstr "L'appareil est en cours de traitement" #: ../src/lib/biometric_common.c:1060 msgid "Terminating current operation" msgstr "Terminer l'opération en cours" #: ../src/lib/biometric_common.c:1062 msgid "Device is disabled" msgstr "L'appareil est désactivé" #: ../src/lib/biometric_common.c:1065 msgid "Opening device" msgstr "Dispositif d'ouverture" #: ../src/lib/biometric_common.c:1067 msgid "Terminating open operation" msgstr "Terminer l'opération ouverte" #: ../src/lib/biometric_common.c:1070 msgid "Enrolling" msgstr "Inscription" #: ../src/lib/biometric_common.c:1072 msgid "Terminating enroll operation" msgstr "Terminer l'opération d'inscription" #: ../src/lib/biometric_common.c:1075 msgid "Verifying" msgstr "Vérification" #: ../src/lib/biometric_common.c:1077 msgid "Terminating Verify operation" msgstr "Terminer l'opération de vérification" #: ../src/lib/biometric_common.c:1080 msgid "Identifying" msgstr "Identifiant" #: ../src/lib/biometric_common.c:1082 msgid "Terminating identify operation" msgstr "Terminer l'opération d'identification" #: ../src/lib/biometric_common.c:1085 msgid "Capturing" msgstr "Capture" #: ../src/lib/biometric_common.c:1087 msgid "Terminating capture operation" msgstr "Fin de l'opération de capture" #: ../src/lib/biometric_common.c:1090 msgid "Searching" msgstr "Recherche" #: ../src/lib/biometric_common.c:1092 msgid "Terminating search operation" msgstr "Terminer l'opération de recherche" #: ../src/lib/biometric_common.c:1095 msgid "Cleaning" msgstr "Nettoyage" #: ../src/lib/biometric_common.c:1097 msgid "Terminating clean operation" msgstr "Terminer l'opération propre" #: ../src/lib/biometric_common.c:1100 msgid "Getting feature list" msgstr "Obtenir la liste des fonctionnalités" #: ../src/lib/biometric_common.c:1102 msgid "Terminating get feature list operation" msgstr "Arrêt de l'opération de liste de fonctions get" #: ../src/lib/biometric_common.c:1105 msgid "Renaming feature" msgstr "Renommer fonctionnalité" #: ../src/lib/biometric_common.c:1107 msgid "Terminating feature rename operation" msgstr "Terminer l'opération de renommer une fonction" #: ../src/lib/biometric_common.c:1110 msgid "Closing" msgstr "Fermeture" #: ../src/lib/biometric_common.c:1112 msgid "Terminating close operation" msgstr "Terminer l'opération de fermeture" #: ../src/lib/biometric_common.c:1115 #, c-format msgid "Device unknown status code: %d\n" msgstr "Code d'état inconnu du périphérique: %d\n" #: ../src/lib/biometric_common.c:1116 msgid "Device is in an unknown status..." msgstr "L'appareil est dans un état inconnu ..." #: ../src/lib/biometric_common.c:1128 msgid "Operation successful" msgstr "Opération réussie" #: ../src/lib/biometric_common.c:1130 ../src/lib/biometric_common.c:1249 msgid "Operation failed" msgstr "L'opération a échoué" #: ../src/lib/biometric_common.c:1132 ../src/lib/biometric_common.c:1251 msgid "An error was encountered during the operation" msgstr "Une erreur est survenue lors de l'opération" #: ../src/lib/biometric_common.c:1134 ../src/lib/biometric_common.c:1253 msgid "The operation was interrupted by the user" msgstr "L'opération a été interrompue par l'utilisateur" #: ../src/lib/biometric_common.c:1136 ../src/lib/biometric_common.c:1255 msgid "Operation timeout" msgstr "Délai d'attente de l'opération" #: ../src/lib/biometric_common.c:1138 ../src/lib/biometric_common.c:1259 msgid "Out of memory" msgstr "Mémoire insuffisante" #: ../src/lib/biometric_common.c:1141 ../src/lib/biometric_common.c:1264 msgid "Open device completion" msgstr "Achèvement de l'appareil ouvert" #: ../src/lib/biometric_common.c:1143 ../src/lib/biometric_common.c:1266 msgid "Open device failed" msgstr "Appareil ouvert a échoué" #: ../src/lib/biometric_common.c:1145 ../src/lib/biometric_common.c:1268 msgid "An error was encountered during the opening" msgstr "Une erreur a été rencontrée lors de l'ouverture" #: ../src/lib/biometric_common.c:1148 ../src/lib/biometric_common.c:1271 msgid "Enroll feature successful" msgstr "Fonction d'inscription réussie" #: ../src/lib/biometric_common.c:1150 ../src/lib/biometric_common.c:1273 msgid "Enroll feature failed" msgstr "La fonction d'inscription a échoué" #: ../src/lib/biometric_common.c:1152 ../src/lib/biometric_common.c:1275 msgid "An error was encountered during enrolling" msgstr "Une erreur s'est produite lors de l'inscription" #: ../src/lib/biometric_common.c:1154 ../src/lib/biometric_common.c:1277 msgid "Enroll operation was interrupted by the user" msgstr "L'opération d'inscription a été interrompue par l'utilisateur" #: ../src/lib/biometric_common.c:1156 ../src/lib/biometric_common.c:1279 msgid "Enroll operation timeout" msgstr "Enregistrement du délai d'attente de l'opération" #: ../src/lib/biometric_common.c:1159 ../src/lib/biometric_common.c:1282 msgid "Verify feature match" msgstr "Vérifier la correspondance des fonctionnalités" #: ../src/lib/biometric_common.c:1161 ../src/lib/biometric_common.c:1284 msgid "Verify feature no match" msgstr "Vérifier la fonctionnalité sans correspondance" #: ../src/lib/biometric_common.c:1163 ../src/lib/biometric_common.c:1286 msgid "An error was encountered during verifying" msgstr "Une erreur s'est produite lors de la vérification" #: ../src/lib/biometric_common.c:1165 ../src/lib/biometric_common.c:1288 msgid "Verify operation was interrupted by the user" msgstr "Vérifier que l'opération a été interrompue par l'utilisateur" #: ../src/lib/biometric_common.c:1167 ../src/lib/biometric_common.c:1290 msgid "Verify operation timeout" msgstr "Vérifier le délai d'attente de l'opération" #: ../src/lib/biometric_common.c:1170 ../src/lib/biometric_common.c:1293 msgid "Identify feature match" msgstr "Identifier la correspondance des fonctionnalités" #: ../src/lib/biometric_common.c:1172 ../src/lib/biometric_common.c:1295 msgid "Identify feature no match" msgstr "Identifier la fonctionnalité sans correspondance" #: ../src/lib/biometric_common.c:1174 ../src/lib/biometric_common.c:1297 msgid "An error was encountered during identifying" msgstr "Une erreur s'est produite lors de l'identification" #: ../src/lib/biometric_common.c:1176 ../src/lib/biometric_common.c:1299 msgid "Identify operation was interrupted by the user" msgstr "L'opération d'identification a été interrompue par l'utilisateur" #: ../src/lib/biometric_common.c:1178 ../src/lib/biometric_common.c:1301 msgid "Identify operation timeout" msgstr "Identifier le délai d'attente de l'opération" #: ../src/lib/biometric_common.c:1181 ../src/lib/biometric_common.c:1304 msgid "Capture feature successful" msgstr "Fonction de capture réussie" #: ../src/lib/biometric_common.c:1183 ../src/lib/biometric_common.c:1306 msgid "Capture feature failed" msgstr "La fonction de capture a échoué" #: ../src/lib/biometric_common.c:1185 ../src/lib/biometric_common.c:1308 msgid "An error was encountered during capturing" msgstr "Une erreur s'est produite lors de la capture" #: ../src/lib/biometric_common.c:1187 ../src/lib/biometric_common.c:1310 msgid "Capture operation was interrupted by the user" msgstr "L'opération de capture a été interrompue par l'utilisateur" #: ../src/lib/biometric_common.c:1189 ../src/lib/biometric_common.c:1312 msgid "Capture operation timeout" msgstr "Temporisation de l'opération de capture" #: ../src/lib/biometric_common.c:1192 ../src/lib/biometric_common.c:1315 msgid "Find the specified features" msgstr "Trouver les fonctionnalités spécifiées" #: ../src/lib/biometric_common.c:1194 ../src/lib/biometric_common.c:1317 msgid "No specified features were found" msgstr "Aucune fonctionnalité spécifiée n'a été trouvée" #: ../src/lib/biometric_common.c:1196 ../src/lib/biometric_common.c:1319 msgid "An error was encountered during searching" msgstr "Une erreur est survenue lors de la recherche" #: ../src/lib/biometric_common.c:1198 ../src/lib/biometric_common.c:1321 msgid "Search operation was interrupted by the user" msgstr "L'opération de recherche a été interrompue par l'utilisateur" #: ../src/lib/biometric_common.c:1200 ../src/lib/biometric_common.c:1323 msgid "Search operation timeout" msgstr "Délai d'opération de recherche" #: ../src/lib/biometric_common.c:1203 ../src/lib/biometric_common.c:1326 msgid "Clean feature successful" msgstr "Fonction propre réussie" #: ../src/lib/biometric_common.c:1205 ../src/lib/biometric_common.c:1328 msgid "Clean feature failed" msgstr "La fonction de nettoyage a échoué" #: ../src/lib/biometric_common.c:1207 ../src/lib/biometric_common.c:1330 msgid "An error was encountered during cleaning" msgstr "Une erreur est survenue lors du nettoyage" #: ../src/lib/biometric_common.c:1209 ../src/lib/biometric_common.c:1332 msgid "Clean operation was interrupted by the user" msgstr "L'opération de nettoyage a été interrompue par l'utilisateur" #: ../src/lib/biometric_common.c:1211 ../src/lib/biometric_common.c:1334 msgid "Clean operation timeout" msgstr "Délai de fonctionnement propre" #: ../src/lib/biometric_common.c:1214 ../src/lib/biometric_common.c:1337 msgid "Get feature list completion" msgstr "Obtenir la liste complète des fonctionnalités" #: ../src/lib/biometric_common.c:1216 ../src/lib/biometric_common.c:1339 msgid "Get feature list failed" msgstr "Obtenir la liste des fonctionnalités a échoué" #: ../src/lib/biometric_common.c:1218 ../src/lib/biometric_common.c:1341 msgid "An error was encountered during getting feature list" msgstr "" "Une erreur s'est produite lors de l'obtention de la liste de fonctionnalités" #: ../src/lib/biometric_common.c:1221 ../src/lib/biometric_common.c:1344 msgid "Rename feature successful" msgstr "Renommer fonctionnalité réussie" #: ../src/lib/biometric_common.c:1223 ../src/lib/biometric_common.c:1346 msgid "Rename feature failed" msgstr "Renommer fonctionnalité a échoué" #: ../src/lib/biometric_common.c:1225 ../src/lib/biometric_common.c:1348 msgid "An error was encountered during renaming" msgstr "Une erreur est survenue lors du changement de nom" #: ../src/lib/biometric_common.c:1228 ../src/lib/biometric_common.c:1353 msgid "Close device completion" msgstr "Fermer la complétion de l'appareil" #: ../src/lib/biometric_common.c:1230 ../src/lib/biometric_common.c:1355 msgid "Close device failed" msgstr "Fermer l'appareil a échoué" #: ../src/lib/biometric_common.c:1232 ../src/lib/biometric_common.c:1357 msgid "An error was encountered during closing" msgstr "Une erreur est survenue lors de la fermeture" #: ../src/lib/biometric_common.c:1235 msgid "Operation is in an unknown status......" msgstr "L'opération a un statut inconnu ......" #: ../src/lib/biometric_common.c:1257 msgid "Device is disable" msgstr "L'appareil est désactivé" #: ../src/lib/biometric_common.c:1261 msgid "The device or driver does not support this operation" msgstr "Le périphérique ou le pilote ne prend pas en charge cette opération." #: ../src/lib/biometric_common.c:1350 msgid "Feature renaming is not complete, please try again" msgstr "" "Le renommage des fonctionnalités n'est pas complet, veuillez réessayer." #: ../src/lib/biometric_common.c:1360 msgid "Device internal error" msgstr "Erreur interne de l'appareil" #: ../src/lib/biometric_common.c:1473 msgid "Init libusb Error\n" msgstr "Erreur d'initialisation libusb\n" #: ../src/lib/biometric_common.c:1480 msgid "Get USB Device List Error\n" msgstr "Obtenir l'erreur de liste de périphériques USB\n" #: ../src/lib/biometric_common.c:1489 msgid "Can not get usb information\n" msgstr "Impossible d'obtenir des informations usb\n" #: ../src/lib/biometric_common.c:1506 #, c-format msgid "libbiometric detected usb device(%s): %d\n" msgstr "périphérique usb détecté par libbiometric (%s): %d\n" #: ../src/lib/biometric_common.c:1747 #, c-format msgid "Get function %s handle error: %s\n" msgstr "Récupère l'erreur de gestion de la fonction %s : %s\n" #: ../src/lib/biometric_common.c:1764 msgid "Error: Can not get device descriptor\n" msgstr "Erreur: impossible d'obtenir le descripteur de périphérique\n" #: ../src/lib/biometric_common.c:1767 #, c-format msgid "Device attached: %04x:%04x\n" msgstr "Périphérique connecté: %04x:%04x\n" #: ../src/lib/biometric_common.c:1828 msgid "Error getting device descriptor" msgstr "Erreur lors de l'obtention du descripteur de périphérique" #: ../src/lib/biometric_common.c:1831 #, c-format msgid "Device detached: %04x:%04x\n" msgstr "Périphérique détaché: %04x:%04x\n" #: ../src/lib/biometric_common.c:1957 msgid "Unable to find feature that require renaming\n" msgstr "" "Impossible de trouver une fonctionnalité nécessitant un changement de nom\n" #: ../src/lib/biometric_common.c:1960 #, c-format msgid "There are %d feature samples to renaming failed, please try again\n" msgstr "" "Il y a %d exemples de fonctionnalités dont le changement de nom a échoué. " "Veuillez réessayer.\n" #: ../src/lib/biometric_storage.c:190 ../src/lib/biometric_storage.c:206 #: ../src/lib/biometric_storage.c:387 ../src/lib/biometric_storage.c:517 #: ../src/lib/biometric_storage.c:559 ../src/lib/biometric_storage.c:616 #: ../src/lib/biometric_storage.c:636 ../src/lib/biometric_storage.c:663 #: ../src/lib/biometric_storage.c:689 ../src/lib/biometric_storage.c:740 #: ../src/lib/biometric_storage.c:1046 ../src/lib/biometric_storage.c:1155 #: ../src/lib/biometric_storage.c:1169 #, c-format msgid "sqlite3 prepare err: %s\n" msgstr "sqlite3 prepare err: %s\n" #: ../src/lib/biometric_storage.c:198 #, c-format msgid "Unable to set database(%s) permissions. ERROR[%d]: %s\n" msgstr "" "Impossible de définir les autorisations de la base de données(%s). " "ERREUR[%d]: %s\n" #: ../src/lib/biometric_storage.c:712 msgid "Check database format version ...\n" msgstr "Vérifier la version du format de la base de données ...\n" #: ../src/lib/biometric_storage.c:720 #, c-format msgid "Find Table '%s' Error: %s\n" msgstr "Erreur de recherche de la table '%s': %s\n" #: ../src/lib/biometric_storage.c:754 #, c-format msgid "Database format version is %d.%d.%d\n" msgstr "La version du format de base de données est %d.%d.%d\n" #: ../src/lib/biometric_storage.c:762 #, c-format msgid "Failed to upgrade database format:version %d.%d.%d to %d.%d.%d\n" msgstr "" "Échec de la mise à niveau du format de la base de données: version %d.%d.%d " "à %d.%d.%d\n" #: ../src/lib/biometric_storage.c:775 msgid "The database format is compatible with the current framework\n" msgstr "" "Le format de la base de données est compatible avec le framework actuel\n" #: ../src/lib/biometric_storage.c:780 #, c-format msgid "" "Incompatible version of the database format: %d.%d.%d. Version required for " "the current framework: %d.%d.x" msgstr "" "Version incompatible du format de la base de données: %d.%d.%d. Version " "requise pour le cadre actuel: %d.%d.x" #: ../src/lib/biometric_storage.c:886 #, c-format msgid "Create Biometric Datebase Directory (%s) Error\n" msgstr "Créer un répertoire de base de données biométrique (%s) Erreur\n" #: ../src/lib/biometric_storage.c:928 ../src/lib/biometric_storage.c:947 #: ../src/lib/biometric_storage.c:973 #, c-format msgid "Failure to modify the owner and group of %s. ERROR[%d]: %s\n" msgstr "" "Échec de la modification du propriétaire et du groupe de %s. ERREUR [%d]: " "%s\n" #: ../src/lib/biometric_storage.c:992 msgid "Upgrade database ...\n" msgstr "Mettre à niveau la base de données ...\n" #: ../src/lib/biometric_storage.c:1002 #, c-format msgid "Rename Table 'EIGEN_INFO' to 'EIGEN_INFO_VERSION_0_0_0' Error: %s\n" msgstr "" "Renommez la table 'EIGEN_INFO' en 'EIGEN_INFO_VERSION_0_0_0' Erreur: %s\n" #: ../src/lib/biometric_storage.c:1031 #, c-format msgid "Failed to migrate data from the original table: %s\n" msgstr "Échec de la migration des données de la table d'origine: %s\n" #: ../src/lib/biometric_storage.c:1061 #, c-format msgid "Update UUID=%s to database(UID=%d) ...\n" msgstr "Mettre à jour l'UUID = %s dans la base de données (UID = %d) ...\n" #: ../src/lib/biometric_storage.c:1068 #, c-format msgid "Update column \"UUID\" to Table \"%s\" Error: %s\n" msgstr "Mettre à jour la colonne \"UUID\" dans la table \" %s\" Erreur: %s\n" #: ../src/lib/biometric_storage.c:1111 ../src/lib/biometric_storage.c:1135 #, c-format msgid "" "Create Table %s:\n" "%s\n" msgstr "" "Créer une table %s :\n" " %s\n" #: ../src/lib/biometric_storage.c:1115 ../src/lib/biometric_storage.c:1139 #, c-format msgid "Create Table '%s' Error: %s\n" msgstr "Erreur de création de table '%s': %s\n" #: ../src/lib/biometric_storage.c:1147 #, c-format msgid "" "Set Database Format(%d.%d.%d):\n" "%s\n" msgstr "" "Définir le format de la base de données (%d.%d.%d):\n" " %s\n" #: ../src/drivers/community-multidevice/community_ops.c:129 #, c-format msgid "Get AES Key File Error[%d]: %s, use default Key.\n" msgstr "" "Obtenir l'erreur de fichier de clé AES [%d]: %s , utilisez la clé par " "défaut.\n" #: ../src/drivers/community-multidevice/community_ops.c:142 #, c-format msgid "" "AES Key File (%s) does not Exist or has no Read Permission, use default " "key.\n" msgstr "" "Le fichier de clé AES (%s) n'existe pas ou n'a pas de permission de lecture, " "utilisez la clé par défaut.\n" #: ../src/drivers/community-multidevice/community_ops.c:159 #, c-format msgid "Can not open AES Key File: %s, use default key.\n" msgstr "" "Impossible d'ouvrir le fichier de clé AES: %s , utilisez la clé par défaut.\n" #: ../src/drivers/community-multidevice/community_ops.c:174 msgid "AES Key File is Enpty, use default Key.\n" msgstr "Le fichier de clé AES est Enpty, utilisez la clé par défaut.\n" #: ../src/drivers/community-multidevice/community_ops.c:198 msgid "AES Key is Enpty, use default Key.\n" msgstr "La clé AES est Enpty, utilisez la clé par défaut.\n" #: ../src/drivers/community-multidevice/community_ops.c:234 #, c-format msgid "Detect %s device\n" msgstr "Détecter le périphérique %s\n" #: ../src/drivers/community-multidevice/community_ops.c:242 #: ../src/drivers/community-multidevice/community_ops.c:247 #, c-format msgid "No %s fingerprint device detected\n" msgstr "Aucun périphérique d'empreinte digitale %s détecté\n" #: ../src/drivers/community-multidevice/community_ops.c:251 #, c-format msgid "There is %d %s fingerprint device detected\n" msgstr "Un périphérique d'empreinte digitale %d %s est détecté\n" #: ../src/drivers/community-multidevice/community_ops.c:277 #, c-format msgid "Device failed to open" msgstr "Impossible d'ouvrir le périphérique" #: ../src/drivers/community-multidevice/community_ops.c:333 #: ../src/drivers/community-multidevice/community_ops.c:1089 #: ../src/drivers/community-multidevice/community_ops.c:1277 #, c-format msgid "Unknown error, error code: %d" msgstr "Erreur inconnue, code d'erreur: %d" #: ../src/drivers/community-multidevice/community_ops.c:458 #: ../src/drivers/community-multidevice/community_ops.c:541 #: ../src/drivers/community-multidevice/community_ops.c:676 msgid "Find the following feature matching:\n" msgstr "Recherchez la fonctionnalité suivante:\n" #: ../src/drivers/community-multidevice/community_ops.c:625 #, c-format msgid "" "Search from offset %d, index %d has been searched, global index %d(%d + %d)\n" msgstr "" "Recherche de l' offset %d , indice %d a été recherché, l' indice global %d " "(%d + %d)\n" #: ../src/drivers/community-multidevice/community_ops.c:630 #, c-format msgid "" "The %d feature has been searched(UID = %d, Index = %d, Index Name = %s), " "please press your finger to continue the search" msgstr "" "La fonction %d a été recherchée (UID = %d , Index = %d , Nom de l'index = " "%s), veuillez appuyer sur votre doigt pour poursuivre la recherche." #: ../src/drivers/community-multidevice/community_ops.c:774 #, c-format msgid "Device %s[%d] received interrupt request\n" msgstr "Le périphérique %s [%d] a reçu une demande d'interruption\n" #: ../src/drivers/community-multidevice/community_ops.c:819 msgid "Sample complete" msgstr "Échantillon complet" #: ../src/drivers/community-multidevice/community_ops.c:821 msgid "" "Enrollment failed due to incomprehensible data. (Please use the same finger " "at different sampling stages of the same enroll)" msgstr "" "L'inscription a échoué en raison de données incompréhensibles. (Veuillez " "utiliser le même doigt à différents stades d'échantillonnage de la même " "inscription)" #: ../src/drivers/community-multidevice/community_ops.c:825 msgid "" "Please place your finger again because of poor quality of the sample or " "other scanning problems" msgstr "" "Veuillez replacer votre doigt à cause de la mauvaise qualité de " "l'échantillon ou d'autres problèmes de numérisation." #: ../src/drivers/community-multidevice/community_ops.c:828 msgid "Your swipe was too short, please place your finger again." msgstr "Votre coup était trop court, veuillez placer votre doigt à nouveau." #: ../src/drivers/community-multidevice/community_ops.c:831 msgid "" "Didn't catch that, please center your finger on the sensor and try again." msgstr "" "Vous n'avez pas compris cela, centrez votre doigt sur le capteur et essayez " "à nouveau." #: ../src/drivers/community-multidevice/community_ops.c:834 msgid "" "Because of the scanning image quality or finger pressure problem, the " "sampling failed, please remove the finger and retry" msgstr "" "En raison du problème de qualité de l'image numérisée ou de pression des " "doigts, l'échantillonnage a échoué. Veuillez retirer le doigt, puis " "réessayer." #: ../src/drivers/community-multidevice/community_ops.c:838 msgid "Unable to generate feature data, enroll failure" msgstr "" "Impossible de générer les données de fonctionnalité, échec d'inscription" #: ../src/drivers/community-multidevice/community_ops.c:840 msgid "" "Sample start, please press and lift your finger (Some devices need to swipe " "your finger)" msgstr "" "Exemple de démarrage, veuillez appuyer et lever votre doigt (certains " "appareils doivent passer votre doigt)" #: ../src/drivers/community-multidevice/community_ops.c:895 #, c-format msgid "Could not open device (driver %s)" msgstr "Impossible d'ouvrir le périphérique (pilote %s)" #: ../src/drivers/community-multidevice/community_ops.c:1064 #: ../src/drivers/community-multidevice/community_ops.c:1229 #, c-format msgid "Failed to call function %s\n" msgstr "Impossible d'appeler la fonction %s\n" #: ../src/drivers/community-multidevice/community_ops.c:1112 #, c-format msgid "" "Enroll failed: The feature was successfully sampled, but the encoding of the " "sampling feature could not be generated" msgstr "" "Échec de l'inscription: la fonctionnalité a été échantillonnée avec succès, " "mais le codage de la fonctionnalité d'échantillonnage n'a pas pu être généré." #: ../src/drivers/community-multidevice/community_ops.c:1129 #, c-format msgid "" "The %d [%d/%d] sampling was successful, in the next sampling: please press " "and lift your finger (Some devices need to swipe your finger)" msgstr "" "L’échantillonnage %d [%d / %d] a réussi. Lors du prochain échantillonnage: " "veuillez appuyer sur le doigt et le soulever (certains appareils doivent " "glisser votre doigt)." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Disable" msgstr "Désactiver" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Enable" msgstr "Activer" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Print" msgstr "Empreinte digitale" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Vein" msgstr "Veine de doigt" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Iris" msgstr "Iris" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Face" msgstr "Visage" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Voice Print" msgstr "Impression vocale" # #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device" msgstr "Dispositif" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "OS" msgstr "OS" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device and OS" msgstr "Appareil et OS" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Original Data" msgstr "Données d'origine" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Value" msgstr "Valeur propre" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Vector" msgstr "Vecteur propre" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Hardware" msgstr "Matériel" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Software" msgstr "Logiciel" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Mix" msgstr "Mélanger" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:71 msgid "Other" msgstr "Autre" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "Serial" msgstr "En série" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "USB" msgstr "USB" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "PCIE" msgstr "PCIE" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:70 msgid "Any" msgstr "Tout" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Common" msgstr "Commun" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Open" msgstr "Ouvrir" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Enroll" msgstr "Inscrire" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Verify" msgstr "Vérifier" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Identify" msgstr "Identifier" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Capture" msgstr "Capturer" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Search" msgstr "Chercher" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Clean" msgstr "Nettoyer" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "GetFeatureList" msgstr "GetFeatureList" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Rename" msgstr "Renommer" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Close" msgstr "Fermer" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:76 msgid "" "Usage:\n" " biometric-auth-client BuiltinCommands ...\n" "\n" "BuiltinCommands:\n" " get-driver-list Get Driver List\n" " get-device-list Get Device List\n" " get-feature-list Get Feature List\n" " enroll Enroll Feature\n" " verify Verify Feature\n" " capture Capture Feature\n" " search Search Feature\n" " clean Clean Feature\n" " rename Rename Feature\n" "\n" "Options:\n" " -h, --help show this help message and exit\n" msgstr "" "Utilisation:\n" " Commandes de commande intégrées du client biométrique ...\n" "\n" "Commandes de construction:\n" " get-driver-list Obtenir la liste des pilotes\n" " get-device-list Obtenir la liste des périphériques\n" " get-feature-list Obtenir la liste des fonctionnalités\n" " inscrire inscrire la fonctionnalité\n" " vérifier la fonctionnalité de vérification\n" " capturer la fonctionnalité de capture\n" " rechercher la fonction de recherche\n" " clean Fonction propre\n" " renommer fonction renommer\n" "\n" "Options:\n" " -h, --help afficher ce message d'aide et quitter\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:116 msgid "non-existent user" msgstr "utilisateur inexistant" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:152 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:170 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:189 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:223 msgid "The device is busy, please try again later" msgstr "L'appareil est occupé, veuillez réessayer plus tard." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:158 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:176 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:195 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:229 msgid "No permission to perform this operation" msgstr "Pas de permission pour effectuer cette opération" # c-format #: ../src/utils/biometric-auth-client/biometric-auth-client.in:179 #, c-format msgid "Character string: %s\n" msgstr "Chaîne de caractères: %s\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "No." msgstr "Non." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User ID" msgstr "Identifiant d'utilisateur" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User Name" msgstr "Nom d'utilisateur" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:452 msgid "Feature Index" msgstr "Index des fonctionnalités" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:391 msgid "Feature Name" msgstr "Nom de la fonctionnalité" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:212 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:250 msgid "List of features found:" msgstr "Liste des fonctionnalités trouvées:" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:347 msgid "Biometric Type" msgstr "Type biométrique" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver Name" msgstr "Nom du conducteur" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:271 msgid "Show all fields (Highest priority)" msgstr "Afficher tous les champs (plus haute priorité)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:273 msgid "Show 'Driver Full Name' fields" msgstr "Afficher les champs 'Nom complet du pilote'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:275 msgid "Show 'Biometric Type' fields" msgstr "Afficher les champs 'Type biométrique'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:277 msgid "Show 'Storge Type' fields" msgstr "Afficher les champs 'Storge Type'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:279 msgid "Show 'Eigen Type' fields" msgstr "Afficher les champs 'Type propre'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:281 msgid "Show 'Verify Type' fields" msgstr "Afficher les champs 'Vérifier le type'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:283 msgid "Show 'Identify Type' fields" msgstr "Afficher les champs 'Identify Type'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver ID" msgstr "Identifiant du conducteur" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:342 msgid "Driver Full Name" msgstr "Nom complet du conducteur" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:344 msgid "Status" msgstr "Statut" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:350 msgid "Storge Type" msgstr "Storge Type" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:353 msgid "Eigen Type" msgstr "Type propre" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:356 msgid "Verify Type" msgstr "Vérifier le type" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:359 msgid "Identify Type" msgstr "Identifier le type" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:361 msgid "Bus Type" msgstr "Type de bus" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:294 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:411 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:472 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:525 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:590 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:656 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:714 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:778 msgid "Biometric identification backend framework service is not started" msgstr "" "Le service d'arrière-plan d'identification biométrique n'est pas démarré" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:300 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:419 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:480 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:533 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:598 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:664 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:722 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:786 msgid "" "Client APP_API is newer than biometric identification framework service. " "Please upgrade framework service or degrade client.\n" msgstr "" "Le client APP_API est plus récent que le service de cadre d'identification " "biométrique. Veuillez mettre à niveau le service d'infrastructure ou " "dégrader le client.\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:304 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:423 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:484 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:537 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:602 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:668 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:726 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:790 msgid "" "Client APP_API is older than biometric identification framework service. " "Please degrade framework service or upgrade client.\n" msgstr "" "Le client APP_API est plus ancien que le service d'infrastructure " "d'identification biométrique. Veuillez dégrader le service d'infrastructure " "ou mettre à niveau le client.\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:383 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:387 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:448 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:627 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:693 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:751 #, c-format msgid "User Name (Default is current user: %s)" msgstr "Nom d'utilisateur (par défaut, l'utilisateur actuel: %s)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:389 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:450 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:509 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:564 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:629 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:695 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:753 msgid "Driver(or Device) ID" msgstr "ID du pilote (ou du périphérique)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:401 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:462 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:515 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:580 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:641 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:704 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:768 msgid "Input parameter error\n" msgstr "Erreur de paramètre d'entrée\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:444 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:623 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX" msgstr "%s %s [-u NOM_UTILISATEUR] -d ID_DRIVER -i INDEX" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:505 #, c-format msgid "%s %s -d DRIVER_ID" msgstr "%s %s -d DRIVER_ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:558 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:562 msgid "User Name (Not set to search for all users)" msgstr "Nom d'utilisateur (non défini pour rechercher tous les utilisateurs)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:566 msgid "Start of Feature Index (default 0)" msgstr "Début de l'index des fonctionnalités (0 par défaut)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:568 msgid "End of Feature Index (default -1, means search all)" msgstr "End of Feature Index (par défaut -1, signifie rechercher dans tous)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:631 msgid "The Feature Index You Want To Delete (-1 means delete all)" msgstr "" "L'index des fonctionnalités que vous souhaitez supprimer (-1 signifie tout " "supprimer)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:689 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:747 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:755 msgid "The Feature Index that needs to be renamed" msgstr "L'indice de fonctionnalité à renommer" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:757 msgid "New Feature Name" msgstr "Nouveau nom de fonctionnalité" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:814 msgid "" "The abort operation failed and the current operation will continue in the " "background." msgstr "" "L'opération d'abandon a échoué et l'opération en cours continuera en arrière-" "plan." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:815 msgid "The device may have to wait a while before being used." msgstr "L'appareil devra peut-être attendre un moment avant d'être utilisé." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:816 msgid "" "The wait problem can be solved by restarting the biometrics backend " "framework service." msgstr "" "Le problème de l'attente peut être résolu en redémarrant le service " "d'arrière-plan de la biométrie." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:860 #, c-format msgid "Unknown Builtin Commands: %s\n" msgstr "Commandes intégrées inconnues: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:39 msgid "When there is a driver of the same name, force to override it" msgstr "Quand il y a un pilote du même nom, forcer à le remplacer" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:41 msgid "Only add driver and Not enable driver" msgstr "Ajoute seulement le pilote et pas l'activation du pilote" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:52 msgid "DriverName DriverFilePath" msgstr "DriverName DriverFilePath" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:61 #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:75 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:280 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:64 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:78 #, c-format msgid "Error parsing commandline options: %s\n" msgstr "Erreur d’analyse des options de la ligne de commande: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:74 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:77 msgid "The number of parameters is incorrect" msgstr "Le nombre de paramètres est incorrect" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:86 #, c-format msgid "" "This driver already exists, using the -f parameter if you need to override " "the configuration\n" msgstr "" "Ce pilote existe déjà, utilisez le paramètre -f si vous devez remplacer la " "configuration\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:104 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:96 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:93 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:124 #, c-format msgid "Write configuration failure: %s\n" msgstr "Échec de la configuration en écriture: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:38 msgid "Ignore nonexistent drivers" msgstr "Ignorer les pilotes inexistants" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:48 msgid "Driver1 [Driver2 ...]" msgstr "Driver1 [Driver2 ...]" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:79 #, c-format msgid "" "Driver %s does not exist, if you need to ignore the problem, use -i " "parameter\n" msgstr "" "Le pilote %s n’existe pas. Si vous devez ignorer le problème, utilisez le " "paramètre -i\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:53 msgid "Add driver" msgstr "Ajouter un pilote" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:54 msgid "Remove drive" msgstr "Retirer le lecteur" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:55 msgid "Enable driver" msgstr "Activer le pilote" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:56 msgid "Disable driver" msgstr "Désactiver le pilote" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:57 msgid "Set the key value of the specified driver" msgstr "Définir la valeur de clé du pilote spécifié" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:58 msgid "remove the key value of the specified driver" msgstr "supprime la valeur de clé du pilote spécifié" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:105 msgid "BuiltinCommands" msgstr "Commandes intégrées" #. g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:108 msgid "Builtin commands: " msgstr "Commandes intégrées: " #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:222 #, c-format msgid "Unknown command %s" msgstr "Commande inconnue %s" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:231 msgid "Missing builtin command" msgstr "Commande intégrée manquante" #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:48 msgid "DriverName Key" msgstr "Clé DriverName" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:41 msgid "Forcibly overrides the existing key" msgstr "Remplace de force la clé existante" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:43 msgid "Ignore this setting if the key already exists" msgstr "Ignorer ce paramètre si la clé existe déjà" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:55 msgid "DriverName Key Value" msgstr "DriverName Key Value" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:98 #, c-format msgid "Driver %s does not exist\n" msgstr "Le pilote %s n'existe pas\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:108 #, c-format msgid "" "The key already exists and is not forcibly overwritten, ignoring the setting " "operation\n" "If you want to ignore this error, use the \"-i\" parameter\n" msgstr "" "La clé existe déjà et n'est pas écrasée de manière forcée\n" "Si vous souhaitez ignorer cette erreur, utilisez le paramètre \"-i\"\n" #: ../src/utils/biometric-device-discover/community-multidevice/community_multidevice_discover_tool.c:119 #, c-format msgid "Failed to initialize libfprint\n" msgstr "Échec d'initialisation de libfprint\n" biometric-authentication/po/pt.po0000644000175000017500000016212413755706021016105 0ustar fengfeng# Portuguese translations for biometric-authentication package. # Copyright (C) 2018 THE biometric-authentication'S COPYRIGHT HOLDER # This file is distributed under the same license as the biometric-authentication package. # droiing , 2018. # msgid "" msgstr "" "Project-Id-Version: biometric-authentication 0.9.62\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-07-31 11:01+0800\n" "PO-Revision-Date: 2018-10-12 10:25+0800\n" "Last-Translator: droiing \n" "Language-Team: Chinese (simplified)\n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7.1\n" #: ../src/biometric-authenticationd.c:304 #: ../src/biometric-authenticationd.c:382 #: ../src/biometric-authenticationd.c:571 #: ../src/biometric-authenticationd.c:676 #: ../src/biometric-authenticationd.c:792 #: ../src/biometric-authenticationd.c:872 #: ../src/biometric-authenticationd.c:1010 #: ../src/biometric-authenticationd.c:1173 #: ../src/biometric-authenticationd.c:1280 #: ../src/biometric-authenticationd.c:1357 #: ../src/biometric-authenticationd.c:1485 #: ../src/biometric-authenticationd.c:1656 #, c-format msgid "Can't create thread: %s\n" msgstr "Não é possível criar o encadeamento: %s\n" #: ../src/biometric-authenticationd.c:503 #, c-format msgid "" "Framework automatically assigns the free index '%d' to driver %s user %d\n" msgstr "" "O Framework atribui automaticamente o índice livre '%d' ao driver %s user " "%d \n" #: ../src/biometric-authenticationd.c:511 msgid "Enroll Result: Success\n" msgstr "Registrar o resultado: sucesso\n" #: ../src/biometric-authenticationd.c:514 msgid "Enroll Result: Fail\n" msgstr "Registrar o resultado: falha\n" #: ../src/biometric-authenticationd.c:618 msgid "Verify Result: Match\n" msgstr "Verificar o resultado: corresponder\n" #: ../src/biometric-authenticationd.c:622 msgid "Verify Result: No Match\n" msgstr "Verificar o resultado: sem correspondência\n" #: ../src/biometric-authenticationd.c:727 #, c-format msgid "Identify Result: UID = %d\n" msgstr "Identifique o resultado: UID = %d\n" #: ../src/biometric-authenticationd.c:731 msgid "Identify Result: No Match\n" msgstr "Identifique o resultado: sem correspondência\n" #: ../src/biometric-authenticationd.c:829 #, c-format msgid "Capture Result: %.*s\n" msgstr "Resultado da captura: %.*s\n" #: ../src/biometric-authenticationd.c:832 msgid "Capture Result: ERROR\n" msgstr "Resultado da Captura: ERRO\n" #: ../src/biometric-authenticationd.c:1032 #, c-format msgid "%s Clean Result: Success\n" msgstr "%s Limpar resultado: sucesso\n" #: ../src/biometric-authenticationd.c:1035 #, c-format msgid "%s Clean Result: Failed\n" msgstr "%s Limpar resultado: falha\n" #. 系统层清理进行彻底的清理,免受当前不可用设备遗留的生物特征信息影响 #: ../src/biometric-authenticationd.c:1103 msgid "" "System level cleaning of the specified range of biometric features (all " "drivers)\n" msgstr "" "Limpeza no nível do sistema da faixa especificada de recursos biométricos " "(todos os drivers)\n" #: ../src/biometric-authenticationd.c:1111 msgid "System level Clean Result: Success\n" msgstr "Nível do sistema Limpar resultado: sucesso\n" #: ../src/biometric-authenticationd.c:1114 msgid "System level Clean Result: Failed\n" msgstr "Nível do sistema Limpar resultado: falha\n" #: ../src/biometric-authenticationd.c:1441 #, c-format msgid "Error: Failed to export object. Reason: %s\n" msgstr "Erro: falha ao exportar objeto. Razão: %s\n" #: ../src/biometric-authenticationd.c:1451 #, c-format msgid "name_acquired_cb called, Acquired bus name: %s\n" msgstr "name_acquired_cb chamado, nome do barramento adquirido: %s\n" #: ../src/biometric-authenticationd.c:1460 msgid "name_lost_cb called, Error: Failed to connect to dbus\n" msgstr "name_lost_cb chamado, erro: falha ao conectar-se ao dbus\n" #: ../src/biometric-authenticationd.c:1462 #, c-format msgid "name_lost_cb called, Error: Failed to obtain bus name: %s\n" msgstr "name_lost_cb chamado, Erro: falha ao obter o nome do barramento: %s\n" #: ../src/biometric-authenticationd.c:1470 msgid "run called in the server\n" msgstr "executar chamado no servidor\n" #: ../src/biometric-authenticationd.c:1487 #: ../src/biometric-authenticationd.c:1658 #, c-format msgid "New thread created: %s\n" msgstr "Novo thread criado: %s\n" #. * init for usage of "g" types #. g_type_init(); #: ../src/biometric-authenticationd.c:1500 msgid "InitDBusCommunicationServer: Server started\n" msgstr "InitDBusCommunicationServer: servidor iniciado\n" #: ../src/biometric-authenticationd.c:1576 #, c-format msgid "libusb_handle_events failed: %s\n" msgstr "libusb_handle_events falhou: %s\n" #: ../src/biometric-authenticationd.c:1593 msgid "" "The biometric authentication server failed to start, requiring administrator " "permission to start\n" msgstr "" "O servidor de autenticação biométrica falhou ao iniciar, exigindo permissão " "do administrador para iniciar\n" #: ../src/biometric-authenticationd.c:1616 #, c-format msgid "Can not open PID file: %s\n" msgstr "Não é possível abrir o arquivo PID: %s\n" #: ../src/biometric-authenticationd.c:1623 msgid "" "Biometric authentication server is running, Do not restart it repeatedly\n" msgstr "" "O servidor de autenticação biométrica está em execução. Não reinicie " "repetidamente\n" #: ../src/biometric-authenticationd.c:1632 #, c-format msgid "There is an exception to write PID file: %s\n" msgstr "Há uma exceção para gravar o arquivo PID: %s\n" #: ../src/biometric-authenticationd.c:1640 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:155 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:173 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:192 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:226 msgid "No such device" msgstr "Nenhum dispositivo" #: ../src/biometric-authenticationd.c:1641 msgid "Device busy" msgstr "Dispositivo ocupado" #: ../src/biometric-authenticationd.c:1646 msgid "Initial biometric recognition framework failed\n" msgstr "A estrutura inicial de reconhecimento biométrico falhou\n" #: ../src/biometric-dbus-common.c:51 #, c-format msgid "" "The UID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "" "As informações de UID do solicitante (%s) não puderam ser obtidas. Erro: " "%s \n" #: ../src/biometric-dbus-common.c:87 #, c-format msgid "" "The PID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "" "As informações do PID do solicitante (%s) não puderam ser obtidas. Erro: " "%s \n" #: ../src/lib/biometric_common.c:170 msgid "Current driver list:" msgstr "Lista de drivers atual:" #: ../src/lib/biometric_common.c:208 msgid "Current device list:" msgstr "Lista de dispositivos atual:" #: ../src/lib/biometric_common.c:267 ../src/lib/biometric_common.c:285 #: ../src/lib/biometric_common.c:331 ../src/lib/biometric_config.c:39 #, c-format msgid "Error[%d]: %s\n" msgstr "Erro [%d]: %s\n" #: ../src/lib/biometric_common.c:311 msgid "" "can't find \"bioconf\" struct, maybe someone forget use \"bio_conf_init()\" " "before\n" msgstr "" "não consigo encontrar \"bioconf\" struct, talvez alguém esqueça " "\"bio_conf_init()\" antes de\n" #: ../src/lib/biometric_common.c:323 ../src/lib/biometric_storage.c:229 #: ../src/lib/biometric_storage.c:300 ../src/lib/biometric_storage.c:367 #: ../src/lib/biometric_storage.c:409 ../src/lib/biometric_storage.c:597 msgid "Unable to allocate memory\n" msgstr "Não é possível alocar memória\n" #: ../src/lib/biometric_common.c:338 #, c-format msgid "No define driver in [%s]\n" msgstr "Nenhum driver de definição em [%s]\n" #: ../src/lib/biometric_common.c:351 #, c-format msgid "Loaded Driver: %s\n" msgstr "Driver carregado: %s\n" #: ../src/lib/biometric_common.c:360 #, c-format msgid "%s driver configure failed\n" msgstr "Falha na configuração do driver %s\n" #. 检测驱动版本兼容性 #: ../src/lib/biometric_common.c:368 #, c-format msgid "%s driver DRV_API version: %d.%d.%d\n" msgstr "%s driver DRV_API versão: %d.%d.%d\n" #: ../src/lib/biometric_common.c:380 #, c-format msgid "" "Detected Compatibility issues: %s driver version is higher than biometric " "framework\n" msgstr "" "Problemas de compatibilidade detectados: versão do driver %s é superior à " "estrutura biométrica\n" #: ../src/lib/biometric_common.c:384 #, c-format msgid "" "Detected Compatibility issues: %s driver version is lower than biometric " "framework\n" msgstr "" "Problemas detectados de compatibilidade: %s versão do driver é inferior à " "estrutura biométrica\n" #: ../src/lib/biometric_common.c:395 #, c-format msgid "Driver %s initialization failed\n" msgstr "Falha na inicialização do driver %s\n" #: ../src/lib/biometric_common.c:430 msgid "Error: Can not register attach callback error\n" msgstr "" "Erro: não é possível registrar o erro de retorno de chamada de anexação\n" #: ../src/lib/biometric_common.c:443 msgid "Error: Can not register detach callback error\n" msgstr "" "Erro: não é possível registrar o erro de retorno de chamada de desanexação\n" #: ../src/lib/biometric_common.c:494 msgid "Biometric framework API version:\n" msgstr "Versão da API de estrutura biométrica:\n" #: ../src/lib/biometric_common.c:495 #, c-format msgid " Driver API(DRV_API): %d.%d.%d\n" msgstr " API do driver (DRV_API): %d.%d.%d\n" #: ../src/lib/biometric_common.c:499 #, c-format msgid " Application API(APP_API): %d.%d.%d\n" msgstr " API do aplicativo (APP_API): %d.%d.%d\n" #: ../src/lib/biometric_common.c:506 msgid "bio_conf_init failed\n" msgstr "Falha no bio_conf_init\n" #: ../src/lib/biometric_common.c:522 #, c-format msgid "failed to initialise libusb: %s\n" msgstr "falhou ao inicializar a libusb: %s\n" #: ../src/lib/biometric_common.c:570 ../src/lib/biometric_common.c:616 #: ../src/lib/biometric_common.c:660 ../src/lib/biometric_common.c:706 #: ../src/lib/biometric_common.c:754 ../src/lib/biometric_common.c:798 #: ../src/lib/biometric_common.c:848 ../src/lib/biometric_common.c:890 #, c-format msgid "Open Result: %d\n" msgstr "Resultado aberto: %d\n" #: ../src/lib/biometric_common.c:586 ../src/lib/biometric_common.c:632 #: ../src/lib/biometric_common.c:676 ../src/lib/biometric_common.c:722 #: ../src/lib/biometric_common.c:770 ../src/lib/biometric_common.c:814 #: ../src/lib/biometric_common.c:857 #, c-format msgid "Close Device: %s\n" msgstr "Feche o dispositivo: %s\n" #: ../src/lib/biometric_common.c:587 ../src/lib/biometric_common.c:633 #: ../src/lib/biometric_common.c:677 ../src/lib/biometric_common.c:723 #: ../src/lib/biometric_common.c:771 ../src/lib/biometric_common.c:815 #: ../src/lib/biometric_common.c:858 #, c-format msgid "Device Status: [%d]%s\n" msgstr "Status do dispositivo: [%d] %s\n" #: ../src/lib/biometric_common.c:627 ../src/lib/biometric_common.c:717 #: ../src/lib/biometric_common.c:765 #, c-format msgid "%s\n" msgstr "%s\n" #: ../src/lib/biometric_common.c:1056 ../src/lib/biometric_common.c:1247 msgid "Device idle" msgstr "Dispositivo ocioso" #: ../src/lib/biometric_common.c:1058 msgid "Device is in process" msgstr "O dispositivo está em processo" #: ../src/lib/biometric_common.c:1060 msgid "Terminating current operation" msgstr "Terminando a operação atual" #: ../src/lib/biometric_common.c:1062 msgid "Device is disabled" msgstr "O dispositivo está desativado" #: ../src/lib/biometric_common.c:1065 msgid "Opening device" msgstr "Dispositivo de abertura" #: ../src/lib/biometric_common.c:1067 msgid "Terminating open operation" msgstr "Terminando operação aberta" #: ../src/lib/biometric_common.c:1070 msgid "Enrolling" msgstr "Inscrevendo" #: ../src/lib/biometric_common.c:1072 msgid "Terminating enroll operation" msgstr "Terminando a operação de inscrição" #: ../src/lib/biometric_common.c:1075 msgid "Verifying" msgstr "Verificando" #: ../src/lib/biometric_common.c:1077 msgid "Terminating Verify operation" msgstr "Terminando Verificar operação" #: ../src/lib/biometric_common.c:1080 msgid "Identifying" msgstr "Identificando" #: ../src/lib/biometric_common.c:1082 msgid "Terminating identify operation" msgstr "Terminando identificar operação" #: ../src/lib/biometric_common.c:1085 msgid "Capturing" msgstr "Captura" #: ../src/lib/biometric_common.c:1087 msgid "Terminating capture operation" msgstr "Terminando a operação de captura" #: ../src/lib/biometric_common.c:1090 msgid "Searching" msgstr "Procurando" #: ../src/lib/biometric_common.c:1092 msgid "Terminating search operation" msgstr "Terminando a operação de pesquisa" #: ../src/lib/biometric_common.c:1095 msgid "Cleaning" msgstr "Limpeza" #: ../src/lib/biometric_common.c:1097 msgid "Terminating clean operation" msgstr "Terminar operação limpa" #: ../src/lib/biometric_common.c:1100 msgid "Getting feature list" msgstr "Obtendo lista de recursos" #: ../src/lib/biometric_common.c:1102 msgid "Terminating get feature list operation" msgstr "Terminar a operação da lista de recursos" #: ../src/lib/biometric_common.c:1105 msgid "Renaming feature" msgstr "Recurso de renomeação" #: ../src/lib/biometric_common.c:1107 msgid "Terminating feature rename operation" msgstr "Operação de renomeação de recursos de terminação" #: ../src/lib/biometric_common.c:1110 msgid "Closing" msgstr "Fechamento" #: ../src/lib/biometric_common.c:1112 msgid "Terminating close operation" msgstr "Terminando operação próxima" #: ../src/lib/biometric_common.c:1115 #, c-format msgid "Device unknown status code: %d\n" msgstr "Código de status desconhecido do dispositivo: %d\n" #: ../src/lib/biometric_common.c:1116 msgid "Device is in an unknown status..." msgstr "O dispositivo está em um status desconhecido ..." #: ../src/lib/biometric_common.c:1128 msgid "Operation successful" msgstr "Operação bem sucedida" #: ../src/lib/biometric_common.c:1130 ../src/lib/biometric_common.c:1249 msgid "Operation failed" msgstr "Operação falhou" #: ../src/lib/biometric_common.c:1132 ../src/lib/biometric_common.c:1251 msgid "An error was encountered during the operation" msgstr "Um erro foi encontrado durante a operação" #: ../src/lib/biometric_common.c:1134 ../src/lib/biometric_common.c:1253 msgid "The operation was interrupted by the user" msgstr "A operação foi interrompida pelo usuário" #: ../src/lib/biometric_common.c:1136 ../src/lib/biometric_common.c:1255 msgid "Operation timeout" msgstr "Tempo limite de operação" #: ../src/lib/biometric_common.c:1138 ../src/lib/biometric_common.c:1259 msgid "Out of memory" msgstr "Fora da memória" #: ../src/lib/biometric_common.c:1141 ../src/lib/biometric_common.c:1264 msgid "Open device completion" msgstr "Conclusão do dispositivo aberto" #: ../src/lib/biometric_common.c:1143 ../src/lib/biometric_common.c:1266 msgid "Open device failed" msgstr "Falha no dispositivo aberto" #: ../src/lib/biometric_common.c:1145 ../src/lib/biometric_common.c:1268 msgid "An error was encountered during the opening" msgstr "Um erro foi encontrado durante a abertura" #: ../src/lib/biometric_common.c:1148 ../src/lib/biometric_common.c:1271 msgid "Enroll feature successful" msgstr "Registrar recurso bem-sucedido" #: ../src/lib/biometric_common.c:1150 ../src/lib/biometric_common.c:1273 msgid "Enroll feature failed" msgstr "O recurso de inscrição falhou" #: ../src/lib/biometric_common.c:1152 ../src/lib/biometric_common.c:1275 msgid "An error was encountered during enrolling" msgstr "Um erro foi encontrado durante a inscrição" #: ../src/lib/biometric_common.c:1154 ../src/lib/biometric_common.c:1277 msgid "Enroll operation was interrupted by the user" msgstr "A operação de registro foi interrompida pelo usuário" #: ../src/lib/biometric_common.c:1156 ../src/lib/biometric_common.c:1279 msgid "Enroll operation timeout" msgstr "Registrar o tempo limite da operação" #: ../src/lib/biometric_common.c:1159 ../src/lib/biometric_common.c:1282 msgid "Verify feature match" msgstr "Verificar correspondência de recurso" #: ../src/lib/biometric_common.c:1161 ../src/lib/biometric_common.c:1284 msgid "Verify feature no match" msgstr "Verificar o recurso sem correspondência" #: ../src/lib/biometric_common.c:1163 ../src/lib/biometric_common.c:1286 msgid "An error was encountered during verifying" msgstr "Um erro foi encontrado durante a verificação" #: ../src/lib/biometric_common.c:1165 ../src/lib/biometric_common.c:1288 msgid "Verify operation was interrupted by the user" msgstr "Verificar se a operação foi interrompida pelo usuário" #: ../src/lib/biometric_common.c:1167 ../src/lib/biometric_common.c:1290 msgid "Verify operation timeout" msgstr "Verificar o tempo limite da operação" #: ../src/lib/biometric_common.c:1170 ../src/lib/biometric_common.c:1293 msgid "Identify feature match" msgstr "Identificar correspondência de recurso" #: ../src/lib/biometric_common.c:1172 ../src/lib/biometric_common.c:1295 msgid "Identify feature no match" msgstr "Identifique o recurso sem correspondência" #: ../src/lib/biometric_common.c:1174 ../src/lib/biometric_common.c:1297 msgid "An error was encountered during identifying" msgstr "Foi encontrado um erro durante a identificação" #: ../src/lib/biometric_common.c:1176 ../src/lib/biometric_common.c:1299 msgid "Identify operation was interrupted by the user" msgstr "A operação de identificação foi interrompida pelo usuário" #: ../src/lib/biometric_common.c:1178 ../src/lib/biometric_common.c:1301 msgid "Identify operation timeout" msgstr "Identifique o tempo limite da operação" #: ../src/lib/biometric_common.c:1181 ../src/lib/biometric_common.c:1304 msgid "Capture feature successful" msgstr "Recurso de captura bem-sucedido" #: ../src/lib/biometric_common.c:1183 ../src/lib/biometric_common.c:1306 msgid "Capture feature failed" msgstr "Recurso de captura falhou" #: ../src/lib/biometric_common.c:1185 ../src/lib/biometric_common.c:1308 msgid "An error was encountered during capturing" msgstr "Um erro foi encontrado durante a captura" #: ../src/lib/biometric_common.c:1187 ../src/lib/biometric_common.c:1310 msgid "Capture operation was interrupted by the user" msgstr "A operação de captura foi interrompida pelo usuário" #: ../src/lib/biometric_common.c:1189 ../src/lib/biometric_common.c:1312 msgid "Capture operation timeout" msgstr "Tempo limite da operação de captura" #: ../src/lib/biometric_common.c:1192 ../src/lib/biometric_common.c:1315 msgid "Find the specified features" msgstr "Encontre os recursos especificados" #: ../src/lib/biometric_common.c:1194 ../src/lib/biometric_common.c:1317 msgid "No specified features were found" msgstr "Nenhum recurso especificado foi encontrado" #: ../src/lib/biometric_common.c:1196 ../src/lib/biometric_common.c:1319 msgid "An error was encountered during searching" msgstr "Um erro foi encontrado durante a pesquisa" #: ../src/lib/biometric_common.c:1198 ../src/lib/biometric_common.c:1321 msgid "Search operation was interrupted by the user" msgstr "A operação de pesquisa foi interrompida pelo usuário" #: ../src/lib/biometric_common.c:1200 ../src/lib/biometric_common.c:1323 msgid "Search operation timeout" msgstr "Tempo limite da operação de pesquisa" #: ../src/lib/biometric_common.c:1203 ../src/lib/biometric_common.c:1326 msgid "Clean feature successful" msgstr "Recurso limpo bem-sucedido" #: ../src/lib/biometric_common.c:1205 ../src/lib/biometric_common.c:1328 msgid "Clean feature failed" msgstr "O recurso limpo falhou" #: ../src/lib/biometric_common.c:1207 ../src/lib/biometric_common.c:1330 msgid "An error was encountered during cleaning" msgstr "Um erro foi encontrado durante a limpeza" #: ../src/lib/biometric_common.c:1209 ../src/lib/biometric_common.c:1332 msgid "Clean operation was interrupted by the user" msgstr "Operação limpa foi interrompida pelo usuário" #: ../src/lib/biometric_common.c:1211 ../src/lib/biometric_common.c:1334 msgid "Clean operation timeout" msgstr "Limpe o tempo limite da operação" #: ../src/lib/biometric_common.c:1214 ../src/lib/biometric_common.c:1337 msgid "Get feature list completion" msgstr "Obter conclusão da lista de recursos" #: ../src/lib/biometric_common.c:1216 ../src/lib/biometric_common.c:1339 msgid "Get feature list failed" msgstr "Falha na obtenção da lista de recursos" #: ../src/lib/biometric_common.c:1218 ../src/lib/biometric_common.c:1341 msgid "An error was encountered during getting feature list" msgstr "Um erro foi encontrado durante a obtenção da lista de recursos" #: ../src/lib/biometric_common.c:1221 ../src/lib/biometric_common.c:1344 msgid "Rename feature successful" msgstr "Renomear recurso bem-sucedido" #: ../src/lib/biometric_common.c:1223 ../src/lib/biometric_common.c:1346 msgid "Rename feature failed" msgstr "Renomear recurso falhou" #: ../src/lib/biometric_common.c:1225 ../src/lib/biometric_common.c:1348 msgid "An error was encountered during renaming" msgstr "Um erro foi encontrado durante a renomeação" #: ../src/lib/biometric_common.c:1228 ../src/lib/biometric_common.c:1353 msgid "Close device completion" msgstr "Fechar conclusão do dispositivo" #: ../src/lib/biometric_common.c:1230 ../src/lib/biometric_common.c:1355 msgid "Close device failed" msgstr "Fechar dispositivo falhou" #: ../src/lib/biometric_common.c:1232 ../src/lib/biometric_common.c:1357 msgid "An error was encountered during closing" msgstr "Um erro foi encontrado durante o fechamento" #: ../src/lib/biometric_common.c:1235 msgid "Operation is in an unknown status......" msgstr "A operação está em um status desconhecido ......" #: ../src/lib/biometric_common.c:1257 msgid "Device is disable" msgstr "O dispositivo está desativado" #: ../src/lib/biometric_common.c:1261 msgid "The device or driver does not support this operation" msgstr "O dispositivo ou driver não suporta esta operação" #: ../src/lib/biometric_common.c:1350 msgid "Feature renaming is not complete, please try again" msgstr "A renomeação de recursos não está completa. Tente novamente" #: ../src/lib/biometric_common.c:1360 msgid "Device internal error" msgstr "Erro interno do dispositivo" #: ../src/lib/biometric_common.c:1473 msgid "Init libusb Error\n" msgstr "Init libusb Erro\n" #: ../src/lib/biometric_common.c:1480 msgid "Get USB Device List Error\n" msgstr "Obter o erro da lista de dispositivos USB\n" #: ../src/lib/biometric_common.c:1489 msgid "Can not get usb information\n" msgstr "Não é possível obter informações sobre o usb\n" #: ../src/lib/biometric_common.c:1506 #, c-format msgid "libbiometric detected usb device(%s): %d\n" msgstr "dispositivo usb libbiométrico detectado ( %s ): %d\n" #: ../src/lib/biometric_common.c:1747 #, c-format msgid "Get function %s handle error: %s\n" msgstr "Obter erro da alça da função %s : %s\n" #: ../src/lib/biometric_common.c:1764 msgid "Error: Can not get device descriptor\n" msgstr "Erro: não é possível obter o descritor de dispositivo\n" #: ../src/lib/biometric_common.c:1767 #, c-format msgid "Device attached: %04x:%04x\n" msgstr "Dispositivo anexado:%04x:%04x\n" #: ../src/lib/biometric_common.c:1828 msgid "Error getting device descriptor" msgstr "Erro ao obter o descritor de dispositivo" #: ../src/lib/biometric_common.c:1831 #, c-format msgid "Device detached: %04x:%04x\n" msgstr "Dispositivo desanexado:%04x:%04x\n" #: ../src/lib/biometric_common.c:1957 msgid "Unable to find feature that require renaming\n" msgstr "Não foi possível encontrar o recurso que exige renomeação\n" #: ../src/lib/biometric_common.c:1960 #, c-format msgid "There are %d feature samples to renaming failed, please try again\n" msgstr "Há %d amostras de recursos para renomear com falha, tente novamente\n" #: ../src/lib/biometric_storage.c:190 ../src/lib/biometric_storage.c:206 #: ../src/lib/biometric_storage.c:387 ../src/lib/biometric_storage.c:517 #: ../src/lib/biometric_storage.c:559 ../src/lib/biometric_storage.c:616 #: ../src/lib/biometric_storage.c:636 ../src/lib/biometric_storage.c:663 #: ../src/lib/biometric_storage.c:689 ../src/lib/biometric_storage.c:740 #: ../src/lib/biometric_storage.c:1046 ../src/lib/biometric_storage.c:1155 #: ../src/lib/biometric_storage.c:1169 #, c-format msgid "sqlite3 prepare err: %s\n" msgstr "sqlite3 prepare err: %s\n" #: ../src/lib/biometric_storage.c:198 #, c-format msgid "Unable to set database(%s) permissions. ERROR[%d]: %s\n" msgstr "" "Não é possível definir as permissões do banco de dados ( %s ). ERRO [%d]: " "%s\n" #: ../src/lib/biometric_storage.c:712 msgid "Check database format version ...\n" msgstr "Verifique a versão do formato do banco de dados ...\n" #: ../src/lib/biometric_storage.c:720 #, c-format msgid "Find Table '%s' Error: %s\n" msgstr "Encontrar erro da tabela '%s': %s\n" #: ../src/lib/biometric_storage.c:754 #, c-format msgid "Database format version is %d.%d.%d\n" msgstr "A versão do formato de banco de dados é %d.%d.%d\n" #: ../src/lib/biometric_storage.c:762 #, c-format msgid "Failed to upgrade database format:version %d.%d.%d to %d.%d.%d\n" msgstr "" "Falha ao atualizar o formato do banco de dados: versão %d.%d.%d a %d.%d.%d\n" #: ../src/lib/biometric_storage.c:775 msgid "The database format is compatible with the current framework\n" msgstr "O formato do banco de dados é compatível com a estrutura atual\n" #: ../src/lib/biometric_storage.c:780 #, c-format msgid "" "Incompatible version of the database format: %d.%d.%d. Version required for " "the current framework: %d.%d.x" msgstr "" "Versão incompatível do formato de banco de dados: %d.%d.%d . Versão " "necessária para o framework atual: %d . %d .x" #: ../src/lib/biometric_storage.c:886 #, c-format msgid "Create Biometric Datebase Directory (%s) Error\n" msgstr "Criar um diretório biométrico de base de dados ( %s ) Erro\n" #: ../src/lib/biometric_storage.c:928 ../src/lib/biometric_storage.c:947 #: ../src/lib/biometric_storage.c:973 #, c-format msgid "Failure to modify the owner and group of %s. ERROR[%d]: %s\n" msgstr "Falha ao modificar o proprietário e o grupo de %s . ERRO [%d]: %s\n" #: ../src/lib/biometric_storage.c:992 msgid "Upgrade database ...\n" msgstr "Atualizar banco de dados ...\n" #: ../src/lib/biometric_storage.c:1002 #, c-format msgid "Rename Table 'EIGEN_INFO' to 'EIGEN_INFO_VERSION_0_0_0' Error: %s\n" msgstr "" "Renomeie a tabela 'EIGEN_INFO' para 'EIGEN_INFO_VERSION_0_0_0' Erro: %s\n" #: ../src/lib/biometric_storage.c:1031 #, c-format msgid "Failed to migrate data from the original table: %s\n" msgstr "Falha ao migrar dados da tabela original: %s\n" #: ../src/lib/biometric_storage.c:1061 #, c-format msgid "Update UUID=%s to database(UID=%d) ...\n" msgstr "Atualizar UUID = %s para banco de dados (UID = %d ) ...\n" #: ../src/lib/biometric_storage.c:1068 #, c-format msgid "Update column \"UUID\" to Table \"%s\" Error: %s\n" msgstr "Atualizar coluna \"UUID\" para a tabela \"%s\" Erro: %s\n" #: ../src/lib/biometric_storage.c:1111 ../src/lib/biometric_storage.c:1135 #, c-format msgid "" "Create Table %s:\n" "%s\n" msgstr "" "Criar tabela %s :\n" " %s\n" #: ../src/lib/biometric_storage.c:1115 ../src/lib/biometric_storage.c:1139 #, c-format msgid "Create Table '%s' Error: %s\n" msgstr "Erro de criação da tabela '%s': %s\n" #: ../src/lib/biometric_storage.c:1147 #, c-format msgid "" "Set Database Format(%d.%d.%d):\n" "%s\n" msgstr "" "Definir formato de banco de dados ( %d . %d %d ):\n" " %s\n" #: ../src/drivers/community-multidevice/community_ops.c:129 #, c-format msgid "Get AES Key File Error[%d]: %s, use default Key.\n" msgstr "Obter o erro do arquivo-chave AES [%d]: %s , use a chave padrão.\n" #: ../src/drivers/community-multidevice/community_ops.c:142 #, c-format msgid "" "AES Key File (%s) does not Exist or has no Read Permission, use default " "key.\n" msgstr "" "O arquivo de chave AES ( %s ) não existe ou não tem permissão de leitura, " "use a chave padrão.\n" #: ../src/drivers/community-multidevice/community_ops.c:159 #, c-format msgid "Can not open AES Key File: %s, use default key.\n" msgstr "" "Não é possível abrir o arquivo de chave AES: %s , use a chave padrão.\n" #: ../src/drivers/community-multidevice/community_ops.c:174 msgid "AES Key File is Enpty, use default Key.\n" msgstr "O arquivo de chave AES é Enpty, use a chave padrão.\n" #: ../src/drivers/community-multidevice/community_ops.c:198 msgid "AES Key is Enpty, use default Key.\n" msgstr "AES Key is Enpty, use a chave padrão.\n" #: ../src/drivers/community-multidevice/community_ops.c:234 #, c-format msgid "Detect %s device\n" msgstr "Detectar %s dispositivo\n" #: ../src/drivers/community-multidevice/community_ops.c:242 #: ../src/drivers/community-multidevice/community_ops.c:247 #, c-format msgid "No %s fingerprint device detected\n" msgstr "Nenhum dispositivo de impressão digital %s detectado\n" #: ../src/drivers/community-multidevice/community_ops.c:251 #, c-format msgid "There is %d %s fingerprint device detected\n" msgstr "Há %d %s dispositivo de impressão digital detectado\n" #: ../src/drivers/community-multidevice/community_ops.c:277 #, c-format msgid "Device failed to open" msgstr "O dispositivo não conseguiu abrir" #: ../src/drivers/community-multidevice/community_ops.c:333 #: ../src/drivers/community-multidevice/community_ops.c:1089 #: ../src/drivers/community-multidevice/community_ops.c:1277 #, c-format msgid "Unknown error, error code: %d" msgstr "Erro desconhecido, código de erro: %d" #: ../src/drivers/community-multidevice/community_ops.c:458 #: ../src/drivers/community-multidevice/community_ops.c:541 #: ../src/drivers/community-multidevice/community_ops.c:676 msgid "Find the following feature matching:\n" msgstr "Encontre o seguinte recurso correspondente:\n" #: ../src/drivers/community-multidevice/community_ops.c:625 #, c-format msgid "" "Search from offset %d, index %d has been searched, global index %d(%d + %d)\n" msgstr "" "Pesquisa do deslocamento %d , o índice %d foi pesquisado, índice global %d " "( %d + %d )\n" #: ../src/drivers/community-multidevice/community_ops.c:630 #, c-format msgid "" "The %d feature has been searched(UID = %d, Index = %d, Index Name = %s), " "please press your finger to continue the search" msgstr "" "O %d recurso foi pesquisado (UID = %d , Índice = %d , Nome do Índice = %s ), " "por favor, pressione o dedo para continuar a pesquisa" #: ../src/drivers/community-multidevice/community_ops.c:774 #, c-format msgid "Device %s[%d] received interrupt request\n" msgstr "Dispositivo %s [%d] recebeu pedido de interrupção\n" #: ../src/drivers/community-multidevice/community_ops.c:819 msgid "Sample complete" msgstr "Amostra completa" #: ../src/drivers/community-multidevice/community_ops.c:821 msgid "" "Enrollment failed due to incomprehensible data. (Please use the same finger " "at different sampling stages of the same enroll)" msgstr "" "A inscrição falhou devido a dados incompreensíveis. (Por favor, use o mesmo " "dedo em diferentes etapas de amostragem do mesmo registro)" #: ../src/drivers/community-multidevice/community_ops.c:825 msgid "" "Please place your finger again because of poor quality of the sample or " "other scanning problems" msgstr "" "Por favor, coloque o dedo novamente por causa da má qualidade da amostra ou " "outros problemas de digitalização" #: ../src/drivers/community-multidevice/community_ops.c:828 msgid "Your swipe was too short, please place your finger again." msgstr "Seu furto foi muito curto, por favor, coloque o dedo novamente." #: ../src/drivers/community-multidevice/community_ops.c:831 msgid "" "Didn't catch that, please center your finger on the sensor and try again." msgstr "Não entendi, centre seu dedo no sensor e tente novamente." #: ../src/drivers/community-multidevice/community_ops.c:834 msgid "" "Because of the scanning image quality or finger pressure problem, the " "sampling failed, please remove the finger and retry" msgstr "" "Devido à qualidade da imagem de digitalização ou à pressão do dedo, a " "amostragem falhou. Remova o dedo e tente novamente." #: ../src/drivers/community-multidevice/community_ops.c:838 msgid "Unable to generate feature data, enroll failure" msgstr "Não é possível gerar dados de recursos, registrar falha" #: ../src/drivers/community-multidevice/community_ops.c:840 msgid "" "Sample start, please press and lift your finger (Some devices need to swipe " "your finger)" msgstr "" "Exemplo de início, por favor, pressione e levante o dedo (alguns " "dispositivos precisam roubar o dedo)" #: ../src/drivers/community-multidevice/community_ops.c:895 #, c-format msgid "Could not open device (driver %s)" msgstr "Não foi possível abrir o dispositivo (driver %s )" #: ../src/drivers/community-multidevice/community_ops.c:1064 #: ../src/drivers/community-multidevice/community_ops.c:1229 #, c-format msgid "Failed to call function %s\n" msgstr "Falha ao chamar a função %s\n" #: ../src/drivers/community-multidevice/community_ops.c:1112 #, c-format msgid "" "Enroll failed: The feature was successfully sampled, but the encoding of the " "sampling feature could not be generated" msgstr "" "Registrar-se com falha: o recurso foi amostrado com êxito, mas a codificação " "do recurso de amostragem não pôde ser gerada" #: ../src/drivers/community-multidevice/community_ops.c:1129 #, c-format msgid "" "The %d [%d/%d] sampling was successful, in the next sampling: please press " "and lift your finger (Some devices need to swipe your finger)" msgstr "" "A amostragem %d [%d / %d] foi bem sucedida, na próxima amostragem: por " "favor, pressione e levante o dedo (alguns dispositivos precisam passar o " "dedo)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Disable" msgstr "Desabilitar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Enable" msgstr "Habilitar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Print" msgstr "Impressão digital" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Vein" msgstr "Veia do dedo" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Iris" msgstr "Íris" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Face" msgstr "Cara" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Voice Print" msgstr "Impressão de voz" # #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device" msgstr "Dispositivo" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "OS" msgstr "OS" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device and OS" msgstr "Dispositivo e sistema operacional" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Original Data" msgstr "Dados originais" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Value" msgstr "Valor Eigen" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Vector" msgstr "Vetor Eigen" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Hardware" msgstr "Hardware" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Software" msgstr "Programas" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Mix" msgstr "Misturar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:71 msgid "Other" msgstr "De outros" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "Serial" msgstr "Serial" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "USB" msgstr "USB" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "PCIE" msgstr "PCIE" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:70 msgid "Any" msgstr "Qualquer" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Common" msgstr "Comum" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Open" msgstr "Aberto" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Enroll" msgstr "Inscreva-se" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Verify" msgstr "Verificar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Identify" msgstr "Identificar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Capture" msgstr "Capturar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Search" msgstr "Pesquisa" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Clean" msgstr "Limpar \\ limpo" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "GetFeatureList" msgstr "GetFeatureList" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Rename" msgstr "Renomear" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Close" msgstr "Fechar" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:76 msgid "" "Usage:\n" " biometric-auth-client BuiltinCommands ...\n" "\n" "BuiltinCommands:\n" " get-driver-list Get Driver List\n" " get-device-list Get Device List\n" " get-feature-list Get Feature List\n" " enroll Enroll Feature\n" " verify Verify Feature\n" " capture Capture Feature\n" " search Search Feature\n" " clean Clean Feature\n" " rename Rename Feature\n" "\n" "Options:\n" " -h, --help show this help message and exit\n" msgstr "" "Uso:\n" " biométrico-auth-client BuiltinCommands ...\n" "\n" "Componentes:\n" " get-driver-list Obter lista de drivers\n" " get-device-list Obter lista de dispositivos\n" " get-feature-list Obter lista de recursos\n" " registrar Recurso Recurso\n" " verificar Verificar Recurso\n" " capturar Recurso de Captura\n" " procurar Recurso de Pesquisa\n" " limpar Recurso de Limpeza\n" " renomear Renomear Recurso\n" "\n" "Opções:\n" " -h, --help mostrar esta mensagem de ajuda e sair\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:116 msgid "non-existent user" msgstr "usuário inexistente" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:152 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:170 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:189 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:223 msgid "The device is busy, please try again later" msgstr "O dispositivo está ocupado, por favor, tente novamente mais tarde" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:158 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:176 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:195 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:229 msgid "No permission to perform this operation" msgstr "Sem permissão para executar esta operação" # c-format #: ../src/utils/biometric-auth-client/biometric-auth-client.in:179 #, c-format msgid "Character string: %s\n" msgstr "Cadeia de caracteres: %s\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "No." msgstr "Não." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User ID" msgstr "ID do usuário" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User Name" msgstr "Nome de usuário" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:452 msgid "Feature Index" msgstr "Índice de Recurso" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:391 msgid "Feature Name" msgstr "Nome do Recurso" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:212 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:250 msgid "List of features found:" msgstr "Lista de recursos encontrados:" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:347 msgid "Biometric Type" msgstr "Tipo biométrico" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver Name" msgstr "Nome do motorista" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:271 msgid "Show all fields (Highest priority)" msgstr "Mostrar todos os campos (prioridade mais alta)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:273 msgid "Show 'Driver Full Name' fields" msgstr "Mostrar os campos 'Driver Full Name'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:275 msgid "Show 'Biometric Type' fields" msgstr "Mostrar campos \"Tipo biométrico\"" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:277 msgid "Show 'Storge Type' fields" msgstr "Mostrar campos \"Tipo Storge\"" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:279 msgid "Show 'Eigen Type' fields" msgstr "Mostrar campos 'Tipo Eigen'" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:281 msgid "Show 'Verify Type' fields" msgstr "Mostrar campos \"Verificar tipo\"" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:283 msgid "Show 'Identify Type' fields" msgstr "Mostrar campos \"Identificar tipo\"" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver ID" msgstr "ID do motorista" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:342 msgid "Driver Full Name" msgstr "Nome Completo do Driver" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:344 msgid "Status" msgstr "Status" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:350 msgid "Storge Type" msgstr "Tipo Storge" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:353 msgid "Eigen Type" msgstr "Tipo Eigen" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:356 msgid "Verify Type" msgstr "Verifique o tipo" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:359 msgid "Identify Type" msgstr "Identifique o tipo" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:361 msgid "Bus Type" msgstr "Tipo de ônibus" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:294 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:411 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:472 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:525 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:590 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:656 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:714 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:778 msgid "Biometric identification backend framework service is not started" msgstr "" "O serviço de estrutura de back-end de identificação biométrica não foi " "iniciado" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:300 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:419 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:480 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:533 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:598 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:664 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:722 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:786 msgid "" "Client APP_API is newer than biometric identification framework service. " "Please upgrade framework service or degrade client.\n" msgstr "" "O cliente APP_API é mais recente que o serviço de estrutura de identificação " "biométrica. Por favor, atualize o serviço de estrutura ou degrade o " "cliente.\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:304 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:423 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:484 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:537 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:602 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:668 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:726 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:790 msgid "" "Client APP_API is older than biometric identification framework service. " "Please degrade framework service or upgrade client.\n" msgstr "" "O cliente APP_API é mais antigo que o serviço de estrutura de identificação " "biométrica. Por favor, degrade o serviço de estrutura ou atualize o " "cliente.\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:383 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:387 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:448 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:627 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:693 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:751 #, c-format msgid "User Name (Default is current user: %s)" msgstr "Nome de usuário (o padrão é o usuário atual: %s )" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:389 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:450 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:509 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:564 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:629 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:695 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:753 msgid "Driver(or Device) ID" msgstr "ID do driver (ou dispositivo)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:401 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:462 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:515 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:580 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:641 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:704 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:768 msgid "Input parameter error\n" msgstr "Erro no parâmetro de entrada\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:444 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:623 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:505 #, c-format msgid "%s %s -d DRIVER_ID" msgstr "%s %s -d DRIVER_ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:558 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:562 msgid "User Name (Not set to search for all users)" msgstr "Nome de usuário (não definido para procurar todos os usuários)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:566 msgid "Start of Feature Index (default 0)" msgstr "Início do índice de recursos (padrão 0)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:568 msgid "End of Feature Index (default -1, means search all)" msgstr "End of Feature Index (padrão -1, significa pesquisar todos)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:631 msgid "The Feature Index You Want To Delete (-1 means delete all)" msgstr "" "O índice de recursos que você deseja excluir (-1 significa excluir todos)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:689 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:747 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME" msgstr "%s %s [-u USER_NAME] -d DRIVER_ID -i ÍNDICE -n NEW_NAME" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:755 msgid "The Feature Index that needs to be renamed" msgstr "O índice de recursos que precisa ser renomeado" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:757 msgid "New Feature Name" msgstr "Novo nome de recurso" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:814 msgid "" "The abort operation failed and the current operation will continue in the " "background." msgstr "" "A operação de interrupção falhou e a operação atual continuará em segundo " "plano." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:815 msgid "The device may have to wait a while before being used." msgstr "O dispositivo pode ter que esperar um pouco antes de ser usado." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:816 msgid "" "The wait problem can be solved by restarting the biometrics backend " "framework service." msgstr "" "O problema de espera pode ser resolvido reiniciando o serviço de estrutura " "de backend de biometria." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:860 #, c-format msgid "Unknown Builtin Commands: %s\n" msgstr "Comandos Builtin Desconhecidos: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:39 msgid "When there is a driver of the same name, force to override it" msgstr "Quando há um driver com o mesmo nome, força para substituí-lo" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:41 msgid "Only add driver and Not enable driver" msgstr "Apenas adicionar driver e não ativar o driver" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:52 msgid "DriverName DriverFilePath" msgstr "DriverName DriverFilePath" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:61 #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:75 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:280 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:64 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:78 #, c-format msgid "Error parsing commandline options: %s\n" msgstr "Erro ao analisar as opções de linha de comando: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:74 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:77 msgid "The number of parameters is incorrect" msgstr "O número de parâmetros está incorreto" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:86 #, c-format msgid "" "This driver already exists, using the -f parameter if you need to override " "the configuration\n" msgstr "" "Este driver já existe, usando o parâmetro -f se você precisar sobrescrever a " "configuração\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:104 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:96 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:93 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:124 #, c-format msgid "Write configuration failure: %s\n" msgstr "Falha na configuração de gravação: %s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:38 msgid "Ignore nonexistent drivers" msgstr "Ignore drivers inexistentes" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:48 msgid "Driver1 [Driver2 ...]" msgstr "Driver1 [Driver2 ...]" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:79 #, c-format msgid "" "Driver %s does not exist, if you need to ignore the problem, use -i " "parameter\n" msgstr "" "O driver %s não existe, se você precisar ignorar o problema, use o parâmetro " "-i\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:53 msgid "Add driver" msgstr "Adicionar motorista" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:54 msgid "Remove drive" msgstr "Remover unidade" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:55 msgid "Enable driver" msgstr "Ativar driver" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:56 msgid "Disable driver" msgstr "Desativar driver" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:57 msgid "Set the key value of the specified driver" msgstr "Definir o valor da chave do driver especificado" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:58 msgid "remove the key value of the specified driver" msgstr "remova o valor da chave do driver especificado" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:105 msgid "BuiltinCommands" msgstr "Comandos Criados" #. g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:108 msgid "Builtin commands: " msgstr "Comandos incorporados: " #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:222 #, c-format msgid "Unknown command %s" msgstr "Comando desconhecido %s" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:231 msgid "Missing builtin command" msgstr "Comando interno ausente" #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:48 msgid "DriverName Key" msgstr "DriverName Key" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:41 msgid "Forcibly overrides the existing key" msgstr "Forçosamente substitui a chave existente" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:43 msgid "Ignore this setting if the key already exists" msgstr "Ignore esta configuração se a chave já existir" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:55 msgid "DriverName Key Value" msgstr "Valor da Chave do DriverName" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:98 #, c-format msgid "Driver %s does not exist\n" msgstr "O driver %s não existe\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:108 #, c-format msgid "" "The key already exists and is not forcibly overwritten, ignoring the setting " "operation\n" "If you want to ignore this error, use the \"-i\" parameter\n" msgstr "" "A chave já existe e não é sobrescrita, ignorando a operação de configuração\n" "Se você quiser ignorar este erro, use o parâmetro \"-i\"\n" #: ../src/utils/biometric-device-discover/community-multidevice/community_multidevice_discover_tool.c:119 #, c-format msgid "Failed to initialize libfprint\n" msgstr "Falha ao inicializar a libfprint\n" biometric-authentication/po/bo.po0000644000175000017500000013105513755706021016061 0ustar fengfeng# Tibetan translations for biometric-authentication package. # Copyright (C) 2018 THE biometric-authentication'S COPYRIGHT HOLDER # This file is distributed under the same license as the biometric-authentication package. # droiing , 2018. # msgid "" msgstr "" "Project-Id-Version: biometric-authentication 0.9.62\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-07-31 11:01+0800\n" "PO-Revision-Date: 2018-11-01 15:39+0800\n" "Last-Translator: droiing \n" "Language-Team: Chinese (simplified)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7.1\n" #: ../src/biometric-authenticationd.c:304 #: ../src/biometric-authenticationd.c:382 #: ../src/biometric-authenticationd.c:571 #: ../src/biometric-authenticationd.c:676 #: ../src/biometric-authenticationd.c:792 #: ../src/biometric-authenticationd.c:872 #: ../src/biometric-authenticationd.c:1010 #: ../src/biometric-authenticationd.c:1173 #: ../src/biometric-authenticationd.c:1280 #: ../src/biometric-authenticationd.c:1357 #: ../src/biometric-authenticationd.c:1485 #: ../src/biometric-authenticationd.c:1656 #, c-format msgid "Can't create thread: %s\n" msgstr "" #: ../src/biometric-authenticationd.c:503 #, c-format msgid "" "Framework automatically assigns the free index '%d' to driver %s user %d\n" msgstr "" #: ../src/biometric-authenticationd.c:511 msgid "Enroll Result: Success\n" msgstr "" #: ../src/biometric-authenticationd.c:514 msgid "Enroll Result: Fail\n" msgstr "" #: ../src/biometric-authenticationd.c:618 msgid "Verify Result: Match\n" msgstr "" #: ../src/biometric-authenticationd.c:622 msgid "Verify Result: No Match\n" msgstr "" #: ../src/biometric-authenticationd.c:727 #, c-format msgid "Identify Result: UID = %d\n" msgstr "" #: ../src/biometric-authenticationd.c:731 msgid "Identify Result: No Match\n" msgstr "" #: ../src/biometric-authenticationd.c:829 #, c-format msgid "Capture Result: %.*s\n" msgstr "" #: ../src/biometric-authenticationd.c:832 msgid "Capture Result: ERROR\n" msgstr "" #: ../src/biometric-authenticationd.c:1032 #, c-format msgid "%s Clean Result: Success\n" msgstr "" #: ../src/biometric-authenticationd.c:1035 #, c-format msgid "%s Clean Result: Failed\n" msgstr "" #. 系统层清理进行彻底的清理,免受当前不可用设备遗留的生物特征信息影响 #: ../src/biometric-authenticationd.c:1103 msgid "" "System level cleaning of the specified range of biometric features (all " "drivers)\n" msgstr "" #: ../src/biometric-authenticationd.c:1111 msgid "System level Clean Result: Success\n" msgstr "" #: ../src/biometric-authenticationd.c:1114 msgid "System level Clean Result: Failed\n" msgstr "" #: ../src/biometric-authenticationd.c:1441 #, c-format msgid "Error: Failed to export object. Reason: %s\n" msgstr "" #: ../src/biometric-authenticationd.c:1451 #, c-format msgid "name_acquired_cb called, Acquired bus name: %s\n" msgstr "" #: ../src/biometric-authenticationd.c:1460 msgid "name_lost_cb called, Error: Failed to connect to dbus\n" msgstr "" #: ../src/biometric-authenticationd.c:1462 #, c-format msgid "name_lost_cb called, Error: Failed to obtain bus name: %s\n" msgstr "" #: ../src/biometric-authenticationd.c:1470 msgid "run called in the server\n" msgstr "" #: ../src/biometric-authenticationd.c:1487 #: ../src/biometric-authenticationd.c:1658 #, c-format msgid "New thread created: %s\n" msgstr "" #. * init for usage of "g" types #. g_type_init(); #: ../src/biometric-authenticationd.c:1500 msgid "InitDBusCommunicationServer: Server started\n" msgstr "" #: ../src/biometric-authenticationd.c:1576 #, c-format msgid "libusb_handle_events failed: %s\n" msgstr "" #: ../src/biometric-authenticationd.c:1593 msgid "" "The biometric authentication server failed to start, requiring administrator " "permission to start\n" msgstr "" #: ../src/biometric-authenticationd.c:1616 #, c-format msgid "Can not open PID file: %s\n" msgstr "" #: ../src/biometric-authenticationd.c:1623 msgid "" "Biometric authentication server is running, Do not restart it repeatedly\n" msgstr "" #: ../src/biometric-authenticationd.c:1632 #, c-format msgid "There is an exception to write PID file: %s\n" msgstr "" #: ../src/biometric-authenticationd.c:1640 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:155 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:173 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:192 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:226 msgid "No such device" msgstr "" #: ../src/biometric-authenticationd.c:1641 msgid "Device busy" msgstr "" #: ../src/biometric-authenticationd.c:1646 msgid "Initial biometric recognition framework failed\n" msgstr "" #: ../src/biometric-dbus-common.c:51 #, c-format msgid "" "The UID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "" #: ../src/biometric-dbus-common.c:87 #, c-format msgid "" "The PID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "" #: ../src/lib/biometric_common.c:170 msgid "Current driver list:" msgstr "" #: ../src/lib/biometric_common.c:208 msgid "Current device list:" msgstr "" #: ../src/lib/biometric_common.c:267 ../src/lib/biometric_common.c:285 #: ../src/lib/biometric_common.c:331 ../src/lib/biometric_config.c:39 #, c-format msgid "Error[%d]: %s\n" msgstr "" #: ../src/lib/biometric_common.c:311 msgid "" "can't find \"bioconf\" struct, maybe someone forget use \"bio_conf_init()\" " "before\n" msgstr "" #: ../src/lib/biometric_common.c:323 ../src/lib/biometric_storage.c:229 #: ../src/lib/biometric_storage.c:300 ../src/lib/biometric_storage.c:367 #: ../src/lib/biometric_storage.c:409 ../src/lib/biometric_storage.c:597 msgid "Unable to allocate memory\n" msgstr "" #: ../src/lib/biometric_common.c:338 #, c-format msgid "No define driver in [%s]\n" msgstr "" #: ../src/lib/biometric_common.c:351 #, c-format msgid "Loaded Driver: %s\n" msgstr "" #: ../src/lib/biometric_common.c:360 #, c-format msgid "%s driver configure failed\n" msgstr "" #. 检测驱动版本兼容性 #: ../src/lib/biometric_common.c:368 #, c-format msgid "%s driver DRV_API version: %d.%d.%d\n" msgstr "" #: ../src/lib/biometric_common.c:380 #, c-format msgid "" "Detected Compatibility issues: %s driver version is higher than biometric " "framework\n" msgstr "" #: ../src/lib/biometric_common.c:384 #, c-format msgid "" "Detected Compatibility issues: %s driver version is lower than biometric " "framework\n" msgstr "" #: ../src/lib/biometric_common.c:395 #, c-format msgid "Driver %s initialization failed\n" msgstr "" #: ../src/lib/biometric_common.c:430 msgid "Error: Can not register attach callback error\n" msgstr "" #: ../src/lib/biometric_common.c:443 msgid "Error: Can not register detach callback error\n" msgstr "" #: ../src/lib/biometric_common.c:494 msgid "Biometric framework API version:\n" msgstr "" #: ../src/lib/biometric_common.c:495 #, c-format msgid " Driver API(DRV_API): %d.%d.%d\n" msgstr "" #: ../src/lib/biometric_common.c:499 #, c-format msgid " Application API(APP_API): %d.%d.%d\n" msgstr "" #: ../src/lib/biometric_common.c:506 msgid "bio_conf_init failed\n" msgstr "" #: ../src/lib/biometric_common.c:522 #, c-format msgid "failed to initialise libusb: %s\n" msgstr "" #: ../src/lib/biometric_common.c:570 ../src/lib/biometric_common.c:616 #: ../src/lib/biometric_common.c:660 ../src/lib/biometric_common.c:706 #: ../src/lib/biometric_common.c:754 ../src/lib/biometric_common.c:798 #: ../src/lib/biometric_common.c:848 ../src/lib/biometric_common.c:890 #, c-format msgid "Open Result: %d\n" msgstr "" #: ../src/lib/biometric_common.c:586 ../src/lib/biometric_common.c:632 #: ../src/lib/biometric_common.c:676 ../src/lib/biometric_common.c:722 #: ../src/lib/biometric_common.c:770 ../src/lib/biometric_common.c:814 #: ../src/lib/biometric_common.c:857 #, c-format msgid "Close Device: %s\n" msgstr "" #: ../src/lib/biometric_common.c:587 ../src/lib/biometric_common.c:633 #: ../src/lib/biometric_common.c:677 ../src/lib/biometric_common.c:723 #: ../src/lib/biometric_common.c:771 ../src/lib/biometric_common.c:815 #: ../src/lib/biometric_common.c:858 #, c-format msgid "Device Status: [%d]%s\n" msgstr "" #: ../src/lib/biometric_common.c:627 ../src/lib/biometric_common.c:717 #: ../src/lib/biometric_common.c:765 #, c-format msgid "%s\n" msgstr "" #: ../src/lib/biometric_common.c:1056 ../src/lib/biometric_common.c:1247 msgid "Device idle" msgstr "" #: ../src/lib/biometric_common.c:1058 msgid "Device is in process" msgstr "" #: ../src/lib/biometric_common.c:1060 msgid "Terminating current operation" msgstr "" #: ../src/lib/biometric_common.c:1062 msgid "Device is disabled" msgstr "" #: ../src/lib/biometric_common.c:1065 msgid "Opening device" msgstr "" #: ../src/lib/biometric_common.c:1067 msgid "Terminating open operation" msgstr "" #: ../src/lib/biometric_common.c:1070 msgid "Enrolling" msgstr "" #: ../src/lib/biometric_common.c:1072 msgid "Terminating enroll operation" msgstr "" #: ../src/lib/biometric_common.c:1075 msgid "Verifying" msgstr "" #: ../src/lib/biometric_common.c:1077 msgid "Terminating Verify operation" msgstr "" #: ../src/lib/biometric_common.c:1080 msgid "Identifying" msgstr "" #: ../src/lib/biometric_common.c:1082 msgid "Terminating identify operation" msgstr "" #: ../src/lib/biometric_common.c:1085 msgid "Capturing" msgstr "" #: ../src/lib/biometric_common.c:1087 msgid "Terminating capture operation" msgstr "" #: ../src/lib/biometric_common.c:1090 msgid "Searching" msgstr "" #: ../src/lib/biometric_common.c:1092 msgid "Terminating search operation" msgstr "" #: ../src/lib/biometric_common.c:1095 msgid "Cleaning" msgstr "" #: ../src/lib/biometric_common.c:1097 msgid "Terminating clean operation" msgstr "" #: ../src/lib/biometric_common.c:1100 msgid "Getting feature list" msgstr "" #: ../src/lib/biometric_common.c:1102 msgid "Terminating get feature list operation" msgstr "" #: ../src/lib/biometric_common.c:1105 msgid "Renaming feature" msgstr "" #: ../src/lib/biometric_common.c:1107 msgid "Terminating feature rename operation" msgstr "" #: ../src/lib/biometric_common.c:1110 msgid "Closing" msgstr "" #: ../src/lib/biometric_common.c:1112 msgid "Terminating close operation" msgstr "" #: ../src/lib/biometric_common.c:1115 #, c-format msgid "Device unknown status code: %d\n" msgstr "" #: ../src/lib/biometric_common.c:1116 msgid "Device is in an unknown status..." msgstr "" #: ../src/lib/biometric_common.c:1128 msgid "Operation successful" msgstr "" #: ../src/lib/biometric_common.c:1130 ../src/lib/biometric_common.c:1249 msgid "Operation failed" msgstr "" #: ../src/lib/biometric_common.c:1132 ../src/lib/biometric_common.c:1251 msgid "An error was encountered during the operation" msgstr "" #: ../src/lib/biometric_common.c:1134 ../src/lib/biometric_common.c:1253 msgid "The operation was interrupted by the user" msgstr "" #: ../src/lib/biometric_common.c:1136 ../src/lib/biometric_common.c:1255 msgid "Operation timeout" msgstr "" #: ../src/lib/biometric_common.c:1138 ../src/lib/biometric_common.c:1259 msgid "Out of memory" msgstr "" #: ../src/lib/biometric_common.c:1141 ../src/lib/biometric_common.c:1264 msgid "Open device completion" msgstr "" #: ../src/lib/biometric_common.c:1143 ../src/lib/biometric_common.c:1266 msgid "Open device failed" msgstr "" #: ../src/lib/biometric_common.c:1145 ../src/lib/biometric_common.c:1268 msgid "An error was encountered during the opening" msgstr "" #: ../src/lib/biometric_common.c:1148 ../src/lib/biometric_common.c:1271 msgid "Enroll feature successful" msgstr "" #: ../src/lib/biometric_common.c:1150 ../src/lib/biometric_common.c:1273 msgid "Enroll feature failed" msgstr "" #: ../src/lib/biometric_common.c:1152 ../src/lib/biometric_common.c:1275 msgid "An error was encountered during enrolling" msgstr "" #: ../src/lib/biometric_common.c:1154 ../src/lib/biometric_common.c:1277 msgid "Enroll operation was interrupted by the user" msgstr "" #: ../src/lib/biometric_common.c:1156 ../src/lib/biometric_common.c:1279 msgid "Enroll operation timeout" msgstr "" #: ../src/lib/biometric_common.c:1159 ../src/lib/biometric_common.c:1282 msgid "Verify feature match" msgstr "" #: ../src/lib/biometric_common.c:1161 ../src/lib/biometric_common.c:1284 msgid "Verify feature no match" msgstr "" #: ../src/lib/biometric_common.c:1163 ../src/lib/biometric_common.c:1286 msgid "An error was encountered during verifying" msgstr "" #: ../src/lib/biometric_common.c:1165 ../src/lib/biometric_common.c:1288 msgid "Verify operation was interrupted by the user" msgstr "" #: ../src/lib/biometric_common.c:1167 ../src/lib/biometric_common.c:1290 msgid "Verify operation timeout" msgstr "" #: ../src/lib/biometric_common.c:1170 ../src/lib/biometric_common.c:1293 msgid "Identify feature match" msgstr "" #: ../src/lib/biometric_common.c:1172 ../src/lib/biometric_common.c:1295 msgid "Identify feature no match" msgstr "" #: ../src/lib/biometric_common.c:1174 ../src/lib/biometric_common.c:1297 msgid "An error was encountered during identifying" msgstr "" #: ../src/lib/biometric_common.c:1176 ../src/lib/biometric_common.c:1299 msgid "Identify operation was interrupted by the user" msgstr "" #: ../src/lib/biometric_common.c:1178 ../src/lib/biometric_common.c:1301 msgid "Identify operation timeout" msgstr "" #: ../src/lib/biometric_common.c:1181 ../src/lib/biometric_common.c:1304 msgid "Capture feature successful" msgstr "" #: ../src/lib/biometric_common.c:1183 ../src/lib/biometric_common.c:1306 msgid "Capture feature failed" msgstr "" #: ../src/lib/biometric_common.c:1185 ../src/lib/biometric_common.c:1308 msgid "An error was encountered during capturing" msgstr "" #: ../src/lib/biometric_common.c:1187 ../src/lib/biometric_common.c:1310 msgid "Capture operation was interrupted by the user" msgstr "" #: ../src/lib/biometric_common.c:1189 ../src/lib/biometric_common.c:1312 msgid "Capture operation timeout" msgstr "" #: ../src/lib/biometric_common.c:1192 ../src/lib/biometric_common.c:1315 msgid "Find the specified features" msgstr "" #: ../src/lib/biometric_common.c:1194 ../src/lib/biometric_common.c:1317 msgid "No specified features were found" msgstr "" #: ../src/lib/biometric_common.c:1196 ../src/lib/biometric_common.c:1319 msgid "An error was encountered during searching" msgstr "" #: ../src/lib/biometric_common.c:1198 ../src/lib/biometric_common.c:1321 msgid "Search operation was interrupted by the user" msgstr "" #: ../src/lib/biometric_common.c:1200 ../src/lib/biometric_common.c:1323 msgid "Search operation timeout" msgstr "" #: ../src/lib/biometric_common.c:1203 ../src/lib/biometric_common.c:1326 msgid "Clean feature successful" msgstr "" #: ../src/lib/biometric_common.c:1205 ../src/lib/biometric_common.c:1328 msgid "Clean feature failed" msgstr "" #: ../src/lib/biometric_common.c:1207 ../src/lib/biometric_common.c:1330 msgid "An error was encountered during cleaning" msgstr "" #: ../src/lib/biometric_common.c:1209 ../src/lib/biometric_common.c:1332 msgid "Clean operation was interrupted by the user" msgstr "" #: ../src/lib/biometric_common.c:1211 ../src/lib/biometric_common.c:1334 msgid "Clean operation timeout" msgstr "" #: ../src/lib/biometric_common.c:1214 ../src/lib/biometric_common.c:1337 msgid "Get feature list completion" msgstr "" #: ../src/lib/biometric_common.c:1216 ../src/lib/biometric_common.c:1339 msgid "Get feature list failed" msgstr "" #: ../src/lib/biometric_common.c:1218 ../src/lib/biometric_common.c:1341 msgid "An error was encountered during getting feature list" msgstr "" #: ../src/lib/biometric_common.c:1221 ../src/lib/biometric_common.c:1344 msgid "Rename feature successful" msgstr "" #: ../src/lib/biometric_common.c:1223 ../src/lib/biometric_common.c:1346 msgid "Rename feature failed" msgstr "" #: ../src/lib/biometric_common.c:1225 ../src/lib/biometric_common.c:1348 msgid "An error was encountered during renaming" msgstr "" #: ../src/lib/biometric_common.c:1228 ../src/lib/biometric_common.c:1353 msgid "Close device completion" msgstr "" #: ../src/lib/biometric_common.c:1230 ../src/lib/biometric_common.c:1355 msgid "Close device failed" msgstr "" #: ../src/lib/biometric_common.c:1232 ../src/lib/biometric_common.c:1357 msgid "An error was encountered during closing" msgstr "" #: ../src/lib/biometric_common.c:1235 msgid "Operation is in an unknown status......" msgstr "" #: ../src/lib/biometric_common.c:1257 msgid "Device is disable" msgstr "" #: ../src/lib/biometric_common.c:1261 msgid "The device or driver does not support this operation" msgstr "" #: ../src/lib/biometric_common.c:1350 msgid "Feature renaming is not complete, please try again" msgstr "" #: ../src/lib/biometric_common.c:1360 msgid "Device internal error" msgstr "" #: ../src/lib/biometric_common.c:1473 msgid "Init libusb Error\n" msgstr "" #: ../src/lib/biometric_common.c:1480 msgid "Get USB Device List Error\n" msgstr "" #: ../src/lib/biometric_common.c:1489 msgid "Can not get usb information\n" msgstr "" #: ../src/lib/biometric_common.c:1506 #, c-format msgid "libbiometric detected usb device(%s): %d\n" msgstr "" #: ../src/lib/biometric_common.c:1747 #, c-format msgid "Get function %s handle error: %s\n" msgstr "" #: ../src/lib/biometric_common.c:1764 msgid "Error: Can not get device descriptor\n" msgstr "" #: ../src/lib/biometric_common.c:1767 #, c-format msgid "Device attached: %04x:%04x\n" msgstr "" #: ../src/lib/biometric_common.c:1828 msgid "Error getting device descriptor" msgstr "" #: ../src/lib/biometric_common.c:1831 #, c-format msgid "Device detached: %04x:%04x\n" msgstr "" #: ../src/lib/biometric_common.c:1957 msgid "Unable to find feature that require renaming\n" msgstr "" #: ../src/lib/biometric_common.c:1960 #, c-format msgid "There are %d feature samples to renaming failed, please try again\n" msgstr "" #: ../src/lib/biometric_storage.c:190 ../src/lib/biometric_storage.c:206 #: ../src/lib/biometric_storage.c:387 ../src/lib/biometric_storage.c:517 #: ../src/lib/biometric_storage.c:559 ../src/lib/biometric_storage.c:616 #: ../src/lib/biometric_storage.c:636 ../src/lib/biometric_storage.c:663 #: ../src/lib/biometric_storage.c:689 ../src/lib/biometric_storage.c:740 #: ../src/lib/biometric_storage.c:1046 ../src/lib/biometric_storage.c:1155 #: ../src/lib/biometric_storage.c:1169 #, c-format msgid "sqlite3 prepare err: %s\n" msgstr "" #: ../src/lib/biometric_storage.c:198 #, c-format msgid "Unable to set database(%s) permissions. ERROR[%d]: %s\n" msgstr "" #: ../src/lib/biometric_storage.c:712 msgid "Check database format version ...\n" msgstr "" #: ../src/lib/biometric_storage.c:720 #, c-format msgid "Find Table '%s' Error: %s\n" msgstr "" #: ../src/lib/biometric_storage.c:754 #, c-format msgid "Database format version is %d.%d.%d\n" msgstr "" #: ../src/lib/biometric_storage.c:762 #, c-format msgid "Failed to upgrade database format:version %d.%d.%d to %d.%d.%d\n" msgstr "" #: ../src/lib/biometric_storage.c:775 msgid "The database format is compatible with the current framework\n" msgstr "" #: ../src/lib/biometric_storage.c:780 #, c-format msgid "" "Incompatible version of the database format: %d.%d.%d. Version required for " "the current framework: %d.%d.x" msgstr "" #: ../src/lib/biometric_storage.c:886 #, c-format msgid "Create Biometric Datebase Directory (%s) Error\n" msgstr "" #: ../src/lib/biometric_storage.c:928 ../src/lib/biometric_storage.c:947 #: ../src/lib/biometric_storage.c:973 #, c-format msgid "Failure to modify the owner and group of %s. ERROR[%d]: %s\n" msgstr "" #: ../src/lib/biometric_storage.c:992 msgid "Upgrade database ...\n" msgstr "" #: ../src/lib/biometric_storage.c:1002 #, c-format msgid "Rename Table 'EIGEN_INFO' to 'EIGEN_INFO_VERSION_0_0_0' Error: %s\n" msgstr "" #: ../src/lib/biometric_storage.c:1031 #, c-format msgid "Failed to migrate data from the original table: %s\n" msgstr "" #: ../src/lib/biometric_storage.c:1061 #, c-format msgid "Update UUID=%s to database(UID=%d) ...\n" msgstr "" #: ../src/lib/biometric_storage.c:1068 #, c-format msgid "Update column \"UUID\" to Table \"%s\" Error: %s\n" msgstr "" #: ../src/lib/biometric_storage.c:1111 ../src/lib/biometric_storage.c:1135 #, c-format msgid "" "Create Table %s:\n" "%s\n" msgstr "" #: ../src/lib/biometric_storage.c:1115 ../src/lib/biometric_storage.c:1139 #, c-format msgid "Create Table '%s' Error: %s\n" msgstr "" #: ../src/lib/biometric_storage.c:1147 #, c-format msgid "" "Set Database Format(%d.%d.%d):\n" "%s\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:129 #, c-format msgid "Get AES Key File Error[%d]: %s, use default Key.\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:142 #, c-format msgid "" "AES Key File (%s) does not Exist or has no Read Permission, use default " "key.\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:159 #, c-format msgid "Can not open AES Key File: %s, use default key.\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:174 msgid "AES Key File is Enpty, use default Key.\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:198 msgid "AES Key is Enpty, use default Key.\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:234 #, c-format msgid "Detect %s device\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:242 #: ../src/drivers/community-multidevice/community_ops.c:247 #, c-format msgid "No %s fingerprint device detected\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:251 #, c-format msgid "There is %d %s fingerprint device detected\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:277 #, c-format msgid "Device failed to open" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:333 #: ../src/drivers/community-multidevice/community_ops.c:1089 #: ../src/drivers/community-multidevice/community_ops.c:1277 #, c-format msgid "Unknown error, error code: %d" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:458 #: ../src/drivers/community-multidevice/community_ops.c:541 #: ../src/drivers/community-multidevice/community_ops.c:676 msgid "Find the following feature matching:\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:625 #, c-format msgid "" "Search from offset %d, index %d has been searched, global index %d(%d + %d)\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:630 #, c-format msgid "" "The %d feature has been searched(UID = %d, Index = %d, Index Name = %s), " "please press your finger to continue the search" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:774 #, c-format msgid "Device %s[%d] received interrupt request\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:819 msgid "Sample complete" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:821 msgid "" "Enrollment failed due to incomprehensible data. (Please use the same finger " "at different sampling stages of the same enroll)" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:825 msgid "" "Please place your finger again because of poor quality of the sample or " "other scanning problems" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:828 msgid "Your swipe was too short, please place your finger again." msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:831 msgid "" "Didn't catch that, please center your finger on the sensor and try again." msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:834 msgid "" "Because of the scanning image quality or finger pressure problem, the " "sampling failed, please remove the finger and retry" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:838 msgid "Unable to generate feature data, enroll failure" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:840 msgid "" "Sample start, please press and lift your finger (Some devices need to swipe " "your finger)" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:895 #, c-format msgid "Could not open device (driver %s)" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:1064 #: ../src/drivers/community-multidevice/community_ops.c:1229 #, c-format msgid "Failed to call function %s\n" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:1112 #, c-format msgid "" "Enroll failed: The feature was successfully sampled, but the encoding of the " "sampling feature could not be generated" msgstr "" #: ../src/drivers/community-multidevice/community_ops.c:1129 #, c-format msgid "" "The %d [%d/%d] sampling was successful, in the next sampling: please press " "and lift your finger (Some devices need to swipe your finger)" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Disable" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Enable" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Print" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Vein" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Iris" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Face" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Voice Print" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "OS" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device and OS" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Original Data" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Value" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Vector" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Hardware" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Software" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Mix" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:71 msgid "Other" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "Serial" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "USB" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "PCIE" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:70 msgid "Any" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Common" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Open" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Enroll" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Verify" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Identify" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Capture" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Search" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Clean" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "GetFeatureList" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Rename" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Close" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:76 msgid "" "Usage:\n" " biometric-auth-client BuiltinCommands ...\n" "\n" "BuiltinCommands:\n" " get-driver-list Get Driver List\n" " get-device-list Get Device List\n" " get-feature-list Get Feature List\n" " enroll Enroll Feature\n" " verify Verify Feature\n" " capture Capture Feature\n" " search Search Feature\n" " clean Clean Feature\n" " rename Rename Feature\n" "\n" "Options:\n" " -h, --help show this help message and exit\n" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:116 msgid "non-existent user" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:152 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:170 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:189 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:223 msgid "The device is busy, please try again later" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:158 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:176 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:195 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:229 msgid "No permission to perform this operation" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:179 #, c-format msgid "Character string: %s\n" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "No." msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User ID" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User Name" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:452 msgid "Feature Index" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:391 msgid "Feature Name" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:212 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:250 msgid "List of features found:" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:347 msgid "Biometric Type" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver Name" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:271 msgid "Show all fields (Highest priority)" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:273 msgid "Show 'Driver Full Name' fields" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:275 msgid "Show 'Biometric Type' fields" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:277 msgid "Show 'Storge Type' fields" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:279 msgid "Show 'Eigen Type' fields" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:281 msgid "Show 'Verify Type' fields" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:283 msgid "Show 'Identify Type' fields" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver ID" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:342 msgid "Driver Full Name" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:344 msgid "Status" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:350 msgid "Storge Type" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:353 msgid "Eigen Type" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:356 msgid "Verify Type" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:359 msgid "Identify Type" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:361 msgid "Bus Type" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:294 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:411 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:472 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:525 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:590 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:656 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:714 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:778 msgid "Biometric identification backend framework service is not started" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:300 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:419 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:480 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:533 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:598 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:664 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:722 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:786 msgid "" "Client APP_API is newer than biometric identification framework service. " "Please upgrade framework service or degrade client.\n" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:304 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:423 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:484 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:537 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:602 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:668 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:726 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:790 msgid "" "Client APP_API is older than biometric identification framework service. " "Please degrade framework service or upgrade client.\n" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:383 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:387 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:448 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:627 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:693 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:751 #, c-format msgid "User Name (Default is current user: %s)" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:389 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:450 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:509 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:564 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:629 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:695 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:753 msgid "Driver(or Device) ID" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:401 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:462 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:515 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:580 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:641 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:704 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:768 msgid "Input parameter error\n" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:444 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:623 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:505 #, c-format msgid "%s %s -d DRIVER_ID" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:558 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:562 msgid "User Name (Not set to search for all users)" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:566 msgid "Start of Feature Index (default 0)" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:568 msgid "End of Feature Index (default -1, means search all)" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:631 msgid "The Feature Index You Want To Delete (-1 means delete all)" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:689 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:747 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:755 msgid "The Feature Index that needs to be renamed" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:757 msgid "New Feature Name" msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:814 msgid "" "The abort operation failed and the current operation will continue in the " "background." msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:815 msgid "The device may have to wait a while before being used." msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:816 msgid "" "The wait problem can be solved by restarting the biometrics backend " "framework service." msgstr "" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:860 #, c-format msgid "Unknown Builtin Commands: %s\n" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:39 msgid "When there is a driver of the same name, force to override it" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:41 msgid "Only add driver and Not enable driver" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:52 msgid "DriverName DriverFilePath" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:61 #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:75 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:280 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:64 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:78 #, c-format msgid "Error parsing commandline options: %s\n" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:74 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:77 msgid "The number of parameters is incorrect" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:86 #, c-format msgid "" "This driver already exists, using the -f parameter if you need to override " "the configuration\n" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:104 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:96 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:93 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:124 #, c-format msgid "Write configuration failure: %s\n" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:38 msgid "Ignore nonexistent drivers" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:48 msgid "Driver1 [Driver2 ...]" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:79 #, c-format msgid "" "Driver %s does not exist, if you need to ignore the problem, use -i " "parameter\n" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:53 msgid "Add driver" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:54 msgid "Remove drive" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:55 msgid "Enable driver" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:56 msgid "Disable driver" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:57 msgid "Set the key value of the specified driver" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:58 msgid "remove the key value of the specified driver" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:105 msgid "BuiltinCommands" msgstr "" #. g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:108 msgid "Builtin commands: " msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:222 #, c-format msgid "Unknown command %s" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:231 msgid "Missing builtin command" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:48 msgid "DriverName Key" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:41 msgid "Forcibly overrides the existing key" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:43 msgid "Ignore this setting if the key already exists" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:55 msgid "DriverName Key Value" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:98 #, c-format msgid "Driver %s does not exist\n" msgstr "" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:108 #, c-format msgid "" "The key already exists and is not forcibly overwritten, ignoring the setting " "operation\n" "If you want to ignore this error, use the \"-i\" parameter\n" msgstr "" #: ../src/utils/biometric-device-discover/community-multidevice/community_multidevice_discover_tool.c:119 #, c-format msgid "Failed to initialize libfprint\n" msgstr "" biometric-authentication/po/zh_CN.po0000644000175000017500000015372713755706021016474 0ustar fengfeng# Chinese translations for biometric-authentication package. # Copyright (C) 2018 THE biometric-authentication'S COPYRIGHT HOLDER # This file is distributed under the same license as the biometric-authentication package. # droiing , 2018. # msgid "" msgstr "" "Project-Id-Version: biometric-authentication 0.9.62\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-07-31 11:01+0800\n" "PO-Revision-Date: 2017-10-11 11:57+0800\n" "Last-Translator: droiing \n" "Language-Team: Chinese (simplified)\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7.1\n" #: ../src/biometric-authenticationd.c:304 #: ../src/biometric-authenticationd.c:382 #: ../src/biometric-authenticationd.c:571 #: ../src/biometric-authenticationd.c:676 #: ../src/biometric-authenticationd.c:792 #: ../src/biometric-authenticationd.c:872 #: ../src/biometric-authenticationd.c:1010 #: ../src/biometric-authenticationd.c:1173 #: ../src/biometric-authenticationd.c:1280 #: ../src/biometric-authenticationd.c:1357 #: ../src/biometric-authenticationd.c:1485 #: ../src/biometric-authenticationd.c:1656 #, c-format msgid "Can't create thread: %s\n" msgstr "无法创建线程:%s\n" #: ../src/biometric-authenticationd.c:503 #, c-format msgid "" "Framework automatically assigns the free index '%d' to driver %s user %d\n" msgstr "框架自动分配空闲的索引'%d'(驱动:%s,用户ID:%d)\n" #: ../src/biometric-authenticationd.c:511 msgid "Enroll Result: Success\n" msgstr "录入结果:成功\n" #: ../src/biometric-authenticationd.c:514 msgid "Enroll Result: Fail\n" msgstr "录入结果:失败\n" #: ../src/biometric-authenticationd.c:618 msgid "Verify Result: Match\n" msgstr "认证结果:匹配\n" #: ../src/biometric-authenticationd.c:622 msgid "Verify Result: No Match\n" msgstr "认证结果:不匹配\n" #: ../src/biometric-authenticationd.c:727 #, c-format msgid "Identify Result: UID = %d\n" msgstr "识别结果:UID = %d\n" #: ../src/biometric-authenticationd.c:731 msgid "Identify Result: No Match\n" msgstr "识别结果:不匹配\n" #: ../src/biometric-authenticationd.c:829 #, c-format msgid "Capture Result: %.*s\n" msgstr "捕获结果:%.*s\n" #: ../src/biometric-authenticationd.c:832 msgid "Capture Result: ERROR\n" msgstr "捕获结果:错误\n" #: ../src/biometric-authenticationd.c:1032 #, c-format msgid "%s Clean Result: Success\n" msgstr "%s 清理结果:成功\n" #: ../src/biometric-authenticationd.c:1035 #, c-format msgid "%s Clean Result: Failed\n" msgstr "%s 清理结果:失败\n" #. 系统层清理进行彻底的清理,免受当前不可用设备遗留的生物特征信息影响 #: ../src/biometric-authenticationd.c:1103 msgid "" "System level cleaning of the specified range of biometric features (all " "drivers)\n" msgstr "系统层面清理指定范围的生物特征(所有驱动)\n" #: ../src/biometric-authenticationd.c:1111 msgid "System level Clean Result: Success\n" msgstr "系统层面 清理结果:成功\n" #: ../src/biometric-authenticationd.c:1114 msgid "System level Clean Result: Failed\n" msgstr "系统层面 清理结果:失败\n" #: ../src/biometric-authenticationd.c:1441 #, c-format msgid "Error: Failed to export object. Reason: %s\n" msgstr "错误:导出对象失败。原因:%s\n" #: ../src/biometric-authenticationd.c:1451 #, c-format msgid "name_acquired_cb called, Acquired bus name: %s\n" msgstr "name_acquired_cb函数被调用,获得总线名称:%s\n" #: ../src/biometric-authenticationd.c:1460 msgid "name_lost_cb called, Error: Failed to connect to dbus\n" msgstr "name_lost_cb函数被调用,错误:无法链接DBus总线\n" #: ../src/biometric-authenticationd.c:1462 #, c-format msgid "name_lost_cb called, Error: Failed to obtain bus name: %s\n" msgstr "name_lost_cb函数被调用,错误:无法获得总线名(%s)\n" #: ../src/biometric-authenticationd.c:1470 msgid "run called in the server\n" msgstr "run函数在服务端被调用\n" #: ../src/biometric-authenticationd.c:1487 #: ../src/biometric-authenticationd.c:1658 #, c-format msgid "New thread created: %s\n" msgstr "创建新线程:%s\n" #. * init for usage of "g" types #. g_type_init(); #: ../src/biometric-authenticationd.c:1500 msgid "InitDBusCommunicationServer: Server started\n" msgstr "InitDBusCommunicationServer:服务端启动\n" #: ../src/biometric-authenticationd.c:1576 #, c-format msgid "libusb_handle_events failed: %s\n" msgstr "libusb_handle_events失败:%s\n" #: ../src/biometric-authenticationd.c:1593 msgid "" "The biometric authentication server failed to start, requiring administrator " "permission to start\n" msgstr "生物特征认证服务启动失败,启动需要管理员权限\n" #: ../src/biometric-authenticationd.c:1616 #, c-format msgid "Can not open PID file: %s\n" msgstr "无法打 PID 文件:%s\n" #: ../src/biometric-authenticationd.c:1623 msgid "" "Biometric authentication server is running, Do not restart it repeatedly\n" msgstr "生物特征认证服务正在运行中,请勿重复启动\n" #: ../src/biometric-authenticationd.c:1632 #, c-format msgid "There is an exception to write PID file: %s\n" msgstr "写 PID 文件出现异常:%s\n" #: ../src/biometric-authenticationd.c:1640 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:155 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:173 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:192 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:226 msgid "No such device" msgstr "无此设备" #: ../src/biometric-authenticationd.c:1641 msgid "Device busy" msgstr "设备忙" #: ../src/biometric-authenticationd.c:1646 msgid "Initial biometric recognition framework failed\n" msgstr "初始化生物特征识别框架失败\n" #: ../src/biometric-dbus-common.c:51 #, c-format msgid "" "The UID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "无法获取请求者(%s)的UID信息:%s\n" #: ../src/biometric-dbus-common.c:87 #, c-format msgid "" "The PID information of the requester (%s) could not be obtained. Error: %s\n" msgstr "无法获取请求者(%s)的PID信息:%s\n" #: ../src/lib/biometric_common.c:170 msgid "Current driver list:" msgstr "当前驱动列表:" #: ../src/lib/biometric_common.c:208 msgid "Current device list:" msgstr "当前设备列表:" #: ../src/lib/biometric_common.c:267 ../src/lib/biometric_common.c:285 #: ../src/lib/biometric_common.c:331 ../src/lib/biometric_config.c:39 #, c-format msgid "Error[%d]: %s\n" msgstr "错误[%d]:%s\n" #: ../src/lib/biometric_common.c:311 msgid "" "can't find \"bioconf\" struct, maybe someone forget use \"bio_conf_init()\" " "before\n" msgstr "无法找到\"bioconf\"结构体,也许前面忘记使用\"bio_conf_init()\"函数\n" #: ../src/lib/biometric_common.c:323 ../src/lib/biometric_storage.c:229 #: ../src/lib/biometric_storage.c:300 ../src/lib/biometric_storage.c:367 #: ../src/lib/biometric_storage.c:409 ../src/lib/biometric_storage.c:597 msgid "Unable to allocate memory\n" msgstr "无法分配内存\n" #: ../src/lib/biometric_common.c:338 #, c-format msgid "No define driver in [%s]\n" msgstr "在 [%s] 中未定义驱动\n" #: ../src/lib/biometric_common.c:351 #, c-format msgid "Loaded Driver: %s\n" msgstr "已加载驱动:%s\n" #: ../src/lib/biometric_common.c:360 #, c-format msgid "%s driver configure failed\n" msgstr "%s 驱动配置失败\n" #. 检测驱动版本兼容性 #: ../src/lib/biometric_common.c:368 #, c-format msgid "%s driver DRV_API version: %d.%d.%d\n" msgstr "%s 驱动 DRV_API版本:%d.%d.%d\n" #: ../src/lib/biometric_common.c:380 #, c-format msgid "" "Detected Compatibility issues: %s driver version is higher than biometric " "framework\n" msgstr "检测到兼容性问题:%s驱动版本高于生物特征识别框架\n" #: ../src/lib/biometric_common.c:384 #, c-format msgid "" "Detected Compatibility issues: %s driver version is lower than biometric " "framework\n" msgstr "检测到兼容性问题:%s驱动版本低于生物特征识别框架\n" #: ../src/lib/biometric_common.c:395 #, c-format msgid "Driver %s initialization failed\n" msgstr "驱动 %s 初始化失败\n" #: ../src/lib/biometric_common.c:430 msgid "Error: Can not register attach callback error\n" msgstr "错误:无法注册 attch 回调函数\n" #: ../src/lib/biometric_common.c:443 msgid "Error: Can not register detach callback error\n" msgstr "错误:无法注册 detach 回调函数\n" #: ../src/lib/biometric_common.c:494 msgid "Biometric framework API version:\n" msgstr "生物特征识别框架API版本:\n" #: ../src/lib/biometric_common.c:495 #, c-format msgid " Driver API(DRV_API): %d.%d.%d\n" msgstr " 驱动API(DRV_API):%d.%d.%d\n" #: ../src/lib/biometric_common.c:499 #, c-format msgid " Application API(APP_API): %d.%d.%d\n" msgstr " 应用API(APP_API):%d.%d.%d\n" #: ../src/lib/biometric_common.c:506 msgid "bio_conf_init failed\n" msgstr "执行 bio_conf_init 函数失败\n" #: ../src/lib/biometric_common.c:522 #, c-format msgid "failed to initialise libusb: %s\n" msgstr "初始化 libusb 失败:%s\n" #: ../src/lib/biometric_common.c:570 ../src/lib/biometric_common.c:616 #: ../src/lib/biometric_common.c:660 ../src/lib/biometric_common.c:706 #: ../src/lib/biometric_common.c:754 ../src/lib/biometric_common.c:798 #: ../src/lib/biometric_common.c:848 ../src/lib/biometric_common.c:890 #, c-format msgid "Open Result: %d\n" msgstr "打开结果:%d\n" #: ../src/lib/biometric_common.c:586 ../src/lib/biometric_common.c:632 #: ../src/lib/biometric_common.c:676 ../src/lib/biometric_common.c:722 #: ../src/lib/biometric_common.c:770 ../src/lib/biometric_common.c:814 #: ../src/lib/biometric_common.c:857 #, c-format msgid "Close Device: %s\n" msgstr "关闭设备:%s\n" #: ../src/lib/biometric_common.c:587 ../src/lib/biometric_common.c:633 #: ../src/lib/biometric_common.c:677 ../src/lib/biometric_common.c:723 #: ../src/lib/biometric_common.c:771 ../src/lib/biometric_common.c:815 #: ../src/lib/biometric_common.c:858 #, c-format msgid "Device Status: [%d]%s\n" msgstr "设备状态:[%d]%s\n" #: ../src/lib/biometric_common.c:627 ../src/lib/biometric_common.c:717 #: ../src/lib/biometric_common.c:765 #, c-format msgid "%s\n" msgstr "%s\n" #: ../src/lib/biometric_common.c:1056 ../src/lib/biometric_common.c:1247 msgid "Device idle" msgstr "设备空闲" #: ../src/lib/biometric_common.c:1058 msgid "Device is in process" msgstr "设备正在处理中" #: ../src/lib/biometric_common.c:1060 msgid "Terminating current operation" msgstr "正在终止当前操作" #: ../src/lib/biometric_common.c:1062 msgid "Device is disabled" msgstr "设备被禁用" #: ../src/lib/biometric_common.c:1065 msgid "Opening device" msgstr "正在打开设备" #: ../src/lib/biometric_common.c:1067 msgid "Terminating open operation" msgstr "正在中止设备打开操作" #: ../src/lib/biometric_common.c:1070 msgid "Enrolling" msgstr "正在录入特征" #: ../src/lib/biometric_common.c:1072 msgid "Terminating enroll operation" msgstr "正在中止录入操作" #: ../src/lib/biometric_common.c:1075 msgid "Verifying" msgstr "正在认证特征" #: ../src/lib/biometric_common.c:1077 msgid "Terminating Verify operation" msgstr "正在中止认证操作" #: ../src/lib/biometric_common.c:1080 msgid "Identifying" msgstr "正在识别特征" #: ../src/lib/biometric_common.c:1082 msgid "Terminating identify operation" msgstr "正在中止识别操作" #: ../src/lib/biometric_common.c:1085 msgid "Capturing" msgstr "正在捕获特征" #: ../src/lib/biometric_common.c:1087 msgid "Terminating capture operation" msgstr "正在中止捕获操作" #: ../src/lib/biometric_common.c:1090 msgid "Searching" msgstr "正在搜索特征" #: ../src/lib/biometric_common.c:1092 msgid "Terminating search operation" msgstr "正在中止搜索操作" #: ../src/lib/biometric_common.c:1095 msgid "Cleaning" msgstr "正在清理特征数据" #: ../src/lib/biometric_common.c:1097 msgid "Terminating clean operation" msgstr "正在中止清理特征操作" #: ../src/lib/biometric_common.c:1100 msgid "Getting feature list" msgstr "正在获取特征列表" #: ../src/lib/biometric_common.c:1102 msgid "Terminating get feature list operation" msgstr "正在中止获取特征列表操作" #: ../src/lib/biometric_common.c:1105 msgid "Renaming feature" msgstr "正在重命名特征" #: ../src/lib/biometric_common.c:1107 msgid "Terminating feature rename operation" msgstr "正在中止特征重命名操作" #: ../src/lib/biometric_common.c:1110 msgid "Closing" msgstr "正在关闭设备" #: ../src/lib/biometric_common.c:1112 msgid "Terminating close operation" msgstr "正在中止设备关闭操作" #: ../src/lib/biometric_common.c:1115 #, c-format msgid "Device unknown status code: %d\n" msgstr "设备未知状态码:%d\n" #: ../src/lib/biometric_common.c:1116 msgid "Device is in an unknown status..." msgstr "设备处于未知状态..." #: ../src/lib/biometric_common.c:1128 msgid "Operation successful" msgstr "操作成功" #: ../src/lib/biometric_common.c:1130 ../src/lib/biometric_common.c:1249 msgid "Operation failed" msgstr "操作失败" #: ../src/lib/biometric_common.c:1132 ../src/lib/biometric_common.c:1251 msgid "An error was encountered during the operation" msgstr "操作过程中遇到错误" #: ../src/lib/biometric_common.c:1134 ../src/lib/biometric_common.c:1253 msgid "The operation was interrupted by the user" msgstr "操作被用户终止" #: ../src/lib/biometric_common.c:1136 ../src/lib/biometric_common.c:1255 msgid "Operation timeout" msgstr "操作超时" #: ../src/lib/biometric_common.c:1138 ../src/lib/biometric_common.c:1259 msgid "Out of memory" msgstr "内存不足" #: ../src/lib/biometric_common.c:1141 ../src/lib/biometric_common.c:1264 msgid "Open device completion" msgstr "打开设备完毕" #: ../src/lib/biometric_common.c:1143 ../src/lib/biometric_common.c:1266 msgid "Open device failed" msgstr "打开设备失败" #: ../src/lib/biometric_common.c:1145 ../src/lib/biometric_common.c:1268 msgid "An error was encountered during the opening" msgstr "打开设备过程中出错" #: ../src/lib/biometric_common.c:1148 ../src/lib/biometric_common.c:1271 msgid "Enroll feature successful" msgstr "录入特征成功" #: ../src/lib/biometric_common.c:1150 ../src/lib/biometric_common.c:1273 msgid "Enroll feature failed" msgstr "录入特征失败" #: ../src/lib/biometric_common.c:1152 ../src/lib/biometric_common.c:1275 msgid "An error was encountered during enrolling" msgstr "录入特征过程中遇到错误" #: ../src/lib/biometric_common.c:1154 ../src/lib/biometric_common.c:1277 msgid "Enroll operation was interrupted by the user" msgstr "录入操作被用户终止" #: ../src/lib/biometric_common.c:1156 ../src/lib/biometric_common.c:1279 msgid "Enroll operation timeout" msgstr "录入操作超时" #: ../src/lib/biometric_common.c:1159 ../src/lib/biometric_common.c:1282 msgid "Verify feature match" msgstr "认证特征匹配" #: ../src/lib/biometric_common.c:1161 ../src/lib/biometric_common.c:1284 msgid "Verify feature no match" msgstr "认证特征不匹配" #: ../src/lib/biometric_common.c:1163 ../src/lib/biometric_common.c:1286 msgid "An error was encountered during verifying" msgstr "认证特征过程中遇到错误" #: ../src/lib/biometric_common.c:1165 ../src/lib/biometric_common.c:1288 msgid "Verify operation was interrupted by the user" msgstr "认证操作被用户终止" #: ../src/lib/biometric_common.c:1167 ../src/lib/biometric_common.c:1290 msgid "Verify operation timeout" msgstr "认证操作超时" #: ../src/lib/biometric_common.c:1170 ../src/lib/biometric_common.c:1293 msgid "Identify feature match" msgstr "识别特征匹配" #: ../src/lib/biometric_common.c:1172 ../src/lib/biometric_common.c:1295 msgid "Identify feature no match" msgstr "识别特征不匹配" #: ../src/lib/biometric_common.c:1174 ../src/lib/biometric_common.c:1297 msgid "An error was encountered during identifying" msgstr "识别特征过程中遇到错误" #: ../src/lib/biometric_common.c:1176 ../src/lib/biometric_common.c:1299 msgid "Identify operation was interrupted by the user" msgstr "识别操作被用户终止" #: ../src/lib/biometric_common.c:1178 ../src/lib/biometric_common.c:1301 msgid "Identify operation timeout" msgstr "识别操作超时" #: ../src/lib/biometric_common.c:1181 ../src/lib/biometric_common.c:1304 msgid "Capture feature successful" msgstr "捕获特征成功" #: ../src/lib/biometric_common.c:1183 ../src/lib/biometric_common.c:1306 msgid "Capture feature failed" msgstr "捕获特征失败" #: ../src/lib/biometric_common.c:1185 ../src/lib/biometric_common.c:1308 msgid "An error was encountered during capturing" msgstr "捕获过程中遇到错误" #: ../src/lib/biometric_common.c:1187 ../src/lib/biometric_common.c:1310 msgid "Capture operation was interrupted by the user" msgstr "捕获操作被用户终止" #: ../src/lib/biometric_common.c:1189 ../src/lib/biometric_common.c:1312 msgid "Capture operation timeout" msgstr "捕获操作超时" #: ../src/lib/biometric_common.c:1192 ../src/lib/biometric_common.c:1315 msgid "Find the specified features" msgstr "搜索到指定的特征" #: ../src/lib/biometric_common.c:1194 ../src/lib/biometric_common.c:1317 msgid "No specified features were found" msgstr "未搜索到指定特征" #: ../src/lib/biometric_common.c:1196 ../src/lib/biometric_common.c:1319 msgid "An error was encountered during searching" msgstr "搜索过程中遇到错误" #: ../src/lib/biometric_common.c:1198 ../src/lib/biometric_common.c:1321 msgid "Search operation was interrupted by the user" msgstr "搜索操作被用户终止" #: ../src/lib/biometric_common.c:1200 ../src/lib/biometric_common.c:1323 msgid "Search operation timeout" msgstr "搜索操作超时" #: ../src/lib/biometric_common.c:1203 ../src/lib/biometric_common.c:1326 msgid "Clean feature successful" msgstr "清理特征成功" #: ../src/lib/biometric_common.c:1205 ../src/lib/biometric_common.c:1328 msgid "Clean feature failed" msgstr "清理特征失败" #: ../src/lib/biometric_common.c:1207 ../src/lib/biometric_common.c:1330 msgid "An error was encountered during cleaning" msgstr "清理过程中遇到错误" #: ../src/lib/biometric_common.c:1209 ../src/lib/biometric_common.c:1332 msgid "Clean operation was interrupted by the user" msgstr "清理操作被用户终止" #: ../src/lib/biometric_common.c:1211 ../src/lib/biometric_common.c:1334 msgid "Clean operation timeout" msgstr "清理操作超时" #: ../src/lib/biometric_common.c:1214 ../src/lib/biometric_common.c:1337 msgid "Get feature list completion" msgstr "获取特征列表完成" #: ../src/lib/biometric_common.c:1216 ../src/lib/biometric_common.c:1339 msgid "Get feature list failed" msgstr "获取特征列表失败" #: ../src/lib/biometric_common.c:1218 ../src/lib/biometric_common.c:1341 msgid "An error was encountered during getting feature list" msgstr "获取特征列表过程中遇到错误" #: ../src/lib/biometric_common.c:1221 ../src/lib/biometric_common.c:1344 msgid "Rename feature successful" msgstr "特征重命名成功" #: ../src/lib/biometric_common.c:1223 ../src/lib/biometric_common.c:1346 msgid "Rename feature failed" msgstr "特征重命名失败" #: ../src/lib/biometric_common.c:1225 ../src/lib/biometric_common.c:1348 msgid "An error was encountered during renaming" msgstr "重命名特征过程中遇到错误" #: ../src/lib/biometric_common.c:1228 ../src/lib/biometric_common.c:1353 msgid "Close device completion" msgstr "关闭设备完成" #: ../src/lib/biometric_common.c:1230 ../src/lib/biometric_common.c:1355 msgid "Close device failed" msgstr "关闭设备失败" #: ../src/lib/biometric_common.c:1232 ../src/lib/biometric_common.c:1357 msgid "An error was encountered during closing" msgstr "关闭设备过程中遇到错误" #: ../src/lib/biometric_common.c:1235 msgid "Operation is in an unknown status......" msgstr "操作处于未知状态" #: ../src/lib/biometric_common.c:1257 msgid "Device is disable" msgstr "设备被禁用" #: ../src/lib/biometric_common.c:1261 msgid "The device or driver does not support this operation" msgstr "当前设备或驱动不支持该操作" #: ../src/lib/biometric_common.c:1350 msgid "Feature renaming is not complete, please try again" msgstr "特征重命名不完全,请重试" #: ../src/lib/biometric_common.c:1360 msgid "Device internal error" msgstr "设备内部错误" #: ../src/lib/biometric_common.c:1473 msgid "Init libusb Error\n" msgstr "初始化 libusb库 失败\n" #: ../src/lib/biometric_common.c:1480 msgid "Get USB Device List Error\n" msgstr "获取USB设备列表失败\n" #: ../src/lib/biometric_common.c:1489 msgid "Can not get usb information\n" msgstr "无法获取USB相关信息\n" #: ../src/lib/biometric_common.c:1506 #, c-format msgid "libbiometric detected usb device(%s): %d\n" msgstr "libbiometric检测到USB设备(%s):%d\n" #: ../src/lib/biometric_common.c:1747 #, c-format msgid "Get function %s handle error: %s\n" msgstr "获取函数 %s 句柄出错:%s\n" #: ../src/lib/biometric_common.c:1764 msgid "Error: Can not get device descriptor\n" msgstr "错误:无法获取设备描述符\n" #: ../src/lib/biometric_common.c:1767 #, c-format msgid "Device attached: %04x:%04x\n" msgstr "设备插入:%04x:%04x\n" #: ../src/lib/biometric_common.c:1828 msgid "Error getting device descriptor" msgstr "错误:无法获取设备描述符" #: ../src/lib/biometric_common.c:1831 #, c-format msgid "Device detached: %04x:%04x\n" msgstr "设备拔出:%04x:%04x\n" #: ../src/lib/biometric_common.c:1957 msgid "Unable to find feature that require renaming\n" msgstr "未找到需要重命名的特征\n" #: ../src/lib/biometric_common.c:1960 #, c-format msgid "There are %d feature samples to renaming failed, please try again\n" msgstr "%d 个特征采样重命名失败,请重试\n" #: ../src/lib/biometric_storage.c:190 ../src/lib/biometric_storage.c:206 #: ../src/lib/biometric_storage.c:387 ../src/lib/biometric_storage.c:517 #: ../src/lib/biometric_storage.c:559 ../src/lib/biometric_storage.c:616 #: ../src/lib/biometric_storage.c:636 ../src/lib/biometric_storage.c:663 #: ../src/lib/biometric_storage.c:689 ../src/lib/biometric_storage.c:740 #: ../src/lib/biometric_storage.c:1046 ../src/lib/biometric_storage.c:1155 #: ../src/lib/biometric_storage.c:1169 #, c-format msgid "sqlite3 prepare err: %s\n" msgstr "sqlite3预处理错误:%s\n" #: ../src/lib/biometric_storage.c:198 #, c-format msgid "Unable to set database(%s) permissions. ERROR[%d]: %s\n" msgstr "无法设置数据库(%s)的权限。错误[%d]:%s\n" #: ../src/lib/biometric_storage.c:712 msgid "Check database format version ...\n" msgstr "检查数据库格式版本 ...\n" #: ../src/lib/biometric_storage.c:720 #, c-format msgid "Find Table '%s' Error: %s\n" msgstr "查找表 '%s' 错误:%s\n" #: ../src/lib/biometric_storage.c:754 #, c-format msgid "Database format version is %d.%d.%d\n" msgstr "数据库格式版本为 %d.%d.%d\n" #: ../src/lib/biometric_storage.c:762 #, c-format msgid "Failed to upgrade database format:version %d.%d.%d to %d.%d.%d\n" msgstr "升级数据库格式失败:版本 %d.%d.%d 到 %d.%d.%d\n" #: ../src/lib/biometric_storage.c:775 msgid "The database format is compatible with the current framework\n" msgstr "数据库格式兼容当前框架\n" #: ../src/lib/biometric_storage.c:780 #, c-format msgid "" "Incompatible version of the database format: %d.%d.%d. Version required for " "the current framework: %d.%d.x" msgstr "不兼容的数据库格式版:%d.%d.%d。当前框架需要 %d.%d.x 的版本" #: ../src/lib/biometric_storage.c:886 #, c-format msgid "Create Biometric Datebase Directory (%s) Error\n" msgstr "创建生物特征识别数据库存放目录(%s)失败\n" #: ../src/lib/biometric_storage.c:928 ../src/lib/biometric_storage.c:947 #: ../src/lib/biometric_storage.c:973 #, c-format msgid "Failure to modify the owner and group of %s. ERROR[%d]: %s\n" msgstr "修改 %s 的属主和属组失败。错误[%d]:%s\n" #: ../src/lib/biometric_storage.c:992 msgid "Upgrade database ...\n" msgstr "升级数据库中 ...\n" #: ../src/lib/biometric_storage.c:1002 #, c-format msgid "Rename Table 'EIGEN_INFO' to 'EIGEN_INFO_VERSION_0_0_0' Error: %s\n" msgstr "重命名表 'EIGEN_INFO' 为 'EIGEN_INFO_VERSION_0_0_0' 出现错误:%s\n" #: ../src/lib/biometric_storage.c:1031 #, c-format msgid "Failed to migrate data from the original table: %s\n" msgstr "从原始数据表中迁移数据失败:%s\n" #: ../src/lib/biometric_storage.c:1061 #, c-format msgid "Update UUID=%s to database(UID=%d) ...\n" msgstr "更新 UUID=%s 到数据库中(UID=%d) ...\n" #: ../src/lib/biometric_storage.c:1068 #, c-format msgid "Update column \"UUID\" to Table \"%s\" Error: %s\n" msgstr "更新字段 \"UUID\" 到表 \"%s\" 中出现错误:%s\n" #: ../src/lib/biometric_storage.c:1111 ../src/lib/biometric_storage.c:1135 #, c-format msgid "" "Create Table %s:\n" "%s\n" msgstr "" "创建表 %s:\n" "%s\n" #: ../src/lib/biometric_storage.c:1115 ../src/lib/biometric_storage.c:1139 #, c-format msgid "Create Table '%s' Error: %s\n" msgstr "创建表 '%s' 错误:%s\n" #: ../src/lib/biometric_storage.c:1147 #, c-format msgid "" "Set Database Format(%d.%d.%d):\n" "%s\n" msgstr "" "设置数据库格式(%d.%d.%d):\n" "%s\n" #: ../src/drivers/community-multidevice/community_ops.c:129 #, c-format msgid "Get AES Key File Error[%d]: %s, use default Key.\n" msgstr "获取AES密钥文件错误[%d]:%s,使用默认密钥。\n" #: ../src/drivers/community-multidevice/community_ops.c:142 #, c-format msgid "" "AES Key File (%s) does not Exist or has no Read Permission, use default " "key.\n" msgstr "AES密钥文件(%s)无存在或者无读取权限,使用默认密钥。\n" #: ../src/drivers/community-multidevice/community_ops.c:159 #, c-format msgid "Can not open AES Key File: %s, use default key.\n" msgstr "无法打开AES密钥文件:%s,使用默认密钥。\n" #: ../src/drivers/community-multidevice/community_ops.c:174 msgid "AES Key File is Enpty, use default Key.\n" msgstr "AES密钥文件为空,使用默认Key。\n" #: ../src/drivers/community-multidevice/community_ops.c:198 msgid "AES Key is Enpty, use default Key.\n" msgstr "AES密钥为空,使用默认密钥。\n" #: ../src/drivers/community-multidevice/community_ops.c:234 #, c-format msgid "Detect %s device\n" msgstr "检测 %s 设备\n" #: ../src/drivers/community-multidevice/community_ops.c:242 #: ../src/drivers/community-multidevice/community_ops.c:247 #, c-format msgid "No %s fingerprint device detected\n" msgstr "未检测到 %s 指纹设备\n" #: ../src/drivers/community-multidevice/community_ops.c:251 #, c-format msgid "There is %d %s fingerprint device detected\n" msgstr "检测到 %d 个 %s 指纹设备\n" #: ../src/drivers/community-multidevice/community_ops.c:277 #, c-format msgid "Device failed to open" msgstr "设备打开失败" #: ../src/drivers/community-multidevice/community_ops.c:333 #: ../src/drivers/community-multidevice/community_ops.c:1089 #: ../src/drivers/community-multidevice/community_ops.c:1277 #, c-format msgid "Unknown error, error code: %d" msgstr "出现未知的错误,错误码:%d" #: ../src/drivers/community-multidevice/community_ops.c:458 #: ../src/drivers/community-multidevice/community_ops.c:541 #: ../src/drivers/community-multidevice/community_ops.c:676 msgid "Find the following feature matching:\n" msgstr "找到以下匹配的特征:\n" #: ../src/drivers/community-multidevice/community_ops.c:625 #, c-format msgid "" "Search from offset %d, index %d has been searched, global index %d(%d + %d)\n" msgstr "从偏移 %d 开始搜索,搜索到索引 %d, 全局索引 %d(%d + %d)\n" #: ../src/drivers/community-multidevice/community_ops.c:630 #, c-format msgid "" "The %d feature has been searched(UID = %d, Index = %d, Index Name = %s), " "please press your finger to continue the search" msgstr "" "搜索到第 %d 个特征(UID = %d, Index = %d, Index Name = %s),请按下手指继续搜索" #: ../src/drivers/community-multidevice/community_ops.c:774 #, c-format msgid "Device %s[%d] received interrupt request\n" msgstr "设备 %s[%d] 收到中断请求\n" #: ../src/drivers/community-multidevice/community_ops.c:819 msgid "Sample complete" msgstr "采样完成" #: ../src/drivers/community-multidevice/community_ops.c:821 msgid "" "Enrollment failed due to incomprehensible data. (Please use the same finger " "at different sampling stages of the same enroll)" msgstr "" "由于采样数据无法理解而导致录入失败(请在同一次录入的不同阶段使用同一手指)" #: ../src/drivers/community-multidevice/community_ops.c:825 msgid "" "Please place your finger again because of poor quality of the sample or " "other scanning problems" msgstr "由于采样的图像质量较差或其他扫描问题导致采样指纹失败,请重放手指..." #: ../src/drivers/community-multidevice/community_ops.c:828 msgid "Your swipe was too short, please place your finger again." msgstr "由于手指的滑动距离太短导致采样失败,请重放手指..." #: ../src/drivers/community-multidevice/community_ops.c:831 msgid "" "Didn't catch that, please center your finger on the sensor and try again." msgstr "由于手指偏离设备导致采样失败,请重放手指..." #: ../src/drivers/community-multidevice/community_ops.c:834 msgid "" "Because of the scanning image quality or finger pressure problem, the " "sampling failed, please remove the finger and retry" msgstr "由于扫描成像质量或手指压力问题导致采样失败。请移开手指后重试" #: ../src/drivers/community-multidevice/community_ops.c:838 msgid "Unable to generate feature data, enroll failure" msgstr "无法生成特征数据,录入失败" #: ../src/drivers/community-multidevice/community_ops.c:840 msgid "" "Sample start, please press and lift your finger (Some devices need to swipe " "your finger)" msgstr "采样开始,请按下并抬起您的手指(部分设备需要滑动手指)" #: ../src/drivers/community-multidevice/community_ops.c:895 #, c-format msgid "Could not open device (driver %s)" msgstr "无法打开设备(驱动 %s)" #: ../src/drivers/community-multidevice/community_ops.c:1064 #: ../src/drivers/community-multidevice/community_ops.c:1229 #, c-format msgid "Failed to call function %s\n" msgstr "调用函数 %s 失败\n" #: ../src/drivers/community-multidevice/community_ops.c:1112 #, c-format msgid "" "Enroll failed: The feature was successfully sampled, but the encoding of the " "sampling feature could not be generated" msgstr "录入失败:特征采样成功,但无法生成采样特征的编码" #: ../src/drivers/community-multidevice/community_ops.c:1129 #, c-format msgid "" "The %d [%d/%d] sampling was successful, in the next sampling: please press " "and lift your finger (Some devices need to swipe your finger)" msgstr "" "第 %d [%d/%d] 次采样成功,正在进行下一次采样:请按下并抬起您的手指(部分设备" "需要滑动手指)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Disable" msgstr "禁用" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:61 msgid "Enable" msgstr "启用" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Print" msgstr "指纹" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Finger Vein" msgstr "指静脉" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Iris" msgstr "虹膜" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Face" msgstr "人脸" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:62 msgid "Voice Print" msgstr "声纹" # #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device" msgstr "设备" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "OS" msgstr "系统" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:63 msgid "Device and OS" msgstr "设备和系统" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Original Data" msgstr "原始数据" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Value" msgstr "特征值" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:64 msgid "Eigen Vector" msgstr "特征向量" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Hardware" msgstr "硬件" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Software" msgstr "软件" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 msgid "Mix" msgstr "混合" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:65 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:66 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:71 msgid "Other" msgstr "其它" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "Serial" msgstr "串口" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "USB" msgstr "USB" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:69 msgid "PCIE" msgstr "PCIE" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:70 msgid "Any" msgstr "任意" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Common" msgstr "通用" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Open" msgstr "打开设备" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Enroll" msgstr "录入" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Verify" msgstr "正在认证特征" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Identify" msgstr "识别" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:73 msgid "Capture" msgstr "捕获" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Search" msgstr "搜索" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Clean" msgstr "清理" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "GetFeatureList" msgstr "获取特征列表" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Rename" msgstr "重命名" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:74 msgid "Close" msgstr "关闭设备" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:76 msgid "" "Usage:\n" " biometric-auth-client BuiltinCommands ...\n" "\n" "BuiltinCommands:\n" " get-driver-list Get Driver List\n" " get-device-list Get Device List\n" " get-feature-list Get Feature List\n" " enroll Enroll Feature\n" " verify Verify Feature\n" " capture Capture Feature\n" " search Search Feature\n" " clean Clean Feature\n" " rename Rename Feature\n" "\n" "Options:\n" " -h, --help show this help message and exit\n" msgstr "" "用法:\n" " biometric-auth-client 内建指令 ...\n" "\n" "内建指令:\n" " get-driver-list 获取特征列表\n" " get-device-list 获取设备列表\n" " get-feature-list 获取特征列表\n" " enroll 特征录入\n" " verify 特征验证\n" " capture 特征捕获\n" " search 特征查找\n" " clean 特征清除\n" " rename 特征重命名\n" "\n" "选项:\n" " -h, --help 显示帮助选项并退出\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:116 msgid "non-existent user" msgstr "用户不存在" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:152 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:170 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:189 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:223 msgid "The device is busy, please try again later" msgstr "设备正忙,请稍后再试" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:158 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:176 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:195 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:229 msgid "No permission to perform this operation" msgstr "没有权限执行该操作" # c-format #: ../src/utils/biometric-auth-client/biometric-auth-client.in:179 #, c-format msgid "Character string: %s\n" msgstr "特征字符串:%s\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "No." msgstr "No." #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User ID" msgstr "用户ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 msgid "User Name" msgstr "用户名" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:452 msgid "Feature Index" msgstr "特征索引" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:198 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:391 msgid "Feature Name" msgstr "特征名称" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:212 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:250 msgid "List of features found:" msgstr "查找到的特征列表:" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:232 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:347 msgid "Biometric Type" msgstr "生物特征类型" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:233 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver Name" msgstr "驱动名" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:271 msgid "Show all fields (Highest priority)" msgstr "显示所有字段(最高优先级)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:273 msgid "Show 'Driver Full Name' fields" msgstr "显示‘驱动全名’字段" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:275 msgid "Show 'Biometric Type' fields" msgstr "显示‘生物特征类型’字段" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:277 msgid "Show 'Storge Type' fields" msgstr "显示‘存储类型’字段" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:279 msgid "Show 'Eigen Type' fields" msgstr "显示‘特征类型’字段" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:281 msgid "Show 'Verify Type' fields" msgstr "显示‘验证类型’字段" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:283 msgid "Show 'Identify Type' fields" msgstr "显示‘识别类型’字段" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 msgid "Driver ID" msgstr "驱动ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:342 msgid "Driver Full Name" msgstr "驱动全名" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:286 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:344 msgid "Status" msgstr "状态" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:350 msgid "Storge Type" msgstr "存储类型" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:353 msgid "Eigen Type" msgstr "特征类型" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:287 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:356 msgid "Verify Type" msgstr "验证类型" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:359 msgid "Identify Type" msgstr "识别类型" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:288 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:331 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:361 msgid "Bus Type" msgstr "总线类型" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:294 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:411 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:472 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:525 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:590 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:656 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:714 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:778 msgid "Biometric identification backend framework service is not started" msgstr "生物特征识别后端框架服务未启动" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:300 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:419 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:480 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:533 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:598 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:664 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:722 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:786 msgid "" "Client APP_API is newer than biometric identification framework service. " "Please upgrade framework service or degrade client.\n" msgstr "" "客户端的APP_API比生物特征识别框架服务新。请升级框架服务或者降级客户端。\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:304 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:423 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:484 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:537 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:602 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:668 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:726 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:790 msgid "" "Client APP_API is older than biometric identification framework service. " "Please degrade framework service or upgrade client.\n" msgstr "" "客户端的APP_API比生物特征识别框架服务旧。请降级框架服务或者升级客户端。\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:383 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -n FEATURE_NAME" msgstr "%s %s [-u 用户名] -d 驱动ID -n 特征名" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:387 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:448 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:627 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:693 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:751 #, c-format msgid "User Name (Default is current user: %s)" msgstr "用户名(默认为当前用户:%s)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:389 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:450 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:509 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:564 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:629 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:695 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:753 msgid "Driver(or Device) ID" msgstr "驱动(或设备)ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:401 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:462 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:515 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:580 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:641 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:704 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:768 msgid "Input parameter error\n" msgstr "输入参数错误\n" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:444 #: ../src/utils/biometric-auth-client/biometric-auth-client.in:623 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX" msgstr "%s %s [-u 用户名] -d 驱动ID -i 索引" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:505 #, c-format msgid "%s %s -d DRIVER_ID" msgstr "%s %s [-u 用户名] -d 驱动ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:558 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID [-s INDEX_START] [-e INDEX_END]" msgstr "%s %s [-u 用户名] -d 驱动ID [-s 开始的索引] [-e 结束的索引]" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:562 msgid "User Name (Not set to search for all users)" msgstr "用户名(不设置则搜索所有用户)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:566 msgid "Start of Feature Index (default 0)" msgstr "开始的特征索引(默认为0)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:568 msgid "End of Feature Index (default -1, means search all)" msgstr "结束的特征索引(默认为-1,表示搜索所有特征)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:631 msgid "The Feature Index You Want To Delete (-1 means delete all)" msgstr "需要删除的特征的索引(-1表示删除所有特征)" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:689 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID" msgstr "%s %s [-u 用户名] -d 驱动ID" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:747 #, c-format msgid "%s %s [-u USER_NAME] -d DRIVER_ID -i INDEX -n NEW_NAME" msgstr "%s %s [-u 用户名] -d 驱动ID -i 索引 -n 新的特征名称" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:755 msgid "The Feature Index that needs to be renamed" msgstr "需要重命名的特征索引" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:757 msgid "New Feature Name" msgstr "新的特征名称" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:814 msgid "" "The abort operation failed and the current operation will continue in the " "background." msgstr "终止操作失败,当前操作会在后台继续运行。" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:815 msgid "The device may have to wait a while before being used." msgstr "该设备可能需要等待一段时间才能使用。" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:816 msgid "" "The wait problem can be solved by restarting the biometrics backend " "framework service." msgstr "可以重启生物特征识别后台框架服务解决等待问题。" #: ../src/utils/biometric-auth-client/biometric-auth-client.in:860 #, c-format msgid "Unknown Builtin Commands: %s\n" msgstr "未知的内建指令:%s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:39 msgid "When there is a driver of the same name, force to override it" msgstr "出现同名驱动时,强制覆盖" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:41 msgid "Only add driver and Not enable driver" msgstr "只添加而不启用驱动" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:52 msgid "DriverName DriverFilePath" msgstr "驱动名 驱动文件路径" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:61 #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:75 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:280 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:57 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:71 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:64 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:78 #, c-format msgid "Error parsing commandline options: %s\n" msgstr "命令行选项解析出错:%s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:74 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:70 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:77 msgid "The number of parameters is incorrect" msgstr "参数个数不正确" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:86 #, c-format msgid "" "This driver already exists, using the -f parameter if you need to override " "the configuration\n" msgstr "已存在该驱动,如需覆盖配置,请使用 -f 参数强制覆盖\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-add-driver.c:104 #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:100 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:96 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:93 #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:124 #, c-format msgid "Write configuration failure: %s\n" msgstr "写入配置失败:%s\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:38 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:38 msgid "Ignore nonexistent drivers" msgstr "忽略不存在的驱动" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:48 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:48 msgid "Driver1 [Driver2 ...]" msgstr "驱动1 [驱动2 ...]" #: ../src/utils/biometric-config-tool/biometric-config-tool-disable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-enable-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-driver.c:80 #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:79 #, c-format msgid "" "Driver %s does not exist, if you need to ignore the problem, use -i " "parameter\n" msgstr "驱动 %s 不存在,如需忽略该问题,请使用 -i 参数\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:53 msgid "Add driver" msgstr "添加驱动" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:54 msgid "Remove drive" msgstr "移除驱动" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:55 msgid "Enable driver" msgstr "启用驱动" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:56 msgid "Disable driver" msgstr "禁用驱动" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:57 msgid "Set the key value of the specified driver" msgstr "设置驱动的键值" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:58 msgid "remove the key value of the specified driver" msgstr "移除驱动的键值" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:105 msgid "BuiltinCommands" msgstr "内建指令" #. g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:108 msgid "Builtin commands: " msgstr "内建指令:" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:222 #, c-format msgid "Unknown command %s" msgstr "未知的指令 %s" #: ../src/utils/biometric-config-tool/biometric-config-tool-main.c:231 msgid "Missing builtin command" msgstr "缺少内建指令" #: ../src/utils/biometric-config-tool/biometric-config-tool-remove-key.c:48 msgid "DriverName Key" msgstr "驱动名 键名" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:41 msgid "Forcibly overrides the existing key" msgstr "强制覆盖已存在的键" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:43 msgid "Ignore this setting if the key already exists" msgstr "如果键已存在,则忽略设置" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:55 msgid "DriverName Key Value" msgstr "驱动名 键名 键值" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:98 #, c-format msgid "Driver %s does not exist\n" msgstr "驱动 %s 不存在\n" #: ../src/utils/biometric-config-tool/biometric-config-tool-set-key.c:108 #, c-format msgid "" "The key already exists and is not forcibly overwritten, ignoring the setting " "operation\n" "If you want to ignore this error, use the \"-i\" parameter\n" msgstr "" "键已存在且未指定强制覆盖,忽略本次设备操作。\n" "如果想要忽略本错误,使用\"-i\"参数\n" #: ../src/utils/biometric-device-discover/community-multidevice/community_multidevice_discover_tool.c:119 #, c-format msgid "Failed to initialize libfprint\n" msgstr "初始化 libfprint 失败\n" biometric-authentication/NEWS0000644000175000017500000000000013517470404015162 0ustar fengfengbiometric-authentication/autogen.sh0000755000175000017500000000034513517470404016500 0ustar fengfeng#!/bin/sh #aclocal #autoconf #autoheader echo "Regenerating autotools files" autoreconf --force --install || exit 1 automake --add-missing libtoolize echo "Setting up Intltool" intltoolize --copy --force --automake || exit 1 biometric-authentication/data/0000755000175000017500000000000013755706021015407 5ustar fengfengbiometric-authentication/data/org.freedesktop.policykit.pkexec.biometric-authentication.policy0000644000175000017500000000167513517470404032216 0ustar fengfeng Run the biometric authentication configuration tool 运行生物特征认证配置工具 Authentication is required to change biometrics authentication configuration 更改生物特征认证配置需要进行身份验证 stock_person auth_admin auth_admin auth_admin_keep /usr/bin/biometric-config-tool biometric-authentication/data/org.ukui.biometric.policy0000644000175000017500000000447313517470404022356 0ustar fengfeng stock_person Enroll your biometric feature 录入您的用户生物特征信息 Enrolling your biometric features requires authorization 录入您的用户生物特征信息需要授权 auth_self auth_self auth_self_keep Enroll other user's biometric features 录入其他用户的生物信息 Enrolling other user's biometric features requires authorization 录入其他用户的生物信息需要授权 auth_admin auth_admin auth_admin_keep Delete your biometric features 删除您的用户生物信息 Deleting your biometric features requires authorization 删除您的用户生物信息需要授权 auth_self auth_self auth_self_keep Delete other user's biometric features 删除其他用户生物信息 Deleting other user's biometric features requires authorization 删除其他用户的生物信息需要授权 auth_admin auth_admin auth_admin_keep biometric-authentication/data/biometric-authentication.service0000644000175000017500000000050113517470404023756 0ustar fengfeng[Unit] Description=Authenticate by human biometric Documentation=https://github.com/ukui/biometric-authentication Before=lightdm.service [Service] Type=dbus Restart=always RestartSec=0 BusName=org.ukui.Biometric ExecStart=/usr/lib/biometric-authentication/biometric-authenticationd [Install] WantedBy=multi-user.target biometric-authentication/data/biometric-authentication0000644000175000017500000000344213755706021022327 0ustar fengfeng#!/bin/bash # ### BEGIN INIT INFO # Provides: biometric-authentication # Required-Start: $local_fs dbus # Required-Stop: $local_fs dbus # Should-Start: $named # Should-Stop: $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Biometric Authentication Service # Description: # The service layer of the biometric identification authentication framework. # The service layer uses the DBus bus to provide the upper application with # operation interfaces such as feature enroll, feature verify, feature identify, # feature search, feature delete, etc. Meanwhile, it also provides notification # of device status changes event and notification of USB device hotplug event. ### END INIT INFO set -e PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/lib/biometric-authentication/ DAEMON=/usr/lib/biometric-authentication/biometric-authenticationd PIDFILE=/tmp/biometric-authentication.pid if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE fi test -x $DAEMON || exit 0 . /lib/lsb/init-functions SSD_START_ARGS="--pidfile $PIDFILE --remove-pidfile --background --quiet --exec $DAEMON" SSD_STOP_ARGS="--pidfile $PIDFILE" start(){ log_begin_msg "Starting biometric authentication service" start-stop-daemon --start $SSD_START_ARGS log_end_msg 0 } stop(){ log_daemon_msg "Stopping biometric authentication service" start-stop-daemon --stop --quiet $SSD_STOP_ARGS || true log_end_msg 0 } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; force-reload) stop start ;; status) status_of_proc -p "$PIDFILE" "$DAEMON" "$(basename $DAEMON)" ;; *) echo "Usage: /etc/init.d/biometric-authentication {start|stop|restart|status}" exit 1 esac exit 0 biometric-authentication/data/org.ukui.Biometric.conf0000644000175000017500000000114713517470404021737 0ustar fengfeng biometric-authentication/data/Makefile.am0000644000175000017500000000126013523232275017440 0ustar fengfengNULL = dbusifdir = $(datadir)/dbus-1/interfaces dist_dbusif_DATA = org.ukui.Biometric.xml dbusconfdir = $(sysconfdir)/dbus-1/system.d dist_dbusconf_DATA = org.ukui.Biometric.conf servicedir = /lib/systemd/system/ dist_service_DATA = biometric-authentication.service initddir = /etc/init.d/ dist_initd_SCRIPTS = biometric-authentication polkitdir = $(prefix)/share/polkit-1/actions dist_polkit_DATA = org.ukui.biometric.policy \ org.freedesktop.policykit.pkexec.biometric-authentication.policy \ $(NULL) if HAS_BIO_CONFIG_DIR confdir = $(BIO_CONFIG_DIR) else confdir = $(sysconfdir)/biometric-auth endif driversconfdir = $(confdir) dist_driversconf_DATA = biometric-drivers.conf biometric-authentication/data/biometric-drivers.conf0000644000175000017500000000047013517470404021707 0ustar fengfeng# # 生物特征识别服务的配置文件 # 配置文件使用以下格式: # [驱动名] # Enable=true #是否启用驱动,必填 # Driver=/path/to/driver/so #驱动文件路径,必填 # Key=Value #其他配置项,选填,例如串口驱动使用Path键指定串口的设备节点 # biometric-authentication/data/org.ukui.Biometric.xml0000644000175000017500000001627413755706021021622 0ustar fengfeng Check application API Version result等于0,应用使用的API版本兼容框架版本(主、从版本号匹配,功能版本号小于等于框架版本) result大于0,应用使用的API版本不兼容框架版本,应用过新 result小于0,应用使用的API版本不兼容框架版本,应用过旧 Get Drive List (v)info = (issiiiiiiiiiii)struct{ int drv_ID; char * name; char * full_name; int enable; int dev_num; int biotype; int stotype; int eigtype; int vertype; int idtype; int bustype int dev_status; int ops_result; int notify_mid; } Get Device List (v)info = (issiiiiiiiiiii)struct{ int drv_ID; char * name; char * full_name; int enable; int dev_num; int biotype; int stotype; int eigtype; int vertype; int idtype; int bustype int dev_status; int ops_result; int notify_mid; } Get Feature List feature_list = struct(uid, idx, idx_name) name = name Update Device Status Get Device Status Message Get Operations Status Message Get Notify Message Enroll Eigen Verify Eigen Identify Eigen Capture Eigen Search Eigen Clean Eigen Rename Eigen Stop Current Operations Emitted when device status is changed. Driver(device) of status changed. Type of status changed. Emit when the device is plugged in or pulled out. Driver or device ID Action type Number of devices after the event