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/** 17 * @file 18 * @kit FormKit 19 */ 20 21/** 22 * interface of formError. 23 * 24 * @namespace formError 25 * @syscap SystemCapability.Ability.Form 26 * @since 8 27 */ 28declare namespace formError { 29 /** 30 * Error of form. 31 * 32 * @enum { number } 33 * @syscap SystemCapability.Ability.Form 34 * @since 8 35 */ 36 enum FormError { 37 /** 38 * A common internal error occurs during form processing. 39 * 40 * @syscap SystemCapability.Ability.Form 41 * @since 8 42 */ 43 ERR_COMMON = 1, 44 45 /** 46 * The application does not have permission to use forms. 47 * Ensure that the application is granted with the ohos.permission.REQUIRE_FORM 48 * and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED permissions. 49 * 50 * @syscap SystemCapability.Ability.Form 51 * @since 8 52 */ 53 ERR_PERMISSION_DENY = 2, 54 55 /** 56 * Failed to obtain the configuration information about the form specified by the 57 * request parameters. Ensure that the parameters of the form to be added are 58 * consistent with those provided by the form provider. 59 * 60 * @syscap SystemCapability.Ability.Form 61 * @since 8 62 */ 63 ERR_GET_INFO_FAILED = 4, 64 65 /** 66 * Failed to obtain the bundle to which the form belongs based on the request parameters. 67 * Ensure that the bundle to which the form to be added belongs is available. 68 * 69 * @syscap SystemCapability.Ability.Form 70 * @since 8 71 */ 72 ERR_GET_BUNDLE_FAILED = 5, 73 74 /** 75 * Failed to initialize the form layout based on the request parameters. 76 * Ensure that the grid style of the form is supported by the form provider. 77 * 78 * @syscap SystemCapability.Ability.Form 79 * @since 8 80 */ 81 ERR_GET_LAYOUT_FAILED = 6, 82 83 /** 84 * Invalid input parameter during form operation. Ensure that all input 85 * parameters are valid. 86 * 87 * @syscap SystemCapability.Ability.Form 88 * @since 8 89 */ 90 ERR_ADD_INVALID_PARAM = 7, 91 92 /** 93 * The form configuration to be obtained using an existing form ID is 94 * different from that obtained for the first time. 95 * 96 * @syscap SystemCapability.Ability.Form 97 * @since 8 98 */ 99 ERR_CFG_NOT_MATCH_ID = 8, 100 101 /** 102 * The ID of the form to be operated does not exist in the Form Manager Service. 103 * 104 * @syscap SystemCapability.Ability.Form 105 * @since 8 106 */ 107 ERR_NOT_EXIST_ID = 9, 108 109 /** 110 * Failed to bind the Form Manager Service to the provider service. 111 * 112 * @syscap SystemCapability.Ability.Form 113 * @since 8 114 */ 115 ERR_BIND_PROVIDER_FAILED = 10, 116 117 /** 118 * The total number of added forms exceeds the maximum allowed by the system. 119 * 120 * @syscap SystemCapability.Ability.Form 121 * @since 8 122 */ 123 ERR_MAX_SYSTEM_FORMS = 11, 124 125 /** 126 * The number of form instances generated using the same form configuration 127 * exceeds the maximum allowed by the system. 128 * 129 * @syscap SystemCapability.Ability.Form 130 * @since 8 131 */ 132 ERR_MAX_INSTANCES_PER_FORM = 12, 133 134 /** 135 * The form being requested was added by other applications and cannot be 136 * operated by the current application. 137 * 138 * @syscap SystemCapability.Ability.Form 139 * @since 8 140 */ 141 ERR_OPERATION_FORM_NOT_SELF = 13, 142 143 /** 144 * The Form Manager Service failed to instruct the form provider to delete the form. 145 * 146 * @syscap SystemCapability.Ability.Form 147 * @since 8 148 */ 149 ERR_PROVIDER_DEL_FAIL = 14, 150 151 /** 152 * The total number of added forms exceeds the maximum per client. 153 * 154 * @syscap SystemCapability.Ability.Form 155 * @since 8 156 */ 157 ERR_MAX_FORMS_PER_CLIENT = 15, 158 159 /** 160 * The total number of added temp forms exceeds the maximum in system. 161 * 162 * @syscap SystemCapability.Ability.Form 163 * @since 8 164 */ 165 ERR_MAX_SYSTEM_TEMP_FORMS = 16, 166 167 /** 168 * The module can not be find in system. 169 * 170 * @syscap SystemCapability.Ability.Form 171 * @since 8 172 */ 173 ERR_FORM_NO_SUCH_MODULE = 17, 174 175 /** 176 * The ability can not be find in system. 177 * 178 * @syscap SystemCapability.Ability.Form 179 * @since 8 180 */ 181 ERR_FORM_NO_SUCH_ABILITY = 18, 182 183 /** 184 * The dimension is not exist in the form. 185 * 186 * @syscap SystemCapability.Ability.Form 187 * @since 8 188 */ 189 ERR_FORM_NO_SUCH_DIMENSION = 19, 190 191 /** 192 * The ability is not installed. 193 * 194 * @syscap SystemCapability.Ability.Form 195 * @since 8 196 */ 197 ERR_FORM_FA_NOT_INSTALLED = 20, 198 199 /** 200 * Failed to obtain the RPC object of the Form Manager Service because 201 * the service is not started.Please try again after the service is started. 202 * 203 * @syscap SystemCapability.Ability.Form 204 * @since 8 205 */ 206 ERR_SYSTEM_RESPONSES_FAILED = 30, 207 208 /** 209 * Failed to obtain the form requested by the client because another form 210 * with the same form ID is in use. Forms in use cannot have the same ID. 211 * To obtain and display a form that has the same configuration as an in-use 212 * form in the same application, you are advised to set the form ID to 0 in 213 * the request parameters. 214 * 215 * @syscap SystemCapability.Ability.Form 216 * @since 8 217 */ 218 ERR_FORM_DUPLICATE_ADDED = 31, 219 220 /** 221 * The form is being restored. Perform operations on the form only after 222 * the restoration is complete. 223 * 224 * @syscap SystemCapability.Ability.Form 225 * @since 8 226 */ 227 ERR_IN_RECOVERY = 36, 228 229 /** 230 * Distributed scheduling failed 231 * 232 * @syscap SystemCapability.Ability.Form 233 * @systemapi 234 * @since 9 235 */ 236 ERR_DISTRIBUTED_SCHEDULE_FAILED = 37 237 } 238} 239export default formError; 240