1 /*
2  * Copyright (c) 2022 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 FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_BUNDLE_ERRORS_H
17 #define FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_BUNDLE_ERRORS_H
18 
19 #include "errors.h"
20 
21 namespace OHOS {
22 namespace AppExecFwk {
23 constexpr ErrCode SUCCESS = 0;
24 constexpr ErrCode ERROR_PERMISSION_DENIED_ERROR = 201;
25 constexpr ErrCode ERROR_NOT_SYSTEM_APP = 202;
26 constexpr ErrCode ERROR_PARAM_CHECK_ERROR = 401;
27 constexpr ErrCode ERROR_SYSTEM_ABILITY_NOT_FOUND = 801;
28 constexpr ErrCode ERROR_BUNDLE_NOT_EXIST = 17700001;
29 constexpr ErrCode ERROR_MODULE_NOT_EXIST = 17700002;
30 constexpr ErrCode ERROR_ABILITY_NOT_EXIST = 17700003;
31 constexpr ErrCode ERROR_INVALID_USER_ID = 17700004;
32 constexpr ErrCode ERROR_INVALID_APPID = 17700005;
33 constexpr ErrCode ERROR_PERMISSION_NOT_EXIST = 17700006;
34 constexpr ErrCode ERROR_DEVICE_ID_NOT_EXIST = 17700007;
35 constexpr ErrCode ERROR_INSTALL_PARSE_FAILED = 17700010;
36 constexpr ErrCode ERROR_INSTALL_VERIFY_SIGNATURE_FAILED = 17700011;
37 constexpr ErrCode ERROR_INSTALL_HAP_FILEPATH_INVALID = 17700012;
38 constexpr ErrCode ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT = 17700015;
39 constexpr ErrCode ERROR_INSTALL_NO_DISK_SPACE_LEFT = 17700016;
40 constexpr ErrCode ERROR_INSTALL_VERSION_DOWNGRADE = 17700017;
41 constexpr ErrCode ERROR_INSTALL_DEPENDENT_MODULE_NOT_EXIST = 17700018;
42 constexpr ErrCode ERROR_UNINSTALL_PREINSTALL_APP_FAILED = 17700020;
43 constexpr ErrCode ERROR_INVALID_UID = 17700021;
44 constexpr ErrCode ERROR_INVALID_HAP_PATH = 17700022;
45 constexpr ErrCode ERROR_DEFAULT_APP_NOT_EXIST = 17700023;
46 constexpr ErrCode ERROR_PROFILE_NOT_EXIST = 17700024;
47 constexpr ErrCode ERROR_INVALID_TYPE = 17700025;
48 constexpr ErrCode ERROR_BUNDLE_IS_DISABLED = 17700026;
49 constexpr ErrCode ERROR_DISTRIBUTED_SERVICE_NOT_RUNNING = 17700027;
50 constexpr ErrCode ERROR_ABILITY_AND_TYPE_MISMATCH = 17700028;
51 constexpr ErrCode ERROR_ABILITY_IS_DISABLED = 17700029;
52 constexpr ErrCode ERROR_CLEAR_CACHE_FILES_UNSUPPORTED = 17700030;
53 constexpr ErrCode ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED = 17700031;
54 constexpr ErrCode ERROR_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE = 17700032;
55 constexpr ErrCode ERROR_SPECIFIED_MODULE_NOT_OVERLAY_MODULE = 17700033;
56 constexpr ErrCode ERROR_SPECIFIED_MODULE_IS_OVERLAY_MODULE = 17700034;
57 constexpr ErrCode ERROR_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE = 17700035;
58 constexpr ErrCode ERROR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED = 17700036;
59 constexpr ErrCode ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED = 17700037;
60 constexpr ErrCode ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST = 17700038;
61 constexpr ErrCode ERROR_INSTALL_FILE_IS_SHARED_LIBRARY = 17700039;
62 constexpr ErrCode ERROR_UNINSTALL_BUNDLE_IS_SHARED_BUNDLE = 17700040;
63 constexpr ErrCode ERROR_DISALLOW_INSTALL = 17700041;
64 constexpr ErrCode ERROR_INSTALL_WRONG_DATA_PROXY_URI = 17700042;
65 constexpr ErrCode ERROR_INSTALL_WRONG_DATA_PROXY_PERMISSION = 17700043;
66 constexpr ErrCode ERROR_INSTALL_WRONG_MODE_ISOLATION = 17700044;
67 constexpr ErrCode ERROR_DISALLOW_UNINSTALL = 17700045;
68 constexpr ErrCode ERROR_INSTALL_ALREADY_EXIST = 17700047;
69 constexpr ErrCode ERROR_INSTALL_CODE_SIGNATURE_FAILED = 17700048;
70 constexpr ErrCode ERROR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME = 17700049;
71 constexpr ErrCode ERROR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED = 17700050;
72 constexpr ErrCode ERROR_INSTALL_SELF_UPDATE_NOT_MDM = 17700051;
73 constexpr ErrCode ERROR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED = 17700052;
74 constexpr ErrCode ERROR_NOT_APP_GALLERY_CALL = 17700053;
75 constexpr ErrCode ERROR_INSTALL_PERMISSION_CHECK_ERROR = 17700054;
76 constexpr ErrCode ERROR_INVALID_LINK = 17700055;
77 constexpr ErrCode ERROR_SCHEME_NOT_IN_QUERYSCHEMES = 17700056;
78 constexpr ErrCode ERROR_BUNDLE_NOT_PREINSTALLED = 17700057;
79 constexpr ErrCode ERROR_INSTALL_FAILED_CONTROLLED = 17700058;
80 constexpr ErrCode ERROR_INVALID_DEVELOPERID = 17700059;
81 constexpr ErrCode ERROR_BUNDLE_CAN_NOT_BE_UNINSTALLED = 17700060;
82 constexpr ErrCode ERROR_INVALID_APPINDEX = 17700061;
83 constexpr ErrCode ERROR_START_SHORTCUT_ERROR = 17700065;
84 
85 // native bundle
86 constexpr ErrCode ERROR_INSTALL_NATIVE_FAILED = 17700066;
87 constexpr ErrCode ERROR_UNINSTALL_NATIVE_FAILED = 17700067;
88 
89 constexpr ErrCode ERROR_APP_NOT_SUPPORTED_MULTI_TYPE = 17700069;
90 
91 constexpr ErrCode ERROR_SHORTCUT_ID_ILLEGAL_ERROR = 17700070;
92 constexpr ErrCode ERROR_INSTALL_EXISTED_ENTERPRISE_NOT_ALLOWED_ERROR = 17700071;
93 constexpr ErrCode ERROR_GET_LAUNCH_WANT_INVALID = 17700072;
94 constexpr ErrCode ERROR_INSTALL_FAILED_INCONSISTENT_SIGNATURE = 17700073;
95 
96 // bundle service exception
97 constexpr ErrCode ERROR_BUNDLE_SERVICE_EXCEPTION = 17700101;
98 
99 // verify abc
100 constexpr ErrCode ERROR_VERIFY_ABC = 17700201;
101 constexpr ErrCode ERROR_DELETE_ABC = 17700202;
102 
103 // extend resource
104 constexpr ErrCode ERROR_ADD_EXTEND_RESOURCE = 17700301;
105 constexpr ErrCode ERROR_REMOVE_EXTEND_RESOURCE = 17700302;
106 constexpr ErrCode ERROR_GET_EXTEND_RESOURCE = 17700303;
107 constexpr ErrCode ERROR_ENABLE_DYNAMIC_ICON = 17700304;
108 constexpr ErrCode ERROR_DISABLE_DYNAMIC_ICON = 17700305;
109 constexpr ErrCode ERROR_GET_DYNAMIC_ICON = 17700306;
110 
111 // zlib errCode
112 constexpr ErrCode ERR_ZLIB_SRC_FILE_INVALID = 900001;
113 constexpr ErrCode ERR_ZLIB_DEST_FILE_INVALID = 900002;
114 constexpr ErrCode ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED = 900003;
115 } // AppExecFwk
116 } // OHOS
117 #endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_BUNDLE_ERRORS_H
118 
119