diff -Nru ukui-biometric-manager-1.0.0/AUTHORS ukui-biometric-manager-1.0.1~201904291421/AUTHORS --- ukui-biometric-manager-1.0.0/AUTHORS 2018-09-10 07:53:47.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/AUTHORS 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Yang Hao diff -Nru ukui-biometric-manager-1.0.0/biometric-manager.pro ukui-biometric-manager-1.0.1~201904291421/biometric-manager.pro --- ukui-biometric-manager-1.0.0/biometric-manager.pro 2018-09-07 09:27:07.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/biometric-manager.pro 2019-04-24 02:59:53.000000000 +0000 @@ -4,7 +4,6 @@ # #------------------------------------------------- -TRANSLATIONS = i18n_ts/zh_CN.ts QT += core gui dbus greaterThan(QT_MAJOR_VERSION, 4): QT += widgets @@ -28,7 +27,9 @@ src/treemodel.cpp \ src/inputdialog.cpp \ src/messagedialog.cpp \ - src/aboutdialog.cpp + src/aboutdialog.cpp \ + src/configuration.cpp \ + src/servicemanager.cpp HEADERS += src/mainwindow.h \ @@ -39,7 +40,9 @@ src/treemodel.h \ src/inputdialog.h \ src/messagedialog.h \ - src/aboutdialog.h + src/aboutdialog.h \ + src/configuration.h \ + src/servicemanager.h FORMS += src/mainwindow.ui \ @@ -53,9 +56,13 @@ RESOURCES += \ assets.qrc -TRANSLATIONS += i18n_ts/zh_CN.ts +TRANSLATIONS += i18n_ts/zh_CN.ts \ + i18n_ts/fr.ts \ + i18n_ts/pt.ts \ + i18n_ts/ru.ts \ + i18n_ts/es.ts -system("lrelease i18n_ts/zh_CN.ts i18n_ts/zh_CN.qm") +system("lrelease i18n_ts/*.ts") qm_file.files = i18n_ts/*.qm qm_file.path = $${PREFIX}/i18n_qm/ diff -Nru ukui-biometric-manager-1.0.0/ChangeLog ukui-biometric-manager-1.0.1~201904291421/ChangeLog --- ukui-biometric-manager-1.0.0/ChangeLog 2018-09-10 07:54:09.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/ChangeLog 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -See 'git log' diff -Nru ukui-biometric-manager-1.0.0/COPYING ukui-biometric-manager-1.0.1~201904291421/COPYING --- ukui-biometric-manager-1.0.0/COPYING 2018-09-10 07:55:32.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/COPYING 1970-01-01 00:00:00.000000000 +0000 @@ -1,674 +0,0 @@ - GNU 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. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff -Nru ukui-biometric-manager-1.0.0/debian/changelog ukui-biometric-manager-1.0.1~201904291421/debian/changelog --- ukui-biometric-manager-1.0.0/debian/changelog 2018-09-08 09:40:09.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/debian/changelog 2019-04-24 07:48:18.000000000 +0000 @@ -1,3 +1,19 @@ +ukui-biometric-manager (1.0.1~201904291421) disco; urgency=medium + + * Daily build. + + -- ShuiLu Pi Wed, 24 Apr 2019 15:48:18 +0800 + +ukui-biometric-manager (1.0.1-0ubuntu1) disco; urgency=medium + + * Bugfix:the application gets the auth results but has + not yet authenticated. + * Add device status display and default device configuration. + * Add supporting for usb device hot-plug. + * Hide the main widgets and show prompt for service stoppped. + + -- handsome_feng Tue, 16 Apr 2019 21:10:08 +0800 + ukui-biometric-manager (1.0.0-2) unstable; urgency=medium * Initial Release. (Closes: #908462) diff -Nru ukui-biometric-manager-1.0.0/debian/control ukui-biometric-manager-1.0.1~201904291421/debian/control --- ukui-biometric-manager-1.0.0/debian/control 2018-09-08 09:40:09.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/debian/control 2019-04-24 02:59:53.000000000 +0000 @@ -7,9 +7,9 @@ qtbase5-dev, qttools5-dev-tools Standards-Version: 4.2.1 -Homepage: http://www.ukui.org -Vcs-Git: https://salsa.debian.org/kylin-team/ukui-biometric-manager.git -Vcs-Browser: https://salsa.debian.org/kylin-team/ukui-biometric-manager +Homepage: https://github.com/ukui/ukui-biometric-manager +Vcs-Git: https://github.com/ukui/ukui-biometric-manager.git +Vcs-Browser: https://github.com/ukui/ukui-biometric-manager Package: ukui-biometric-manager Architecture: amd64 arm64 diff -Nru ukui-biometric-manager-1.0.0/debian/rules ukui-biometric-manager-1.0.1~201904291421/debian/rules --- ukui-biometric-manager-1.0.0/debian/rules 2018-09-08 09:40:09.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/debian/rules 2019-04-24 02:59:53.000000000 +0000 @@ -2,6 +2,7 @@ export QT_SELECT := qt5 export NO_PKG_MANGLE=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all APP_API_MAJOR := 0 APP_API_MINOR := 11 diff -Nru ukui-biometric-manager-1.0.0/debian/source/format ukui-biometric-manager-1.0.1~201904291421/debian/source/format --- ukui-biometric-manager-1.0.0/debian/source/format 2018-09-08 09:40:09.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/debian/source/format 2019-04-24 07:48:18.000000000 +0000 @@ -1 +1 @@ -3.0 (quilt) +3.0 (native) diff -Nru ukui-biometric-manager-1.0.0/i18n_ts/es.ts ukui-biometric-manager-1.0.1~201904291421/i18n_ts/es.ts --- ukui-biometric-manager-1.0.0/i18n_ts/es.ts 1970-01-01 00:00:00.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/i18n_ts/es.ts 2019-04-24 02:59:53.000000000 +0000 @@ -0,0 +1,586 @@ + + + + + AboutDialog + + Dialog + Diálogo + + + Biometric Manager + Gerente biometrico + + + About + Acerca de + + + Contributor + Contribuyente + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;"> Biometric Manager is a supporting software for managing biometric identification which is developed by Kylin team. It mainly contains biometirc verification management, biometirc service management, biometric device's driver management and biometirc features management, etc.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;"> </span><a name="textarea-bg-text"></a><span style=" font-family:'Sans Serif'; font-size:9pt;">A</span><span style=" font-family:'Sans Serif'; font-size:9pt;">ll functions of the software are still being perfected. Please look forward to it. </span></p></body></html> + <! DOCTYPE HTML PUBLIC \ "- // W3C // DTD HTML 4.0 // EN " \ "http: //www.w3.org/TR/REC-html40/strict.dtd "> \ n <html> <head> <meta name = \ "qrichtext " content = \ "1 " /> <style type = \ "text / css "> \ np, li {white-space: pre-wrap; } \ n </style> </head> <body style = \ "font-family: 'Cantarell'; font-size: 11pt; font-weight: 400; font-style: normal; "> \ n <p style = \ "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; "> <span style = \ "font-family: 'Sans Serif'; font-size: 9pt; "> Biometric Manager es un software de soporte para la gestión de la identificación biométrica que está desarrollado por el equipo de Kylin. Contiene principalmente la gestión de la verificación biométrica, la gestión del servicio biométrico, la gestión del controlador del dispositivo biométrico y la gestión de las características biométricas, etc. </span> </p> \ n <p style = \ "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; \ "> <span style = " font-family: 'Sans Serif'; tamaño de fuente: 9pt ; \ "> </span> <a name="textarea-bg-text"> </a> <span style = " font-family: 'Sans Serif'; tamaño de letra: 9pt; \ "> A </span> <span style = \ "font-family: 'Sans Serif'; font-size: 9pt; "> Todas las funciones del software aún se están perfeccionando. Por favor espérenlo. </span></p></body> </html> + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">© 2016-2017 lihao &lt;lihao@kylinos.cn&gt;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">© 2017-2018 yanghao &lt;yanghao@kylinos.cn&gt;</span></p></body></html> + <! DOCTYPE HTML PUBLIC \ "- // W3C // DTD HTML 4.0 // EN " \ "http: //www.w3.org/TR/REC-html40/strict.dtd "> \ n <html> <head> <meta name = \ "qrichtext " content = \ "1 " /> <style type = \ "text / css "> \ np, li {white-space: pre-wrap; } \ n </style> </head> <body style = \ "font-family: 'Cantarell'; font-size: 11pt; font-weight: 400; font-style: normal; "> \ n <p style = \ "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; "> <span style = \ "font-family: 'Sans Serif'; font-size: 9pt; "> © 2016-2017 lihao & lt; lihao@kylinos.cn&gt; </span> </p> \ n <p style = \ "margin -top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; \ "> <span style = " font-family : 'Sans Serif'; font-size: 9pt; \ "> © 2017-2018 yanghao & lt; yanghao@kylinos.cn&gt; </span> </p> </body> </html> + + + Close + Cerrar + + + + ContentPane + + Form + Formar + + + Device Full Name: + Nombre completo del dispositivo: + + + Device Short Name: + Nombre corto del dispositivo: + + + Bus Type: + Tipo de autobús: + + + Identification Type: + Tipo de identificación: + + + ... + ... + + + Storage Type: + Tipo de almacenamiento: + + + Verify Type: + Verificar el tipo: + + + Default Device: + Dispositivo por defecto: + + + Driver Status: + Estado del controlador: + + + Device Status: + Estado del dispositivo: + + + Enroll + Inscribirse + + + Verify + Verificar + + + Search + Buscar + + + Delete + Borrar + + + Clean + Limpiar + + + Connected + Conectado + + + Unconnected + Desconectado + + + Opened + Abrió + + + Closed + Cerrado + + + List + Lista + + + New Feature + Nueva caracteristica + + + Please input a name for the feature: + Por favor ingrese un nombre para la característica: + + + Rename Feature + Renombrar función + + + Please input a new name for the feature: + Por favor ingrese un nuevo nombre para la característica: + + + Duplicate feature name + Nombre de la característica duplicada + + + Empty feature name + Nombre de función vacío + + + Confirm whether clean all the features? + ¿Confirmar si limpiar todas las características? + + + Confirm Clean + Confirmar limpiar + + + Confirm whether delete the features selected? + Confirmar si eliminar las funciones seleccionadas? + + + Confirm Delete + Confirmar eliminación + + + Delete successfully + Eliminar con éxito + + + The result of delete: + El resultado de la eliminación: + + + Clean Failed: + Limpieza fallida: + + + Clean successfully + Limpiar con exito + + + Clean Result + Resultado limpio + + + Rename Successfully + Renombrar con éxito + + + Rename Result + Cambiar nombre de resultado + + + DBus calling error + Error de llamada DBus + + + Device is busy + El dispositivo esta ocupado + + + No such device + Hay tal dispositivo + + + Permission denied + Permiso denegado + + + + EnumToString + + FingerPrint + Huella dactilar + + + Iris + Iris + + + Face + Cara + + + VoicePrint + Impresión de voz + + + Hardware Verification + Verificación de hardware + + + Software Verification + Verificación de software + + + Mix Verification + Mezcla de verificación + + + Other Verification + Otra verificación + + + Device Storage + Almacenamiento de dispositivos + + + OS Storage + Almacenamiento OS + + + Mix Storage + Almacenamiento de mezcla + + + Serial + De serie + + + USB + USB + + + PCIE + PCIE + + + Any + Alguna + + + Other + Otro + + + Hardware Identification + Identificación de hardware + + + Software Identification + Identificación de software + + + Mix Identification + Identificación de la mezcla + + + Other Identification + Otra identificación + + + + InputDialog + + Dialog + Diálogo + + + InputDialog + InputDialog + + + OK + DE ACUERDO + + + + MainWindow + + BiometricManager + Administrador biométrico + + + Biometirc Manager + Gerente de Biometirc + + + UserName + Nombre de usuario + + + DashBoard + Tablero + + + FingerPrint + Huella dactilar + + + FingerVein + FingerVein + + + Iris + Iris + + + VoicePrint + Impresión de voz + + + Biometric Verification Status: + Estado de verificación biométrica: + + + Closed + Cerrado + + + Note + Nota + + + Driver Not Found + Controlador no encontrado + + + Fatal Error + Error fatal + + + the biometric-authentication service was not started + El servicio de autenticación biométrica no se inició. + + + API version is not compatible + La versión API no es compatible + + + Restart Service + Reiniciar servicio + + + About + Acerca de + + + Opened + Abrió + + + Biometric Authentication can take over system authentication processes which include Login, LockScreen, sudo/su and Polkit + La autenticación biométrica puede hacerse cargo de los procesos de autenticación del sistema que incluyen Login, LockScreen, sudo / su y Polkit + + + There is no any available biometric device or no features enrolled currently. + No hay ningún dispositivo biométrico disponible o no hay funciones registradas actualmente. + + + Warnning + Advertencias + + + There is no available device or no features enrolled + No hay ningún dispositivo disponible o ninguna función inscrita + + + Device Name + Nombre del dispositivo + + + Device Status + Estado del dispositivo + + + Driver Status + Estado del conductor + + + Default + Defecto + + + Fail to change device status + No se puede cambiar el estado del dispositivo + + + Connected + Conectado + + + Unconnected + Desconectado + + + + MessageDialog + + Dialog + Diálogo + + + MessageDialog + MessageDialog + + + TextLabel + TextLabel + + + OK + DE ACUERDO + + + Cancel + Cancelar + + + + PromptDialog + + Current Progress + Progreso actual + + + PromptDialog + PromptDialog + + + TextLabel + TextLabel + + + Enroll + Inscribirse + + + Verify + Verificar + + + Search + Buscar + + + In progress, please wait... + En progreso, por favor espere ... + + + Index + Índice + + + UserName + Nombre de usuario + + + FeatureName + FeatureName + + + Permission is required. +Please authenticate yourself to continue + Se requiere permiso. \ NPor favor, autentíquese para continuar + + + Enroll successfully + Inscribirse exitosamente + + + Verify successfully + Verificar exitosamente + + + Not Match + No coincide + + + Search Result + Resultado de búsqueda + + + No matching features Found + No se encontraron características coincidentes + + + D-Bus calling error + Error de llamada D-Bus + + + Device encounters an error + El dispositivo encuentra un error + + + Operation timeout + Tiempo de expiración de operación + + + Device is busy + El dispositivo esta ocupado + + + No such device + Hay tal dispositivo + + + Permission denied + Permiso denegado + + + Failed to enroll + No se pudo inscribir + + + Failed to match + Error al emparejar + + + Not Found + Extraviado + + + <font size='2'>the window will be closed after two second</font> + <font size = '2'> la ventana se cerrará después de dos segundos </font> + + + + QObject + + Username + Nombre de usuario + + + + TreeModel + + Name + Nombre + + + index + índice + + + username + nombre de usuario + + + diff -Nru ukui-biometric-manager-1.0.0/i18n_ts/fr.ts ukui-biometric-manager-1.0.1~201904291421/i18n_ts/fr.ts --- ukui-biometric-manager-1.0.0/i18n_ts/fr.ts 1970-01-01 00:00:00.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/i18n_ts/fr.ts 2019-04-24 02:59:53.000000000 +0000 @@ -0,0 +1,586 @@ + + + + + AboutDialog + + Dialog + Dialogue + + + Biometric Manager + Gestionnaire biométrique + + + About + Sur + + + Contributor + Donateur + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;"> Biometric Manager is a supporting software for managing biometric identification which is developed by Kylin team. It mainly contains biometirc verification management, biometirc service management, biometric device's driver management and biometirc features management, etc.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;"> </span><a name="textarea-bg-text"></a><span style=" font-family:'Sans Serif'; font-size:9pt;">A</span><span style=" font-family:'Sans Serif'; font-size:9pt;">ll functions of the software are still being perfected. Please look forward to it. </span></p></body></html> + <! DOCTYPE HTML PUBLIC \ "- // W3C // DTD HTML 4.0 // EN " \ "http: //www.w3.org/TR/REC-html40/strict.dtd "> \ n <html> <head> <meta name = \ "qrichtext " content = \ "1 " /> <style type = \ "text / css "> \ np, li {espace blanc: pre-wrap; } \ n </ style> </ head> <body style = \ "font-family: 'Cantarell'; taille de la police: 11pt; taille de la police: 400; style de la police de caractères: normal; "> \ n <p style = \ "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; "> <span style = \ "font-family: 'Sans Serif'; taille de la police de caractères: 9 pt; "> Biometric Manager est un logiciel d’appui pour la gestion de l’identification biométrique développé par l’équipe Kylin. Il contient principalement la gestion de la vérification biometirc, la gestion du service biometirc, la gestion des pilotes du dispositif biométrique et la gestion des fonctionnalités biometirc, etc. </ span> </ p> \ n <p style = \ "margin-top: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; indentation du texte: 0px; \ "> <span style = " font-family: 'Sans Serif'; taille de la police: 9pt ; \ "> </ span> <a name="textarea-bg-text"> </a> <span style = " font-family: 'Sans Serif'; font-size: 9pt; \ "> Une </ span> <span style = \ "font-family: 'Sans Serif'; font-size: 9pt; "> Toutes les fonctions du logiciel sont en cours de perfectionnement. S'il vous plaît attendre avec impatience. </ span> </ p> </ body> </ html> + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">© 2016-2017 lihao &lt;lihao@kylinos.cn&gt;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">© 2017-2018 yanghao &lt;yanghao@kylinos.cn&gt;</span></p></body></html> + <! DOCTYPE HTML PUBLIC \ "- // W3C // DTD HTML 4.0 // EN " \ "http: //www.w3.org/TR/REC-html40/strict.dtd "> \ n <html> <head> <meta name = \ "qrichtext " content = \ "1 " /> <style type = \ "text / css "> \ np, li {espace blanc: pre-wrap; } \ n </ style> </ head> <body style = \ "font-family: 'Cantarell'; taille de la police: 11pt; taille de la police: 400; style de la police de caractères: normal; "> \ n <p style = \ "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; "> <span style = \ "font-family: 'Sans Serif'; taille de police: 9pt; "> © 2016-2017 lihao & lt; lihao@kylinos.cn&gt; </ span> </ p> \ n <p style = \ "margin -top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; indentation du texte: 0px; \ "> <span style = " font-family <2017> <2017> </ span> </ span> </ span> </ span> </ span> </ span> </ span> </ span> </ span> <2017> <2017> </ span> </ span> </ span> </ span> </ span> + + + Close + Fermer + + + + ContentPane + + Form + Forme + + + Device Full Name: + Nom complet de l'appareil: + + + Device Short Name: + Nom abrégé de l'appareil: + + + Bus Type: + Type de bus: + + + Identification Type: + Type d'identification: + + + ... + ... + + + Storage Type: + Type de stockage: + + + Verify Type: + Vérifiez le type: + + + Default Device: + Appareil par défaut: + + + Driver Status: + Statut du conducteur: + + + Device Status: + Statut du périphérique: + + + Enroll + Inscrire + + + Verify + Vérifier + + + Search + Chercher + + + Delete + Effacer + + + Clean + Nettoyer + + + Connected + Connecté + + + Unconnected + Sans rapport + + + Opened + Ouvert + + + Closed + Fermé + + + List + liste + + + New Feature + Nouvelle fonctionnalité + + + Please input a name for the feature: + Veuillez saisir un nom pour la fonctionnalité: + + + Rename Feature + Renommer Fonction + + + Please input a new name for the feature: + Veuillez saisir un nouveau nom pour la fonctionnalité: + + + Duplicate feature name + Nom de la fonction en double + + + Empty feature name + Nom de la caractéristique vide + + + Confirm whether clean all the features? + Confirmer si nettoyer toutes les fonctionnalités? + + + Confirm Clean + Confirmer nettoyer + + + Confirm whether delete the features selected? + Confirmer si supprimer les fonctionnalités sélectionnées? + + + Confirm Delete + Confirmation de la suppression + + + Delete successfully + Supprimer avec succès + + + The result of delete: + Le résultat de la suppression: + + + Clean Failed: + Échec du nettoyage: + + + Clean successfully + Nettoyer avec succès + + + Clean Result + Résultat net + + + Rename Successfully + Renommer avec succès + + + Rename Result + Renommer le résultat + + + DBus calling error + Erreur d'appel DBus + + + Device is busy + Le périphérique est occupé + + + No such device + Aucun appareil de ce type + + + Permission denied + Permission refusée + + + + EnumToString + + FingerPrint + Empreinte digitale + + + Iris + Iris + + + Face + Visage + + + VoicePrint + VoicePrint + + + Hardware Verification + Vérification du matériel + + + Software Verification + Vérification du logiciel + + + Mix Verification + Vérification du mélange + + + Other Verification + Autre vérification + + + Device Storage + Stockage de l'appareil + + + OS Storage + Stockage OS + + + Mix Storage + Mixage de stockage + + + Serial + En série + + + USB + USB + + + PCIE + PCIE + + + Any + Tout + + + Other + Autre + + + Hardware Identification + Identification du matériel + + + Software Identification + Identification du logiciel + + + Mix Identification + Identification du mélange + + + Other Identification + Autre identification + + + + InputDialog + + Dialog + Dialogue + + + InputDialog + InputDialog + + + OK + D'accord + + + + MainWindow + + BiometricManager + BiometricManager + + + Biometirc Manager + Biometirc Manager + + + UserName + Nom d'utilisateur + + + DashBoard + Tableau de bord + + + FingerPrint + Empreinte digitale + + + FingerVein + FingerVein + + + Iris + Iris + + + VoicePrint + VoicePrint + + + Biometric Verification Status: + Statut de vérification biométrique: + + + Closed + Fermé + + + Note + Remarque + + + Driver Not Found + Pilote introuvable + + + Fatal Error + Erreur fatale + + + the biometric-authentication service was not started + le service d'authentification biométrique n'a pas été démarré + + + API version is not compatible + La version de l'API n'est pas compatible + + + Restart Service + Redémarrer le service + + + About + Sur + + + Opened + Ouvert + + + Biometric Authentication can take over system authentication processes which include Login, LockScreen, sudo/su and Polkit + L'authentification biométrique peut prendre en charge les processus d'authentification système, notamment Login, LockScreen, sudo / su et Polkit. + + + There is no any available biometric device or no features enrolled currently. + Il n'y a pas de dispositif biométrique disponible ou aucune fonctionnalité inscrite actuellement. + + + Warnning + Mise en garde + + + There is no available device or no features enrolled + Il n'y a pas d'appareil disponible ou pas de fonctionnalités inscrites + + + Device Name + Nom de l'appareil + + + Device Status + Statut du périphérique + + + Driver Status + Statut du conducteur + + + Default + Défaut + + + Fail to change device status + Impossible de changer l'état de l'appareil + + + Connected + Connecté + + + Unconnected + Sans rapport + + + + MessageDialog + + Dialog + Dialogue + + + MessageDialog + MessageDialog + + + TextLabel + TextLabel + + + OK + D'accord + + + Cancel + Annuler + + + + PromptDialog + + Current Progress + Progrès en cours + + + PromptDialog + PromptDialog + + + TextLabel + TextLabel + + + Enroll + Inscrire + + + Verify + Vérifier + + + Search + Chercher + + + In progress, please wait... + En cours, veuillez patienter ... + + + Index + Indice + + + UserName + Nom d'utilisateur + + + FeatureName + FeatureName + + + Permission is required. +Please authenticate yourself to continue + Une autorisation est requise. \ NVeuillez vous authentifier pour continuer + + + Enroll successfully + S'inscrire avec succès + + + Verify successfully + Vérifier avec succès + + + Not Match + Ne pas correspondre + + + Search Result + Résultat de la recherche + + + No matching features Found + Aucune fonctionnalité correspondante trouvée + + + D-Bus calling error + Erreur d'appel D-Bus + + + Device encounters an error + Le périphérique rencontre une erreur + + + Operation timeout + Délai d'attente de l'opération + + + Device is busy + Le périphérique est occupé + + + No such device + Aucun appareil de ce type + + + Permission denied + Permission refusée + + + Failed to enroll + Échec d'inscription + + + Failed to match + Impossible de faire correspondre + + + Not Found + Pas trouvé + + + <font size='2'>the window will be closed after two second</font> + <font size = '2'> la fenêtre sera fermée après deux secondes </ font> + + + + QObject + + Username + Nom d'utilisateur + + + + TreeModel + + Name + prénom + + + index + indice + + + username + Nom d'utilisateur + + + diff -Nru ukui-biometric-manager-1.0.0/i18n_ts/pt.ts ukui-biometric-manager-1.0.1~201904291421/i18n_ts/pt.ts --- ukui-biometric-manager-1.0.0/i18n_ts/pt.ts 1970-01-01 00:00:00.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/i18n_ts/pt.ts 2019-04-24 02:59:53.000000000 +0000 @@ -0,0 +1,586 @@ + + + + + AboutDialog + + Dialog + Diálogo + + + Biometric Manager + Gerente Biométrico + + + About + Sobre + + + Contributor + Contribuinte + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;"> Biometric Manager is a supporting software for managing biometric identification which is developed by Kylin team. It mainly contains biometirc verification management, biometirc service management, biometric device's driver management and biometirc features management, etc.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;"> </span><a name="textarea-bg-text"></a><span style=" font-family:'Sans Serif'; font-size:9pt;">A</span><span style=" font-family:'Sans Serif'; font-size:9pt;">ll functions of the software are still being perfected. Please look forward to it. </span></p></body></html> + <! DOCTYPE HTML PUBLIC \ "- // W3C // DTD HTML 4.0 // PT " \ "http: //www.w3.org/TR/REC-html40/strict.dtd "> \ n <html> <head> <meta nome = \ "qrichtext " content = \ "1 " /> <estilo type = \ "text / css "> \ np, li {espaço em branco: pre-wrap; } \ n </ style> </ head> <estilo de corpo = \ "font-family: 'Cantarell'; tamanho da fonte: 11pt; peso da fonte: 400; estilo da fonte: normal; "> \ n <p style = \ "margin-top: 0px; margin-bottom: 0px; margem-esquerda: 0px; margem-direita: 0px; -qt-block-indent: 0; recuo de texto: 0px; "> <span style = \ "font-family: 'Sans Serif'; tamanho da fonte: 9pt; "> Biometric Manager é um software de suporte para o gerenciamento de identificação biométrica desenvolvido pela equipe da Kylin. Ele contém principalmente gerenciamento de verificação de biometirc, gerenciamento de serviço de biometirc, gerenciamento de driver de dispositivo biométrico e gerenciamento de recursos biometirc, etc. </ span> </ p> \ n <p style = \ "top de margem: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; \ "> <span style =" font-family: 'Sans Serif'; tamanho da fonte: 9pt ; \ "> </ span> <a name="textarea-bg-text"> </a> <span style =" font-family: 'Sans Serif'; tamanho da fonte: 9pt; \ "> Um </ span> <span style = "font-family: 'Sans Serif'; tamanho da fonte: " \ ll> funções do software ainda estão sendo aperfeiçoadas. Por favor, olhe para a frente. </ span> </ p> </ body> </ html> + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">© 2016-2017 lihao &lt;lihao@kylinos.cn&gt;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">© 2017-2018 yanghao &lt;yanghao@kylinos.cn&gt;</span></p></body></html> + <! DOCTYPE HTML PUBLIC \ "- // W3C // DTD HTML 4.0 // PT " \ "http: //www.w3.org/TR/REC-html40/strict.dtd "> \ n <html> <head> <meta nome = \ "qrichtext " content = \ "1 " /> <estilo type = \ "text / css "> \ np, li {espaço em branco: pre-wrap; } \ n </ style> </ head> <estilo de corpo = \ "font-family: 'Cantarell'; tamanho da fonte: 11pt; peso da fonte: 400; estilo da fonte: normal; "> \ n <p style = \ "margin-top: 0px; margin-bottom: 0px; margem-esquerda: 0px; margem-direita: 0px; -qt-block-indent: 0; recuo de texto: 0px; "> <span style = \ "font-family: 'Sans Serif'; tamanho da fonte: 9pt; "> © 2016-2017 lihao & lt; lihao@kylinos.cn&gt; </ span> </ p> \ n <p style = \ "margin -top: 0px; margin-bottom: 0px; margem-esquerda: 0px; margem-direita: 0px; -qt-block-indent: 0; recuo de texto: 0px; \ "> <span style = " font-family : 'Sans Serif'; tamanho da fonte: 9pt; \ "> © 2017-2018 yanghao & lt; yanghao@kylinos.cn&gt; </ span> </ p> </ body> </ html> + + + Close + Fechar + + + + ContentPane + + Form + Formato + + + Device Full Name: + Nome Completo do Dispositivo: + + + Device Short Name: + Nome abreviado do dispositivo: + + + Bus Type: + Tipo de ônibus: + + + Identification Type: + Tipo de identificação: + + + ... + ... + + + Storage Type: + Tipo de armazenamento: + + + Verify Type: + Verifique o tipo: + + + Default Device: + Aparelho padrao: + + + Driver Status: + Status do Driver: + + + Device Status: + Status do dispositivo: + + + Enroll + Inscreva-se + + + Verify + Verificar + + + Search + Pesquisa + + + Delete + Excluir + + + Clean + Limpar \ limpo + + + Connected + Conectado + + + Unconnected + Desconectado + + + Opened + Aberto + + + Closed + Fechadas + + + List + Lista + + + New Feature + Novo recurso + + + Please input a name for the feature: + Por favor insira um nome para o elemento: + + + Rename Feature + Renomear Recurso + + + Please input a new name for the feature: + Por favor insira um novo nome para o elemento: + + + Duplicate feature name + Nome do recurso duplicado + + + Empty feature name + Nome do recurso vazio + + + Confirm whether clean all the features? + Confirme se limpa todos os recursos? + + + Confirm Clean + Confirme Limpar + + + Confirm whether delete the features selected? + Confirme se deseja excluir os recursos selecionados? + + + Confirm Delete + Confirme a exclusão + + + Delete successfully + Excluir com sucesso + + + The result of delete: + O resultado da exclusão: + + + Clean Failed: + Clean Failed: + + + Clean successfully + Limpar com sucesso + + + Clean Result + Limpar o resultado + + + Rename Successfully + Renomeie com sucesso + + + Rename Result + Renomear Resultado + + + DBus calling error + Erro de chamada DBus + + + Device is busy + Dispositivo está ocupado + + + No such device + Nenhum dispositivo + + + Permission denied + Permissão negada + + + + EnumToString + + FingerPrint + Impressão digital + + + Iris + Íris + + + Face + Cara + + + VoicePrint + VoicePrint + + + Hardware Verification + Verificação de Hardware + + + Software Verification + Verificação de Software + + + Mix Verification + Mix Verification + + + Other Verification + Outra verificação + + + Device Storage + Dispositivo de armazenamento + + + OS Storage + Armazenamento de SO + + + Mix Storage + Armazenamento Mix + + + Serial + Serial + + + USB + USB + + + PCIE + PCIE + + + Any + Qualquer + + + Other + De outros + + + Hardware Identification + Identificação de Hardware + + + Software Identification + Identificação de Software + + + Mix Identification + Mix Identificação + + + Other Identification + Outra identificação + + + + InputDialog + + Dialog + Diálogo + + + InputDialog + InputDialog + + + OK + Está bem + + + + MainWindow + + BiometricManager + BiometricManager + + + Biometirc Manager + Gerente de Biometirc + + + UserName + UserName + + + DashBoard + Painel de controle + + + FingerPrint + Impressão digital + + + FingerVein + FingerVein + + + Iris + Íris + + + VoicePrint + VoicePrint + + + Biometric Verification Status: + Status de verificação biométrica: + + + Closed + Fechadas + + + Note + Nota + + + Driver Not Found + Driver não encontrado + + + Fatal Error + Erro fatal + + + the biometric-authentication service was not started + o serviço de autenticação biométrica não foi iniciado + + + API version is not compatible + A versão da API não é compatível + + + Restart Service + Serviço de reinicialização + + + About + Sobre + + + Opened + Aberto + + + Biometric Authentication can take over system authentication processes which include Login, LockScreen, sudo/su and Polkit + Autenticação biométrica pode assumir processos de autenticação do sistema que incluem login, LockScreen, sudo / su e Polkit + + + There is no any available biometric device or no features enrolled currently. + Não há nenhum dispositivo biométrico disponível ou nenhum recurso registrado atualmente. + + + Warnning + Advertindo + + + There is no available device or no features enrolled + Não há dispositivo disponível ou nenhum recurso inscrito + + + Device Name + Nome do dispositivo + + + Device Status + Status do dispositivo + + + Driver Status + Status do motorista + + + Default + Padrão + + + Fail to change device status + Falha ao alterar o status do dispositivo + + + Connected + Conectado + + + Unconnected + Desconectado + + + + MessageDialog + + Dialog + Diálogo + + + MessageDialog + MessageDialog + + + TextLabel + TextLabel + + + OK + Está bem + + + Cancel + Cancelar + + + + PromptDialog + + Current Progress + Progresso atual + + + PromptDialog + PromptDialog + + + TextLabel + TextLabel + + + Enroll + Inscreva-se + + + Verify + Verificar + + + Search + Pesquisa + + + In progress, please wait... + Em andamento, por favor aguarde ... + + + Index + Índice + + + UserName + UserName + + + FeatureName + FeatureName + + + Permission is required. +Please authenticate yourself to continue + A permissão é necessária. \ NPor favor, autentique-se para continuar + + + Enroll successfully + Inscreva-se com sucesso + + + Verify successfully + Verificar com sucesso + + + Not Match + Não combina + + + Search Result + Resultado da pesquisa + + + No matching features Found + Nenhum recurso correspondente encontrado + + + D-Bus calling error + Erro de chamada D-Bus + + + Device encounters an error + O dispositivo encontra um erro + + + Operation timeout + Tempo limite de operação + + + Device is busy + Dispositivo está ocupado + + + No such device + Nenhum dispositivo + + + Permission denied + Permissão negada + + + Failed to enroll + Não foi possível inscrever + + + Failed to match + Não foi possível combinar + + + Not Found + Não encontrado + + + <font size='2'>the window will be closed after two second</font> + <font size = '2'> a janela será fechada após dois segundos </ font> + + + + QObject + + Username + Nome de usuário + + + + TreeModel + + Name + Nome + + + index + índice + + + username + username + + + diff -Nru ukui-biometric-manager-1.0.0/i18n_ts/ru.ts ukui-biometric-manager-1.0.1~201904291421/i18n_ts/ru.ts --- ukui-biometric-manager-1.0.0/i18n_ts/ru.ts 1970-01-01 00:00:00.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/i18n_ts/ru.ts 2019-04-24 02:59:53.000000000 +0000 @@ -0,0 +1,586 @@ + + + + + AboutDialog + + Dialog + диалог + + + Biometric Manager + Биометрический менеджер + + + About + Около + + + Contributor + участник + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;"> Biometric Manager is a supporting software for managing biometric identification which is developed by Kylin team. It mainly contains biometirc verification management, biometirc service management, biometric device's driver management and biometirc features management, etc.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;"> </span><a name="textarea-bg-text"></a><span style=" font-family:'Sans Serif'; font-size:9pt;">A</span><span style=" font-family:'Sans Serif'; font-size:9pt;">ll functions of the software are still being perfected. Please look forward to it. </span></p></body></html> + <! DOCTYPE HTML PUBLIC \ "- // W3C // DTD HTML 4.0 // EN " \ "http: //www.w3.org/TR/REC-html40/strict.dtd "> \ n <html> <head> <meta name = \ "qrichtext " content = \ "1 " /> <style type = \ "text / css "> \ np, li {white-space: pre-wrap; } \ n </ style> </ head> <body style = \ "font-family: 'Cantarell'; font-size: 11pt; font-weight: 400; font-style: normal; "> \ n <p style = \ "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; "> <span style = \ "font-family: 'Sans Serif'; font-size: 9pt; "> Biometric Manager - это поддерживающее программное обеспечение для управления биометрической идентификацией, разработанное командой Kylin. Он в основном содержит управление верификацией биометрии, управление сервисами biometirc, управление драйверами биометрических устройств и управление функциями biometirc и т. Д. </ Span> </ p> \ n <p style = \ "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; \ "> <span style = " font-family: 'Sans Serif'; font-size: 9pt ; \ "> </ span> <a name="textarea-bg-text"> </a> <span style = " font-family: 'Sans Serif', font-size: 9pt; \ "> A </ span> <span style = \ "font-family: 'Sans Serif'; font-size: 9pt; \> ll функции программного обеспечения все еще совершенствуются. Пожалуйста, с нетерпением ждем этого. </ SPAN> </ р> </ тело> </ HTML> + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">© 2016-2017 lihao &lt;lihao@kylinos.cn&gt;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif'; font-size:9pt;">© 2017-2018 yanghao &lt;yanghao@kylinos.cn&gt;</span></p></body></html> + <! DOCTYPE HTML PUBLIC \ "- // W3C // DTD HTML 4.0 // EN " \ "http: //www.w3.org/TR/REC-html40/strict.dtd "> \ n <html> <head> <meta name = \ "qrichtext " content = \ "1 " /> <style type = \ "text / css "> \ np, li {white-space: pre-wrap; } \ n </ style> </ head> <body style = \ "font-family: 'Cantarell'; font-size: 11pt; font-weight: 400; font-style: normal; "> \ n <p style = \ "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; "> <span style = \ "font-family: 'Sans Serif'; font-size: 9pt; "> © 2016-2017 lihao & lt; lihao@kylinos.cn&gt; </ span> </ p> \ n <p style = \ "margin -top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-block-indent: 0; text-indent: 0px; \ "> <span style = " font-family : 'Sans Serif', font-size: 9pt; \ "> © 2017-2018 yanghao & lt; yanghao@kylinos.cn&gt; </ span> </ p> </ body> </ html> + + + Close + Закрыть + + + + ContentPane + + Form + форма + + + Device Full Name: + Полное имя устройства: + + + Device Short Name: + Краткое название устройства: + + + Bus Type: + Тип шины: + + + Identification Type: + Тип идентификации: + + + ... + ... + + + Storage Type: + Тип хранения: + + + Verify Type: + Тип проверки: + + + Default Device: + Устройство по умолчанию: + + + Driver Status: + Статус драйвера: + + + Device Status: + Состояние устройства: + + + Enroll + зачислять + + + Verify + проверить + + + Search + Поиск + + + Delete + удалять + + + Clean + чистый + + + Connected + Связанный + + + Unconnected + несвязанный + + + Opened + открытый + + + Closed + Закрыто + + + List + Список + + + New Feature + Новая функция + + + Please input a name for the feature: + Введите имя для функции: + + + Rename Feature + Переименовать функцию + + + Please input a new name for the feature: + Введите новое имя для этой функции: + + + Duplicate feature name + Повторяющееся имя функции + + + Empty feature name + Пустое имя функции + + + Confirm whether clean all the features? + Подтвердите, очистите ли все функции? + + + Confirm Clean + Confirm Clean + + + Confirm whether delete the features selected? + Подтвердить, удалить ли выбранные функции? + + + Confirm Delete + Подтвердите удаление + + + Delete successfully + Удалить успешно + + + The result of delete: + Результат удаления: + + + Clean Failed: + Ошибка очистки: + + + Clean successfully + Очистить + + + Clean Result + Чистый результат + + + Rename Successfully + Успешно переименуйте + + + Rename Result + Переименование результата + + + DBus calling error + Ошибка вызова DBus + + + Device is busy + Устройство занято + + + No such device + Нет такого устройства + + + Permission denied + Доступ запрещен + + + + EnumToString + + FingerPrint + FingerPrint + + + Iris + Ирис + + + Face + Лицо + + + VoicePrint + Voiceprint + + + Hardware Verification + Проверка оборудования + + + Software Verification + Проверка программного обеспечения + + + Mix Verification + Контроль микширования + + + Other Verification + Другая проверка + + + Device Storage + Хранение устройств + + + OS Storage + Хранение ОС + + + Mix Storage + Хранение смеси + + + Serial + последовательный + + + USB + USB + + + PCIE + PCIE + + + Any + Любые + + + Other + Другие + + + Hardware Identification + Идентификация оборудования + + + Software Identification + Идентификация программного обеспечения + + + Mix Identification + Идентификация микса + + + Other Identification + Другая идентификация + + + + InputDialog + + Dialog + диалог + + + InputDialog + InputDialog + + + OK + ОК + + + + MainWindow + + BiometricManager + BiometricManager + + + Biometirc Manager + Менеджер Biometirc + + + UserName + UserName + + + DashBoard + Приборная доска + + + FingerPrint + FingerPrint + + + FingerVein + FingerVein + + + Iris + Ирис + + + VoicePrint + Voiceprint + + + Biometric Verification Status: + Биометрический статус проверки: + + + Closed + Закрыто + + + Note + Заметка + + + Driver Not Found + Драйвер не найден + + + Fatal Error + Фатальная ошибка + + + the biometric-authentication service was not started + служба биометрической аутентификации не была запущена + + + API version is not compatible + Версия API несовместима + + + Restart Service + Служба перезагрузки + + + About + Около + + + Opened + открытый + + + Biometric Authentication can take over system authentication processes which include Login, LockScreen, sudo/su and Polkit + Биометрическая аутентификация может использовать процессы аутентификации системы, которые включают Login, LockScreen, sudo / su и Polkit + + + There is no any available biometric device or no features enrolled currently. + В настоящее время нет никакого доступного биометрического устройства или никаких функций. + + + Warnning + Warnning + + + There is no available device or no features enrolled + Нет доступных устройств или нет зарегистрированных функций + + + Device Name + Имя устройства + + + Device Status + Состояние устройства + + + Driver Status + Статус драйвера + + + Default + По умолчанию + + + Fail to change device status + Не удалось изменить состояние устройства + + + Connected + Связанный + + + Unconnected + несвязанный + + + + MessageDialog + + Dialog + диалог + + + MessageDialog + MessageDialog + + + TextLabel + TextLabel + + + OK + ОК + + + Cancel + Отмена + + + + PromptDialog + + Current Progress + Текущий прогресс + + + PromptDialog + PromptDialog + + + TextLabel + TextLabel + + + Enroll + зачислять + + + Verify + проверить + + + Search + Поиск + + + In progress, please wait... + В процессе, пожалуйста, подождите ... + + + Index + Индекс + + + UserName + UserName + + + FeatureName + FeatureName + + + Permission is required. +Please authenticate yourself to continue + Требуется разрешение. \ NПожалуйста, подтвердите подлинность, чтобы продолжить + + + Enroll successfully + Успешно записаться + + + Verify successfully + Проверить успешно + + + Not Match + Не соответствует + + + Search Result + Результат поиска + + + No matching features Found + Не найдено совпадающих функций + + + D-Bus calling error + Ошибка вызова D-Bus + + + Device encounters an error + Устройство обнаруживает ошибку + + + Operation timeout + Тайм-аут работы + + + Device is busy + Устройство занято + + + No such device + Нет такого устройства + + + Permission denied + Доступ запрещен + + + Failed to enroll + Не удалось зарегистрировать + + + Failed to match + Не удалось сопоставить + + + Not Found + не обнаружена + + + <font size='2'>the window will be closed after two second</font> + <font size = '2'> окно будет закрыто после двух секунд </ font> + + + + QObject + + Username + имя пользователя + + + + TreeModel + + Name + имя + + + index + индекс + + + username + имя пользователя + + + diff -Nru ukui-biometric-manager-1.0.0/i18n_ts/zh_CN.ts ukui-biometric-manager-1.0.1~201904291421/i18n_ts/zh_CN.ts --- ukui-biometric-manager-1.0.0/i18n_ts/zh_CN.ts 2018-09-07 09:27:07.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/i18n_ts/zh_CN.ts 2019-04-24 02:59:53.000000000 +0000 @@ -90,34 +90,40 @@ 表单 - - - - - - - - + + + + + + + + + ... ... - + + Driver Status: + 驱动状态: + + + Device Status: 设备状态: - + Default Device: 默认设备: - + Verify Type: 验证类型: - + Clean 清空 @@ -126,27 +132,27 @@ 生物识别类型: - + Device Short Name: 设备简称: - + Device Full Name: 设备全称: - + Bus Type: 总线类型: - + Identification Type: 识别类型: - + Storage Type: 存储类型: @@ -159,23 +165,23 @@ 特征列表 - + Enroll 录入 - - + + Delete 删除 - + Verify 验证 - + Search 搜索 @@ -200,82 +206,94 @@ 设备可用 - + Opened - + Closed - + + + Connected + 已连接 + + + + + Unconnected + 未连接 + + + New Feature 新的特征 - + Please input a name for the feature: 请输入特征名称: - + Rename Feature 特征重命名 - + Duplicate feature name 特征名称重复 - + Empty feature name 空的特征名称 - + Confirm whether clean all the features? 确认是否清除所有特征? - + Confirm Clean 确认清空 - + Confirm whether delete the features selected? 确认是否删除选中的特征? - + Confirm Delete 确认删除 - + Delete successfully 删除成功 - + The result of delete: 删除结果: - + Clean Failed: - 清空失败: + 清空失败: - + Clean successfully 清空成功 - + DBus calling error DBus调用发生错误 @@ -292,17 +310,17 @@ 清空成功 - + Clean Result 清空结果 - + Rename Successfully 重命名成功 - + Rename Result 重命名结果 @@ -399,7 +417,7 @@ 列表 - + List 列表 @@ -420,7 +438,7 @@ 特征重命名 - + Please input a new name for the feature: 请输入特征的新名称: @@ -449,17 +467,17 @@ 操作超时 - + Device is busy 设备忙 - + No such device 设备不存在 - + Permission denied 没有权限 @@ -521,103 +539,103 @@ EnumToString - - + + FingerPrint 指纹 - + Iris 虹膜 - + Face 人脸 - + VoicePrint 声纹 - + Hardware Verification 硬件验证 - + Software Verification 软件验证 - + Mix Verification 混合验证 - + Other Verification 其他验证 - + Device Storage 设备存储 - + OS Storage 系统存储 - + Mix Storage 混合存储 - + Serial 串口 - + USB USB - + PCIE PCIE - + Any 任意类型 - + Other 其他 - + Hardware Identification 硬件识别 - + Software Identification 软件识别 - + Mix Identification 混合识别 - + Other Identification 其他识别 @@ -728,19 +746,19 @@ - + FingerPrint 指纹 - + FingerVein 指静脉 - + VoicePrint 声纹 @@ -751,7 +769,7 @@ - + Closed @@ -782,100 +800,123 @@ - + Iris 虹膜 - - - + Fatal Error 错误 - the biometric-authentication service was not started - 'biometric-authentication'服务没有启动 + 'biometric-authentication'服务没有启动 - API version is not compatible - API 版本不兼容 + API 版本不兼容 - + About 关于 - + Opened - + Biometric Authentication can take over system authentication processes which include Login, LockScreen, sudo/su and Polkit 生物识别可进行系统认证,包括登录、锁屏、sudo/su 授权和 Polkit 提权。 - + There is no any available biometric device or no features enrolled currently. 当前没有可用的生物识别设备,或者当前用户没有录入任何特征。 - + + Device Name 设备名称 - + + + Device Status + 设备状态 + + + + + Driver Status + 驱动状态 + + + + + Default + 默认 + + + + Connected + 已连接 + + + + Unconnected + 未连接 + + + + The Service is stopped + 服务已关闭 + + Status - 状态 + 状态 - + Fail to change device status 更该设备状态失败 - - + Restart Service 重启服务 - Restart immediately - 立即重启 + 立即重启 - Restart later - 稍后重启 + 稍后重启 - The configuration has been modified. Restart the service immediately to make it effecitve? - 配置修改成功,是否立即重启服务使其生效? + 配置修改成功,是否立即重启服务使其生效? - Error - 错误 + 错误 - Device is not connected - 设备未连接 + 设备未连接 - + Warnning 警告 - + There is no available device or no features enrolled 没有可用设备或者没有录入特征 @@ -885,17 +926,17 @@ Dialog - + MessageDialog - + TextLabel - + @@ -939,120 +980,120 @@ 操作中,请稍后... - + Enroll 录入 - + Verify 验证 - + Search 搜索 - + In progress, please wait... 操作中,请稍后... - - + + Index 序列号 - + UserName 用户名 - - + + FeatureName 特征名称 - + Permission is required. Please authenticate yourself to continue 需要授权!请先进行认证以继续操作 - + Enroll successfully 录入成功 - + Verify successfully 验证成功 - + Not Match 不匹配 - + Search Result 搜索结果 - + No matching features Found 未搜索到匹配的特征 - + D-Bus calling error D-Bus 调用错误 - + Device encounters an error 设备遇到错误 - + Operation timeout 操作超时 - + Device is busy 设备忙 - + No such device 设备不存在 - + Permission denied 没有权限 - + Failed to enroll 录入失败 - + Failed to match 匹配失败 - + Not Found 未搜索到 - + <font size='2'>the window will be closed after two second</font> <font size='2'>窗口将在两秒后关闭</font> @@ -1060,11 +1101,27 @@ QObject - + Username 用户名 + + + Fatal Error + 错误 + + + + the biometric-authentication service was not started + 'biometric-authentication'服务没有启动 + + + + API version is not compatible + API 版本不兼容 + + FingerPrint 指纹 @@ -1100,18 +1157,18 @@ 声纹 - + Name 名称 - - + + index 序列号 - + username 用户名 diff -Nru ukui-biometric-manager-1.0.0/README ukui-biometric-manager-1.0.1~201904291421/README --- ukui-biometric-manager-1.0.0/README 2018-09-10 07:57:35.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -This package is a tool to manage the drivers of biometric devices and -users' features and manage whether biometric authentication is enabled. -The service is provided by biometric-authentication.service in -biometric-auth package. - -Homepage: https://github.com/ukui diff -Nru ukui-biometric-manager-1.0.0/src/configuration.cpp ukui-biometric-manager-1.0.1~201904291421/src/configuration.cpp --- ukui-biometric-manager-1.0.0/src/configuration.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/configuration.cpp 2019-04-24 02:59:53.000000000 +0000 @@ -0,0 +1,37 @@ +#include "configuration.h" +#include +#include +#include + +QString Configuration::configFile = QDir::homePath() + + "/.biometric_auth/ukui_biometric.conf"; + +Configuration* Configuration::instance_ = new Configuration; + +Configuration::Configuration(QObject *parent) : QObject(parent) +{ + +} + +Configuration *Configuration::instance() +{ + return instance_; +} + +QString Configuration::getDefaultDevice() +{ + QSettings settings(configFile, QSettings::IniFormat); + + return settings.value("DefaultDevice").toString(); +} + +void Configuration::setDefaultDevice(const QString &deviceName) +{ + qDebug() << deviceName; + QSettings settings(configFile, QSettings::IniFormat); + + settings.setValue("DefaultDevice", deviceName); + settings.sync(); + + emit defaultDeviceChanged(deviceName); +} diff -Nru ukui-biometric-manager-1.0.0/src/configuration.h ukui-biometric-manager-1.0.1~201904291421/src/configuration.h --- ukui-biometric-manager-1.0.0/src/configuration.h 1970-01-01 00:00:00.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/configuration.h 2019-04-24 02:59:53.000000000 +0000 @@ -0,0 +1,27 @@ +#ifndef CONFIGURATION_H +#define CONFIGURATION_H + +#include + +class Configuration : public QObject +{ + Q_OBJECT +private: + explicit Configuration(QObject *parent = nullptr); + Configuration(const Configuration &config) = delete; + Configuration& operator =(const Configuration &rhs) = delete; + +public: + static Configuration *instance(); + QString getDefaultDevice(); + void setDefaultDevice(const QString &deviceName); + +private: + static QString configFile; + static Configuration *instance_; + +signals: + void defaultDeviceChanged(const QString &deviceName); +}; + +#endif // CONFIGURATION_H diff -Nru ukui-biometric-manager-1.0.0/src/contentpane.cpp ukui-biometric-manager-1.0.1~201904291421/src/contentpane.cpp --- ukui-biometric-manager-1.0.0/src/contentpane.cpp 2018-09-10 07:34:13.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/contentpane.cpp 2019-04-24 02:59:53.000000000 +0000 @@ -21,6 +21,7 @@ #include "promptdialog.h" #include "inputdialog.h" #include "messagedialog.h" +#include "configuration.h" #define ICON_SIZE 32 @@ -66,10 +67,24 @@ ui->treeView->setFocusPolicy(Qt::NoFocus); } +void ContentPane::setDeviceInfo(DeviceInfo *deviceInfo) +{ + this->deviceInfo = deviceInfo; + updateWidgetStatus(); +} + void ContentPane::setDeviceAvailable(int deviceAvailable) { + if(deviceAvailable) { + ui->lblDevStatus->setText(tr("Connected")); + showFeatures(); + } else { + ui->lblDevStatus->setText(tr("Unconnected")); + dataModel->removeAll(); + } deviceInfo->device_available = deviceAvailable; - updateWidgetStatus(); + updateWidgetStatus(); + qDebug() << "status changed:" << ui->lblDevStatus->text(); } int ContentPane::featuresCount() @@ -81,7 +96,7 @@ void ContentPane::updateWidgetStatus() { - if (deviceInfo->device_available > 0) { + if (deviceInfo->driver_enable > 0) { ui->btnStatus->setStyleSheet("QPushButton{background:url(:/images/assets/switch_open_small.png);}"); ui->labelStatusText->setText(tr("Opened")); } else { @@ -123,6 +138,7 @@ QString storageType = EnumToString::transferStorageType(deviceInfo->stotype); QString identifyType = EnumToString::transferIdentifyType(deviceInfo->idtype); QString listName = EnumToString::transferBioType(deviceInfo->biotype) + tr("List"); + QString devStatus = deviceInfo->device_available > 0 ? tr("Connected") : tr("Unconnected"); ui->labelDeviceShortName->setText(deviceInfo->device_shortname); ui->labelDeviceFullName->setText(deviceInfo->device_fullname); @@ -131,10 +147,18 @@ ui->labelStorageType->setText(storageType); ui->labelIdentificationType->setText(identifyType); ui->labelListName->setText(listName); + ui->lblDevStatus->setText(devStatus); + + if(Configuration::instance()->getDefaultDevice() == deviceInfo->device_shortname) + ui->cbDefault->setChecked(true); - ui->labelDefault->hide(); - ui->btnDefault->hide(); -// ui->btnDefault->setStyleSheet("QPushButton{background:url(:/images/assets/switch_close_small.png);}"); + connect(Configuration::instance(), &Configuration::defaultDeviceChanged, + this, [&](const QString &deviceName) { + if(deviceName == deviceInfo->device_shortname) + ui->cbDefault->setChecked(true); + else + ui->cbDefault->setChecked(false); + }); } void ContentPane::on_btnStatus_clicked() @@ -142,11 +166,16 @@ Q_EMIT changeDeviceStatus(deviceInfo); } -void ContentPane::on_btnDefault_clicked() +void ContentPane::on_cbDefault_clicked(bool checked) { + if(checked) + Configuration::instance()->setDefaultDevice(deviceInfo->device_shortname); + else + Configuration::instance()->setDefaultDevice(""); } + /** * @brief 显示生物识别数据列表 * @param biotype @@ -495,4 +524,3 @@ } return errorMessage; } - diff -Nru ukui-biometric-manager-1.0.0/src/contentpane.h ukui-biometric-manager-1.0.1~201904291421/src/contentpane.h --- ukui-biometric-manager-1.0.0/src/contentpane.h 2018-09-10 07:34:13.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/contentpane.h 2019-04-24 02:59:53.000000000 +0000 @@ -47,7 +47,6 @@ void on_btnSearch_clicked(); void on_btnClean_clicked(); void on_btnStatus_clicked(); - void on_btnDefault_clicked(); void on_treeView_doubleClicked(const QModelIndex &); /* Normal functions */ @@ -66,6 +65,7 @@ public: void setDeviceAvailable(int deviceAvailable); + void setDeviceInfo(DeviceInfo *deviceInfo); int featuresCount(); void showFeatures(); @@ -75,6 +75,8 @@ void errorCallback(QDBusError error); /* Members */ + void on_cbDefault_clicked(bool checked); + private: Ui::ContentPane *ui; /* 用于和远端 DBus 对象交互的代理接口 */ diff -Nru ukui-biometric-manager-1.0.0/src/contentpane.ui ukui-biometric-manager-1.0.1~201904291421/src/contentpane.ui --- ukui-biometric-manager-1.0.0/src/contentpane.ui 2018-09-07 09:27:07.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/contentpane.ui 2019-04-24 02:59:53.000000000 +0000 @@ -16,56 +16,27 @@ - - - - - - - 40 - 20 - - - - - 40 - 20 - - - - - - - - - - - - 10 - - - - ... - - - - - - - + + - 0 + 120 0 + + + 120 + 16777215 + + 10 - ... + Device Full Name: @@ -93,18 +64,12 @@ - - + + - 180 - 20 - - - - - 180 - 20 + 0 + 0 @@ -113,12 +78,12 @@ - ... + Bus Type: - - + + 0 @@ -131,19 +96,25 @@ - ... + Identification Type: - - + + + + + 0 + 0 + + 10 - Default Device: + ... @@ -165,60 +136,78 @@ - - + + + + + 0 + 0 + + 10 - Storage Type: + ... - - + + 10 - ... + Storage Type: - - + + + + + 0 + 0 + + 10 - Verify Type: + ... - - + + 10 - Device Status: + Verify Type: - - + + - 0 - 0 + 180 + 20 + + + + + 180 + 20 @@ -227,84 +216,97 @@ - Bus Type: + ... - - - - - 0 - 0 - - + + 10 - Identification Type: + ... - - - - - 0 - 0 - - + + 10 - ... + Default Device: - - - - - 120 - 0 - - - - - 120 - 16777215 - - + + + + + + + 40 + 20 + + + + + 40 + 20 + + + + + + + + + + + + 10 + + + + ... + + + + + + + 10 - Device Full Name: + Driver Status: - - - - - 40 - 20 - + + + + Device Status: - - - 40 - 16777215 - + + + + + + ... + + + + diff -Nru ukui-biometric-manager-1.0.0/src/customtype.h ukui-biometric-manager-1.0.1~201904291421/src/customtype.h --- ukui-biometric-manager-1.0.0/src/customtype.h 2018-09-10 07:34:13.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/customtype.h 2019-04-24 02:59:53.000000000 +0000 @@ -29,6 +29,10 @@ #define DBUS_PATH "/org/ukui/Biometric" #define DBUS_INTERFACE "org.ukui.Biometric" +#define FD_DBUS_SERVICE "org.freedesktop.DBus" +#define FD_DBUS_PATH "/org/freedesktop/DBus" +#define FD_DBUS_INTERFACE "org.freedesktop.DBus" + enum BioType { BIOTYPE_FINGERPRINT, BIOTYPE_FINGERVEIN, diff -Nru ukui-biometric-manager-1.0.0/src/main.cpp ukui-biometric-manager-1.0.1~201904291421/src/main.cpp --- ukui-biometric-manager-1.0.0/src/main.cpp 2018-09-10 07:34:13.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/main.cpp 2019-04-24 02:59:53.000000000 +0000 @@ -18,6 +18,16 @@ #include "mainwindow.h" #include #include +#include + +#include +#include +#include +#include +#include + +#include "servicemanager.h" +#include "messagedialog.h" #define WORKING_DIRECTORY "/usr/share/biometric-manager" @@ -35,27 +45,92 @@ parser.process(app); username = parser.value(usernameOption); argMap.insert("username", username); - qDebug() << "GUI:" << "Get username from command line - " << username; +// qDebug() << "GUI:" << "Get username from command line - " << username; } +void checkIsRunning() +{ + int fd, len; + char buf[32]; + struct flock lock; + + const QString PID_DIR = QString("/var/run/user/%1").arg(QString::number(getuid())); + const QString PID_FILE = PID_DIR + "/biometric-manager.pid"; + + qDebug() << PID_DIR; + QDir dir(PID_DIR); + if(!dir.exists()) { + if(!dir.mkdir(PID_DIR.toLocal8Bit().data())) { + perror("create pid directory failed"); + exit(1); + } + } + if( (fd = open(PID_FILE.toLocal8Bit().data(), + O_RDWR | O_CREAT, 0666)) == -1){ + perror("open pid file failed"); + exit(1); + } + + memset(&lock, 0, sizeof(struct flock)); + lock.l_type = F_WRLCK; + lock.l_whence = SEEK_SET; + + if(fcntl(fd, F_SETLK, &lock) < 0) { +// perror("fcntl F_SETLK failed"); + printf("There is already an instance running\n"); + exit(1); + } + + len = snprintf(buf, sizeof(buf), "%d", getpid()); + ftruncate(fd, 0); + if(write(fd, buf, len) != len) { + perror("write pid to lock file failed"); + exit(1); + } +} int main(int argc, char *argv[]) { + checkIsRunning(); + QApplication a(argc, argv); /* 对中文环境安装翻译 */ QString locale = QLocale::system().name(); QTranslator translator; - if(locale == "zh_CN") { - translator.load(WORKING_DIRECTORY"/i18n_qm/zh_CN.qm"); - a.installTranslator(&translator); - } + QString qmFile = QString(WORKING_DIRECTORY"/i18n_qm/%1.qm").arg(locale); + translator.load(qmFile); + a.installTranslator(&translator); + qDebug() << "load translation file " << qmFile; /* 解析命令行参数 */ QMap argMap; parseArguments(a, argMap); + + ServiceManager *sm = ServiceManager::instance(); + + if(!sm->serviceExists()) + { + MessageDialog msgDialog(MessageDialog::Error, + QObject::tr("Fatal Error"), + QObject::tr("the biometric-authentication service was not started")); + msgDialog.exec(); + exit(EXIT_FAILURE); + } + + if(!sm->apiCompatible()) + { + MessageDialog msgDialog(MessageDialog::Error, + QObject::tr("Fatal Error"), + QObject::tr("API version is not compatible")); + msgDialog.exec(); + exit(EXIT_FAILURE); + } + MainWindow w(argMap.value("username")); w.setObjectName("MainWindow"); w.show(); + QObject::connect(sm, &ServiceManager::serviceStatusChanged, + &w, &MainWindow::onServiceStatusChanged); return a.exec(); } diff -Nru ukui-biometric-manager-1.0.0/src/mainwindow.cpp ukui-biometric-manager-1.0.1~201904291421/src/mainwindow.cpp --- ukui-biometric-manager-1.0.0/src/mainwindow.cpp 2018-09-10 07:34:13.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/mainwindow.cpp 2019-04-24 02:59:53.000000000 +0000 @@ -25,12 +25,15 @@ #include #include #include +#include +#include #include #include #include "contentpane.h" #include "customtype.h" #include "messagedialog.h" #include "aboutdialog.h" +#include "configuration.h" #define ICON_SIZE 32 @@ -43,12 +46,11 @@ dragWindow(false), aboutDlg(nullptr) { - checkServiceExist(); - ui->setupUi(this); prettify(); initialize(); + setWindowIcon(QIcon(":/images/assets/logo.png")); } MainWindow::~MainWindow() @@ -76,45 +78,6 @@ dragWindow = false; } -/*! - * \brief MainWindow::checkServiceExist - * 检查生物识别后台服务是否已启动 - */ -void MainWindow::checkServiceExist() -{ - QDBusInterface iface("org.freedesktop.DBus", "/", "org.freedesktop.DBus", - QDBusConnection::systemBus()); - QDBusReply reply = iface.call("ListNames"); - bool serviceExist = reply.value().contains(DBUS_SERVICE); - if(!serviceExist) { - MessageDialog msgDialog(MessageDialog::Error, - tr("Fatal Error"), - tr("the biometric-authentication service was not started")); - msgDialog.exec(); - QTimer::singleShot(0, qApp, &QCoreApplication::quit); - } -} - -void MainWindow::checkAPICompatibility() -{ - QDBusPendingReply reply = serviceInterface->call("CheckAppApiVersion", - APP_API_MAJOR, APP_API_MINOR, APP_API_FUNC); - reply.waitForFinished(); - if (reply.isError()) { - qDebug() << "GUI:" << reply.error(); - return; - } - int result = reply.argumentAt(0).value(); - if (result != 0) { - MessageDialog msgDialog(MessageDialog::Error, - tr("Fatal Error"), - tr("API version is not compatible")); - msgDialog.exec(); - /* https://stackoverflow.com/a/31081379/4112667 */ - QTimer::singleShot(0, qApp, &QCoreApplication::quit); - } -} - void MainWindow::prettify() { setWindowFlags(Qt::FramelessWindowHint); @@ -187,8 +150,6 @@ QDBusConnection::systemBus()); serviceInterface->setTimeout(2147483647); /* 微秒 */ - checkAPICompatibility(); - initSysMenu(); /* 获取并显示用户 */ @@ -206,6 +167,9 @@ connect(ui->btnClose, &QPushButton::clicked, this, &MainWindow::close); ui->btnDashBoard->click(); + + connect(serviceInterface, SIGNAL(USBDeviceHotPlug(int, int, int)), + this, SLOT(onUSBDeviceHotPlug(int,int,int))); } void MainWindow::initSysMenu() @@ -372,7 +336,7 @@ argument >> *deviceInfo; /* 提取最终的 DeviceInfo 结构体 */ deviceInfosMap[bioTypeToIndex(deviceInfo->biotype)].append(deviceInfo); - qDebug() << deviceInfo->biotype << deviceInfo->device_shortname << deviceInfo->device_available; +// qDebug() << deviceInfo->biotype << deviceInfo->device_shortname << deviceInfo->device_available; } } @@ -521,12 +485,12 @@ QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); if (verificationStatus) { process.start("pkexec bioctl disable -u " + environment.value("USER")); - process.waitForFinished(); + process.waitForFinished(-1); if (process.exitCode() == 0) setVerificationStatus(false); } else { process.start("pkexec bioctl enable -u " + environment.value("USER")); - process.waitForFinished(); + process.waitForFinished(-1); if (process.exitCode() == 0) setVerificationStatus(true); } @@ -536,15 +500,28 @@ { int deviceType = (currentRow); QStringList headerData; - headerData << " " + tr("Device Name") << tr("Status") << " " + tr("Device Name") << tr("Status"); + headerData << " " + tr("Device Name") << tr("Device Status") << tr("Driver Status") << tr("Default") + << " " + tr("Device Name") << tr("Device Status") << tr("Driver Status") << tr("Default"); ui->tableWidgetDevices->clear(); ui->tableWidgetDevices->setRowCount(0); - ui->tableWidgetDevices->setColumnCount(4); + ui->tableWidgetDevices->setColumnCount(8); ui->tableWidgetDevices->setHorizontalHeaderLabels(headerData); ui->tableWidgetDevices->setFocusPolicy(Qt::NoFocus); - for(int i = 0; i < headerData.size(); i++) - ui->tableWidgetDevices->horizontalHeaderItem(i)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter); + for(int i = 0; i < headerData.size(); i++){ + if(i % 4 == 0) + ui->tableWidgetDevices->horizontalHeaderItem(i)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter); + else + ui->tableWidgetDevices->horizontalHeaderItem(i)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter); + } + ui->tableWidgetDevices->setColumnWidth(0, 100); + ui->tableWidgetDevices->setColumnWidth(1, 100); + ui->tableWidgetDevices->setColumnWidth(2, 100); + ui->tableWidgetDevices->setColumnWidth(3, 80); + ui->tableWidgetDevices->setColumnWidth(4, 100); + ui->tableWidgetDevices->setColumnWidth(5, 100); + ui->tableWidgetDevices->setColumnWidth(6, 100); + ui->tableWidgetDevices->setColumnWidth(7, 50); int column = 0; for(auto deviceInfo : deviceInfosMap[deviceType]) { if(bioTypeToIndex(deviceInfo->biotype) == deviceType) { @@ -554,42 +531,76 @@ else row_index--; - //第一、三列 + //第一、五列 设备名称 QTableWidgetItem *item_name = new QTableWidgetItem(" " + deviceInfo->device_shortname); item_name->setFlags(item_name->flags() ^ Qt::ItemIsEditable); ui->tableWidgetDevices->setItem(row_index, column, item_name); - //第二、四列 - QWidget *layoutWidget = new QWidget(); - if(column+1 == 1) { - layoutWidget->setObjectName("layoutWidget"); - layoutWidget->setStyleSheet("QWidget#layoutWidget{border-right: 1px solid lightgray;}"); - } - QPushButton *item_status = new QPushButton(this); - item_status->setObjectName(deviceInfo->device_shortname + "_" + QString::number(deviceType)); - item_status->setFixedSize(40, 20); - if(deviceInfo->device_available > 0) - item_status->setStyleSheet("background:url(:/images/assets/switch_open_small.png)"); + //第二、六列 设备状态(是否连接) + QTableWidgetItem *item_devStatus = new QTableWidgetItem; + setDeviceStatus(item_devStatus, deviceInfo->device_available > 0); + item_devStatus->setFlags(item_name->flags() ^ Qt::ItemIsEditable); + item_devStatus->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter); + ui->tableWidgetDevices->setItem(row_index, column + 1, item_devStatus); + + //第三、七列 驱动状态(是否使能) + QWidget *item_drvStatus = new QWidget(); + QPushButton *btnDrvStatus = new QPushButton(this); + btnDrvStatus->setObjectName(deviceInfo->device_shortname + "_" + QString::number(deviceType)); + btnDrvStatus->setFixedSize(40, 20); + if(deviceInfo->driver_enable > 0) + btnDrvStatus->setStyleSheet("background:url(:/images/assets/switch_open_small.png)"); else - item_status->setStyleSheet("background:url(:/images/assets/switch_close_small.png)"); - connect(item_status, &QPushButton::clicked, this, &MainWindow::onDeviceStatusClicked); + btnDrvStatus->setStyleSheet("background:url(:/images/assets/switch_close_small.png)"); + connect(btnDrvStatus, &QPushButton::clicked, this, &MainWindow::onDriverStatusClicked); - QVBoxLayout *layout = new QVBoxLayout(layoutWidget); - layout->addWidget(item_status, 0, Qt::AlignVCenter); + QVBoxLayout *layout = new QVBoxLayout(item_drvStatus); + layout->addWidget(btnDrvStatus, 0, Qt::AlignVCenter | Qt::AlignHCenter); layout->setMargin(0); - layoutWidget->setLayout(layout); - ui->tableWidgetDevices->setCellWidget(row_index, column+1, layoutWidget); + item_drvStatus->setLayout(layout); + ui->tableWidgetDevices->setCellWidget(row_index, column + 2, item_drvStatus); + + //第四、八列 默认设备(是否设为默认设备) + QWidget *item_default = new QWidget(ui->tableWidgetDevices); + item_default->setObjectName("itemDefalut"); + if(column == 0) + item_default->setStyleSheet("#itemDefalut{border-right: 1px solid lightgray; }"); + QCheckBox *cbDefault = new QCheckBox(this); - column = (column+2) % 4; + if(Configuration::instance()->getDefaultDevice() == deviceInfo->device_shortname) + cbDefault->setChecked(true); + btnGroup.push_back(cbDefault); + cbDefault->setObjectName("cb_" + deviceInfo->device_shortname); + connect(cbDefault, &QCheckBox::clicked, this, &MainWindow::onDefaultDeviceChanged); + connect(Configuration::instance(), &Configuration::defaultDeviceChanged, + this, [&](const QString &deviceName) { + QString objName = "cb_" + deviceName; + QCheckBox *check = findChild(objName); + if(check) { + check->setChecked(true); + } + else { + for(auto btn : btnGroup) + btn->setChecked(false); + } + }); + + QHBoxLayout *layout_default = new QHBoxLayout; + layout_default->addWidget(cbDefault); + layout_default->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); + item_default->setLayout(layout_default); + ui->tableWidgetDevices->setCellWidget(row_index, column + 3, item_default); + + column = (column + 4) % 8; } } } -void MainWindow::onDeviceStatusClicked() +void MainWindow::onDriverStatusClicked() { QString objNameStr = sender()->objectName(); qDebug() << objNameStr; - int spliter = objNameStr.indexOf('_'); + int spliter = objNameStr.lastIndexOf('_'); QString deviceName = objNameStr.left(spliter); int deviceType = objNameStr.right(objNameStr.length() - spliter - 1).toInt(); @@ -606,25 +617,41 @@ changeDeviceStatus(deviceInfo); } +void MainWindow::onDefaultDeviceChanged(bool checked) +{ + QString objName = sender()->objectName(); + QString deviceName = objName.split("_").at(1); + + for(auto cb : btnGroup) + if(cb != sender()) + cb->setChecked(false); + + if(checked) + Configuration::instance()->setDefaultDevice(deviceName); + else + Configuration::instance()->setDefaultDevice(""); +} + + bool MainWindow::changeDeviceStatus(DeviceInfo *deviceInfo) { - bool toEnable = deviceInfo->device_available <= 0 ? true : false; + bool toEnable = deviceInfo->driver_enable <= 0 ? true : false; QProcess process; QString cmd; if (toEnable) { qDebug() << "enable" << deviceInfo->device_shortname; - cmd = "pkexec biometric-config-tool enable-driver " + cmd = "pkexec biodrvctl enable " //"pkexec biometric-config-tool enable-driver " + deviceInfo->device_shortname; qDebug() << cmd; process.start(cmd); - process.waitForFinished(); + process.waitForFinished(-1); } else { qDebug() << "disable" << deviceInfo->device_shortname; - cmd = "pkexec biometric-config-tool disable-driver " + cmd = "pkexec biodrvctl disable " //"pkexec biometric-config-tool disable-driver " + deviceInfo->device_shortname; qDebug() << cmd; process.start(cmd); - process.waitForFinished(); + process.waitForFinished(-1); } if (process.exitCode() != 0) { MessageDialog msgDialog(MessageDialog::Error, @@ -633,19 +660,19 @@ msgDialog.exec(); return false; } - MessageDialog msgDialog(MessageDialog::Question, - tr("Restart Service"), - tr("The configuration has been modified. " - "Restart the service immediately to make it effecitve?")); - msgDialog.setOkText(tr(" Restart immediately ")); - msgDialog.setCancelText(tr(" Restart later ")); - int status = msgDialog.exec(); - if(status == MessageDialog::Rejected) { - return false; - } else { - if(!restartService()) - return false; - } +// MessageDialog msgDialog(MessageDialog::Question, +// tr("Restart Service"), +// tr("The configuration has been modified. " +// "Restart the service immediately to make it effecitve?")); +// msgDialog.setOkText(tr(" Restart immediately ")); +// msgDialog.setCancelText(tr(" Restart later ")); +// int status = msgDialog.exec(); +// if(status == MessageDialog::Rejected) { +// return false; +// } else { +// if(!restartService()) +// return false; +// } updateDevice(); @@ -656,31 +683,31 @@ * disabled the driver, the device must can't be used and therefor we * don't need to query device info from DBus. */ - if(toEnable) { -updateStatus: - QDBusMessage reply = serviceInterface->call("UpdateStatus", deviceInfo->device_id); - if(reply.type() == QDBusMessage::ErrorMessage) - qDebug() << "UpdateStatus error: " << reply.errorMessage(); - - //等待服务重启后DBus启动 - if(reply.arguments().length() < 3) { - usleep(200000); - goto updateStatus; - } - - int result = reply.arguments().at(0).toInt(); - deviceInfo->device_available = reply.arguments().at(2).toInt(); - - if(result == DBUS_RESULT_NOSUCHDEVICE){ - MessageDialog msgDialog(MessageDialog::Error, - tr("Error"), - tr("Device is not connected")); - msgDialog.exec(); - return false; - } - } else { - deviceInfo->device_available = 0; - } +// if(toEnable) { +//updateStatus: +// QDBusMessage reply = serviceInterface->call("UpdateStatus", deviceInfo->device_id); +// if(reply.type() == QDBusMessage::ErrorMessage) +// qDebug() << "UpdateStatus error: " << reply.errorMessage(); + +// //等待服务重启后DBus启动 +// if(reply.arguments().length() < 3) { +// usleep(200000); +// goto updateStatus; +// } + +// int result = reply.arguments().at(0).toInt(); +// deviceInfo->device_available = reply.arguments().at(2).toInt(); + +// if(result == DBUS_RESULT_NOSUCHDEVICE){ +// MessageDialog msgDialog(MessageDialog::Error, +// tr("Error"), +// tr("Device is not connected")); +// msgDialog.exec(); +// return false; +// } +// } else { +// deviceInfo->device_available = 0; +// } return true; } @@ -699,7 +726,7 @@ QProcess process; QString cmd = QString("pkexec systemctl restart %1").arg(SERVICE); process.start(cmd); - process.waitForFinished(); + process.waitForFinished(-1); qDebug() << "restart service finished"; return true; } @@ -741,11 +768,11 @@ setCursor(Qt::WaitCursor); sleep(3); //wait for service restart and dbus is ready getDeviceInfo(); - on_listWidgetDevicesType_currentRowChanged(0); + on_listWidgetDevicesType_currentRowChanged(ui->listWidgetDevicesType->currentRow()); for(int i = 0; i < __MAX_NR_BIOTYPES; i++){ for(auto deviceInfo : deviceInfosMap[i]){ ContentPane *contentPane = contentPaneMap[deviceInfo->device_shortname]; - contentPane->setDeviceAvailable(deviceInfo->device_available); + contentPane->setDeviceInfo(deviceInfo); contentPane->showFeatures(); } updateDeviceListWidget(i); @@ -755,9 +782,9 @@ void MainWindow::on_tableWidgetDevices_cellDoubleClicked(int row, int column) { - if(column %2 == 1) + if(column % 4 != 0) return; - int index = row * 2 + column / 2; + int index = row * 2 + column / 4; if(index < deviceInfosMap[ui->listWidgetDevicesType->currentRow()].size()) { int deviceType = ui->listWidgetDevicesType->currentRow(); @@ -784,3 +811,72 @@ lw->setCurrentRow(index); } } + +void MainWindow::onUSBDeviceHotPlug(int drvid, int action, int devNumNow) +{ + qDebug() << "device"<< (action > 0 ? "insert:" : "pull out:"); + qDebug() << "id:" << drvid; + for(int type : deviceInfosMap.keys()) { + auto &deviceInfoList = deviceInfosMap[type]; + for(int i = 0; i < deviceInfoList.size(); i++) { + auto deviceInfo = deviceInfoList[i]; + if(deviceInfo->device_id == drvid) { + qDebug() << "name:" << deviceInfo->device_shortname; + + //更新结构体 + deviceInfo->device_available = devNumNow; + //更新标签页中的设备状态 + ContentPane *pane = contentPaneMap[deviceInfo->device_shortname]; + pane->setDeviceAvailable(devNumNow); + + if(type != ui->listWidgetDevicesType->currentRow()) + { + return; + } + + int row = i / 2; + int column = i % 2 == 0 ? 1 : 5; + //更新表中的设备状态 + QTableWidgetItem *item = ui->tableWidgetDevices->item(row, column); + setDeviceStatus(item, devNumNow > 0); + return; + } + } + } +} + +void MainWindow::setDeviceStatus(QTableWidgetItem *item, bool connected) +{ + QString deviceStatus; + if(connected) { + deviceStatus = tr("Connected"); + item->setTextColor(Qt::red); + } + else { + deviceStatus = tr("Unconnected"); + item->setTextColor(Qt::black); + } + item->setText(deviceStatus); +} + + +void MainWindow::onServiceStatusChanged(bool activate) +{ + if(!activate) + { + ui->stackedWidgetMain->hide(); + lblPrompt = new QLabel(this); + lblPrompt->setGeometry(ui->stackedWidgetMain->x(),ui->stackedWidgetMain->y(), + ui->stackedWidgetMain->width(), + ui->stackedWidgetMain->height()); + lblPrompt->setText(tr("The Service is stopped")); + lblPrompt->setAlignment(Qt::AlignCenter); + lblPrompt->setStyleSheet("QLabel{color: red; font-size: 20px;}"); + lblPrompt->show(); + } + else + { + lblPrompt->hide(); + ui->stackedWidgetMain->show(); + } +} diff -Nru ukui-biometric-manager-1.0.0/src/mainwindow.h ukui-biometric-manager-1.0.1~201904291421/src/mainwindow.h --- ukui-biometric-manager-1.0.0/src/mainwindow.h 2018-09-10 07:34:13.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/mainwindow.h 2019-04-24 02:59:53.000000000 +0000 @@ -20,6 +20,7 @@ #include #include +#include #include "customtype.h" #include "contentpane.h" @@ -53,12 +54,15 @@ void on_listWidgetDevicesType_currentRowChanged(int); void on_tableWidgetDevices_cellDoubleClicked(int row, int column); - void onDeviceStatusClicked(); + void onDriverStatusClicked(); + void onDefaultDeviceChanged(bool checked); bool changeDeviceStatus(DeviceInfo *deviceInfo); + void onUSBDeviceHotPlug(int, int, int); + +public slots: + void onServiceStatusChanged(bool activate); private: - void checkServiceExist(); - void checkAPICompatibility(); void prettify(); void initSysMenu(); void getDeviceInfo(); @@ -75,6 +79,8 @@ bool restartService(); void updateDevice(); void updateDeviceListWidget(int biotype); + void setDeviceStatus(QTableWidgetItem *item, bool connected); + @@ -82,6 +88,8 @@ private: Ui::MainWindow *ui; QLabel *lblStatus; + //由于互斥的QButtonGroup会保证至少有一个被选中,所以这里不使用它 + QList btnGroup; /* 用于和远端 DBus 对象交互的代理接口 */ QDBusInterface *serviceInterface; int deviceCount; @@ -97,6 +105,9 @@ QMenu *menu; AboutDialog *aboutDlg; + + /* 服务被关闭时提示 */ + QLabel *lblPrompt; }; #endif // MAINWINDOW_H diff -Nru ukui-biometric-manager-1.0.0/src/mainwindow.ui ukui-biometric-manager-1.0.1~201904291421/src/mainwindow.ui --- ukui-biometric-manager-1.0.0/src/mainwindow.ui 2018-09-07 09:27:07.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/mainwindow.ui 2019-04-24 02:59:53.000000000 +0000 @@ -6,19 +6,19 @@ 0 0 - 930 + 950 650 - 930 + 950 650 - 930 + 950 650 @@ -30,7 +30,7 @@ 0 0 - 930 + 950 50 @@ -177,7 +177,7 @@ 0 50 - 930 + 950 70 @@ -303,7 +303,7 @@ 1 120 - 928 + 948 528 @@ -575,11 +575,11 @@ Qt::Horizontal - QSizePolicy::Fixed + QSizePolicy::Expanding - 40 + 30 20 @@ -594,13 +594,13 @@ - 724 + 750 0 - 724 + 750 16777215 @@ -623,10 +623,10 @@ 0 - 175 + 100 - 175 + 50 false diff -Nru ukui-biometric-manager-1.0.0/src/promptdialog.cpp ukui-biometric-manager-1.0.1~201904291421/src/promptdialog.cpp --- ukui-biometric-manager-1.0.0/src/promptdialog.cpp 2018-09-10 07:34:13.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/promptdialog.cpp 2019-04-24 02:59:53.000000000 +0000 @@ -23,6 +23,7 @@ #include #include #include +#include "servicemanager.h" PromptDialog::PromptDialog(QDBusInterface *service, int bioType, int deviceId, int uid, QWidget *parent) @@ -48,12 +49,21 @@ this->setStyleSheet(styleSheet); qssFile.close(); ui->treeViewResult->hide(); + ui->lblImage->setPixmap(getImage(type)); movie = new QMovie(getGif(type)); - ui->lblImage->setMovie(movie); connect(serviceInterface, SIGNAL(StatusChanged(int,int)), this, SLOT(onStatusChanged(int,int))); + + ServiceManager *sm = ServiceManager::instance(); + connect(sm, &ServiceManager::serviceStatusChanged, + this, [&](bool activate){ + if(!activate) + { + close(); + } + }); } PromptDialog::~PromptDialog() @@ -94,7 +104,10 @@ { if(event->key() == Qt::Key_Escape) { if(ui->btnClose->isEnabled()) + { + on_btnClose_clicked(); accept(); + } return; } } @@ -189,7 +202,6 @@ SLOT(errorCallBack(const QDBusError &))); ops = ENROLL; - movie->start(); return exec(); } @@ -205,6 +217,7 @@ case DBUS_RESULT_SUCCESS: { /* 录入成功 */ opsResult = SUCESS; setPrompt(tr("Enroll successfully")); + showClosePrompt(); break; } default: @@ -213,7 +226,6 @@ break; } ops = IDLE; - showClosePrompt(); } int PromptDialog::verify(int drvId, int uid, int idx) @@ -228,7 +240,7 @@ SLOT(errorCallBack(const QDBusError &))); ops = VERIFY; - movie->start(); +// movie->start(); return exec(); } @@ -241,14 +253,15 @@ if(result >= 0) { opsResult = SUCESS; setPrompt(tr("Verify successfully")); + showClosePrompt(); } else if(result == DBUS_RESULT_NOTMATCH) { setPrompt(tr("Not Match")); + showClosePrompt(); } else { handleErrorResult(result); } ops = IDLE; - showClosePrompt(); } int PromptDialog::search(int drvId, int uid, int idxStart, int idxEnd) @@ -264,7 +277,7 @@ ops = SEARCH; - movie->start(); +// movie->start(); return exec(); } @@ -310,6 +323,7 @@ void PromptDialog::errorCallBack(const QDBusError &error) { qDebug() << "DBus Error: " << error.message(); + accept(); } void PromptDialog::onStatusChanged(int drvId, int statusType) @@ -333,6 +347,16 @@ return; } } + else if(ops == IDLE) + { + return; + } + + if(movie->state() != QMovie::Running) + { + ui->lblImage->setMovie(movie); + movie->start(); + } QDBusMessage notifyReply = serviceInterface->call("GetNotifyMesg", drvId); if(notifyReply.type() == QDBusMessage::ErrorMessage) { @@ -350,33 +374,15 @@ switch(error) { case DBUS_RESULT_ERROR: { //操作失败,需要进一步获取失败原因 - QDBusPendingReply reply = - serviceInterface->call("UpdateStatus", deviceId); - reply.waitForFinished(); - if (reply.isError()) { - qDebug() << "DBUS:" << reply.error(); + QDBusMessage msg = serviceInterface->call("GetOpsMesg", deviceId); + if(msg.type() == QDBusMessage::ErrorMessage) + { + qDebug() << "UpdateStatus error: " << msg.errorMessage(); setPrompt(tr("D-Bus calling error")); return; } - int opsStatus = reply.argumentAt(OPS_STATUS_INDEX).value(); - opsStatus = opsStatus % 100; - qDebug() << "Ops Error: " << opsStatus; - switch(opsStatus) { - case OPS_FAILED: - setFailed(); - break; - case OPS_ERROR: - //设备底层发生了错误 - setPrompt(tr("Device encounters an error")); - break; - case OPS_CANCEL: - //用户取消了操作,直接返回 - return; - case OPS_TIMEOUT: - //超时 - setPrompt(tr("Operation timeout")); - break;; - } + setPrompt(msg.arguments().at(0).toString()); + qDebug() << "GetOpsMesg: deviceId--" << deviceId; break; } case DBUS_RESULT_DEVICEBUSY: @@ -392,6 +398,12 @@ setPrompt(tr("Permission denied")); break; } + + ui->lblPrompt->setStyleSheet("QLabel{color: red;}"); + ui->lblImage->setPixmap(getImage(type)); + qDebug() << QString("Error:(%1)%2") + .arg(QString::number(error)) + .arg(ui->lblPrompt->text()); } void PromptDialog::setFailed() diff -Nru ukui-biometric-manager-1.0.0/src/promptdialog.ui ukui-biometric-manager-1.0.1~201904291421/src/promptdialog.ui --- ukui-biometric-manager-1.0.0/src/promptdialog.ui 2018-09-07 09:27:07.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/promptdialog.ui 2019-04-24 02:59:53.000000000 +0000 @@ -240,7 +240,11 @@ - + + + QAbstractItemView::NoEditTriggers + + diff -Nru ukui-biometric-manager-1.0.0/src/servicemanager.cpp ukui-biometric-manager-1.0.1~201904291421/src/servicemanager.cpp --- ukui-biometric-manager-1.0.0/src/servicemanager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/servicemanager.cpp 2019-04-24 02:59:53.000000000 +0000 @@ -0,0 +1,96 @@ +#include "servicemanager.h" +#include +#include "customtype.h" +#include "messagedialog.h" + +ServiceManager *ServiceManager::instance_ = nullptr; + +ServiceManager::ServiceManager(QObject *parent) + : QObject(parent), + dbusService(nullptr), + bioService(nullptr) +{ + init(); +} + +void ServiceManager::init() +{ + if(!dbusService) + { + dbusService = new QDBusInterface(FD_DBUS_SERVICE, + FD_DBUS_PATH, + FD_DBUS_INTERFACE, + QDBusConnection::systemBus()); + connect(dbusService, SIGNAL(NameOwnerChanged(QString, QString, QString)), + this, SLOT(onDBusNameOwnerChanged(QString,QString,QString))); + } +} + +ServiceManager *ServiceManager::instance() +{ + if(!instance_) + { + instance_ = new ServiceManager; + } + return instance_; +} + +bool ServiceManager::connectToService() +{ + if(!bioService) + { + bioService = new QDBusInterface(DBUS_SERVICE, + DBUS_PATH, + DBUS_INTERFACE, + QDBusConnection::systemBus()); + } + return bioService->isValid(); +} + +void ServiceManager::onDBusNameOwnerChanged(const QString &name, + const QString &oldOwner, + const QString &newOwner) +{ + if(name == DBUS_SERVICE) + { + qDebug() << "service status changed:" + << (newOwner.isEmpty() ? "inactivate" : "activate"); + Q_EMIT serviceStatusChanged(!newOwner.isEmpty()); + } +} + +/*! + * \brief checkServiceExist + * 检查生物识别后台服务是否已启动 + */ +bool ServiceManager::serviceExists() +{ + QDBusReply reply = dbusService->call("NameHasOwner", DBUS_SERVICE); + if(!reply.isValid()) + { + qDebug() << "check service exists error:" << reply.error(); + return false; + } + return reply.value(); +} + +/*! + * \brief ServiceManager::apiCompatible + * 检查API版本和服务的版本是否兼容 + */ +bool ServiceManager::apiCompatible() +{ + if(!connectToService()) + return false; + + QDBusReply reply = bioService->call("CheckAppApiVersion", + APP_API_MAJOR, + APP_API_MINOR, + APP_API_FUNC); + if(!reply.isValid()) + { + qDebug() << "check api compatibility error: " << reply.error(); + return false; + } + return (reply.value() == 0); +} diff -Nru ukui-biometric-manager-1.0.0/src/servicemanager.h ukui-biometric-manager-1.0.1~201904291421/src/servicemanager.h --- ukui-biometric-manager-1.0.0/src/servicemanager.h 1970-01-01 00:00:00.000000000 +0000 +++ ukui-biometric-manager-1.0.1~201904291421/src/servicemanager.h 2019-04-24 02:59:53.000000000 +0000 @@ -0,0 +1,35 @@ +#ifndef SERVICEMANAGER_H +#define SERVICEMANAGER_H + +#include +#include + +class ServiceManager : public QObject +{ + Q_OBJECT +public: + static ServiceManager *instance(); + bool serviceExists(); + bool apiCompatible(); + +private: + explicit ServiceManager(QObject *parent = nullptr); + void init(); + bool connectToService(); + +signals: + void serviceStatusChanged(bool activate); + +public slots: + void onDBusNameOwnerChanged(const QString &name, + const QString &oldOwner, + const QString &newOwner); + +private: + static ServiceManager *instance_; + QDBusInterface *dbusService; + QDBusInterface *bioService; + bool serviceStatus; +}; + +#endif // SERVICEMANAGER_H