1 /*
2  * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FINGERPRINT_AUTH_DEFINES_H
17 #define FINGERPRINT_AUTH_DEFINES_H
18 
19 #include <cstdint>
20 
21 namespace OHOS {
22 namespace UserIam {
23 namespace FingerprintAuth {
24 enum ResultCode {
25     /**
26      * Indicates that authentication is success or ability is supported.
27      */
28     SUCCESS = 0,
29     /**
30      * Indicates the authenticator fails to identify user.
31      */
32     FAIL = 1,
33     /**
34      * Indicates other errors.
35      */
36     GENERAL_ERROR = 2,
37     /**
38      * Indicates that authentication has been canceled.
39      */
40     CANCELED = 3,
41     /**
42      * Indicates that authentication has timed out.
43      */
44     TIMEOUT = 4,
45     /**
46      * Indicates that this authentication type is not supported.
47      */
48     TYPE_NOT_SUPPORT = 5,
49     /**
50      * Indicates that the authentication trust level is not supported.
51      */
52     TRUST_LEVEL_NOT_SUPPORT = 6,
53     /**
54      * Indicates that the authentication task is busy. Wait for a few seconds and try again.
55      */
56     BUSY = 7,
57     /**
58      * Indicates incorrect parameters.
59      */
60     INVALID_PARAMETERS = 8,
61     /**
62      * Indicates that the authenticator is locked.
63      */
64     LOCKED = 9,
65     /**
66      * Indicates that the user has not enrolled the authenticator.
67      */
68     NOT_ENROLLED = 10,
69     /**
70      * Indicates that the operation is not supported.
71      */
72     OPERATION_NOT_SUPPORT = 11,
73     /**
74      * Vendor may add result code after this.
75      */
76     VENDOR_RESULT_CODE_BEGIN = 10000
77 };
78 } // namespace FingerprintAuth
79 } // namespace UserIam
80 } // namespace OHOS
81 #endif // FINGERPRINT_AUTH_DEFINES_H
82