1 /*
2  * Copyright (C) 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 APP_DOMAIN_INNER_VERIFY_STATUS_H
17 #define APP_DOMAIN_INNER_VERIFY_STATUS_H
18 namespace OHOS {
19 namespace AppDomainVerify {
20 enum InnerVerifyStatus {
21     /**
22      * Default value.
23      */
24     UNKNOWN = 0,
25 
26     STATE_SUCCESS = 1,
27 
28     STATE_FAIL = 2,
29 
30     FAILURE_REDIRECT = 3,
31 
32     FAILURE_CLIENT_ERROR = 4,
33 
34     FAILURE_REJECTED_BY_SERVER = 5,
35 
36     FAILURE_HTTP_UNKNOWN = 6,
37 
38     FAILURE_TIMEOUT = 7,
39 
40     FAILURE_CONFIG = 8,
41 
42     FORBIDDEN_FOREVER = 9
43 };
44 
45 static std::unordered_map<InnerVerifyStatus, std::string> InnerVerifyStatusMap = {
46     { UNKNOWN, "unknown" },
47     { STATE_SUCCESS, "success" },
48     { STATE_FAIL, "fail" },
49     { FAILURE_REDIRECT, "redirect" },
50     { FAILURE_CLIENT_ERROR, "client_error" },
51     { FAILURE_REJECTED_BY_SERVER, "redirect_by_server" },
52     { FAILURE_HTTP_UNKNOWN, "http_unknown" },
53     { FAILURE_TIMEOUT, "timeout" },
54     { FAILURE_CONFIG, "config_error" },
55     { FORBIDDEN_FOREVER, "forbidden_forever" }
56 };
57 }
58 }  // namespace OHOS
59 
60 #endif  // APP_DOMAIN_VERIFY_STATUS_H