• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 OHOS_ABILITY_ACCESS_CTRL_COMMON_H
17 #define OHOS_ABILITY_ACCESS_CTRL_COMMON_H
18 
19 #include <cstdint>
20 #include <cstring>
21 
22 namespace OHOS {
23 namespace CJSystemapi {
24 
25 const std::string RESULT_ERROR_KEY = "ohos.user.setting.error_code";
26 const std::string EXTENSION_TYPE_KEY = "ability.want.params.uiExtensionType";
27 const std::string UI_EXTENSION_TYPE = "sys/commonUI";
28 
29 typedef enum {
30     CJ_OK = 0,
31     CJ_ERROR_PERMISSION_DENIED = 201,
32     CJ_ERROR_NOT_SYSTEM_APP = 202,
33     CJ_ERROR_PARAM_ILLEGAL = 401,
34     CJ_ERROR_SYSTEM_CAPABILITY_NOT_SUPPORT = 801,
35     CJ_ERROR_PARAM_INVALID = 12100001,
36     CJ_ERROR_TOKENID_NOT_EXIST,
37     CJ_ERROR_PERMISSION_NOT_EXIST,
38     CJ_ERROR_NOT_USE_TOGETHER,
39     CJ_ERROR_REGISTERS_EXCEED_LIMITATION,
40     CJ_ERROR_PERMISSION_OPERATION_NOT_ALLOWED,
41     CJ_ERROR_SERVICE_NOT_RUNNING,
42     CJ_ERROR_OUT_OF_MEMORY,
43     CJ_ERROR_INNER,
44     CJ_ERROR_REQUEST_IS_ALREADY_EXIST,
45     CJ_ERROR_ALL_PERM_GRANTED,
46     CJ_ERROR_PERM_REVOKE_BY_USER,
47     CJ_ERROR_GLOBAL_SWITCH_IS_ALREADY_OPEN,
48 } CjErrorCode;
49 }
50 }
51 #endif // OHOS_ABILITY_ACCESS_CTRL_COMMON_H