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