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