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