161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit FormKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ci/**
2261847f8eSopenharmony_ci * interface of formError.
2361847f8eSopenharmony_ci *
2461847f8eSopenharmony_ci * @namespace formError
2561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.Form
2661847f8eSopenharmony_ci * @since 8
2761847f8eSopenharmony_ci */
2861847f8eSopenharmony_cideclare namespace formError {
2961847f8eSopenharmony_ci  /**
3061847f8eSopenharmony_ci   * Error of form.
3161847f8eSopenharmony_ci   *
3261847f8eSopenharmony_ci   * @enum { number }
3361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.Form
3461847f8eSopenharmony_ci   * @since 8
3561847f8eSopenharmony_ci   */
3661847f8eSopenharmony_ci  enum FormError {
3761847f8eSopenharmony_ci    /**
3861847f8eSopenharmony_ci     * A common internal error occurs during form processing.
3961847f8eSopenharmony_ci     *
4061847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
4161847f8eSopenharmony_ci     * @since 8
4261847f8eSopenharmony_ci     */
4361847f8eSopenharmony_ci    ERR_COMMON = 1,
4461847f8eSopenharmony_ci
4561847f8eSopenharmony_ci    /**
4661847f8eSopenharmony_ci     * The application does not have permission to use forms.
4761847f8eSopenharmony_ci     * Ensure that the application is granted with the ohos.permission.REQUIRE_FORM
4861847f8eSopenharmony_ci     * and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED permissions.
4961847f8eSopenharmony_ci     *
5061847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
5161847f8eSopenharmony_ci     * @since 8
5261847f8eSopenharmony_ci     */
5361847f8eSopenharmony_ci    ERR_PERMISSION_DENY = 2,
5461847f8eSopenharmony_ci
5561847f8eSopenharmony_ci    /**
5661847f8eSopenharmony_ci     * Failed to obtain the configuration information about the form specified by the
5761847f8eSopenharmony_ci     * request parameters. Ensure that the parameters of the form to be added are
5861847f8eSopenharmony_ci     * consistent with those provided by the form provider.
5961847f8eSopenharmony_ci     *
6061847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
6161847f8eSopenharmony_ci     * @since 8
6261847f8eSopenharmony_ci     */
6361847f8eSopenharmony_ci    ERR_GET_INFO_FAILED = 4,
6461847f8eSopenharmony_ci
6561847f8eSopenharmony_ci    /**
6661847f8eSopenharmony_ci     * Failed to obtain the bundle to which the form belongs based on the request parameters.
6761847f8eSopenharmony_ci     * Ensure that the bundle to which the form to be added belongs is available.
6861847f8eSopenharmony_ci     *
6961847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
7061847f8eSopenharmony_ci     * @since 8
7161847f8eSopenharmony_ci     */
7261847f8eSopenharmony_ci    ERR_GET_BUNDLE_FAILED = 5,
7361847f8eSopenharmony_ci
7461847f8eSopenharmony_ci    /**
7561847f8eSopenharmony_ci     * Failed to initialize the form layout based on the request parameters.
7661847f8eSopenharmony_ci     * Ensure that the grid style of the form is supported by the form provider.
7761847f8eSopenharmony_ci     *
7861847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
7961847f8eSopenharmony_ci     * @since 8
8061847f8eSopenharmony_ci     */
8161847f8eSopenharmony_ci    ERR_GET_LAYOUT_FAILED = 6,
8261847f8eSopenharmony_ci
8361847f8eSopenharmony_ci    /**
8461847f8eSopenharmony_ci     * Invalid input parameter during form operation. Ensure that all input
8561847f8eSopenharmony_ci     * parameters are valid.
8661847f8eSopenharmony_ci     *
8761847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
8861847f8eSopenharmony_ci     * @since 8
8961847f8eSopenharmony_ci     */
9061847f8eSopenharmony_ci    ERR_ADD_INVALID_PARAM = 7,
9161847f8eSopenharmony_ci
9261847f8eSopenharmony_ci    /**
9361847f8eSopenharmony_ci     * The form configuration to be obtained using an existing form ID is
9461847f8eSopenharmony_ci     * different from that obtained for the first time.
9561847f8eSopenharmony_ci     *
9661847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
9761847f8eSopenharmony_ci     * @since 8
9861847f8eSopenharmony_ci     */
9961847f8eSopenharmony_ci    ERR_CFG_NOT_MATCH_ID = 8,
10061847f8eSopenharmony_ci
10161847f8eSopenharmony_ci    /**
10261847f8eSopenharmony_ci     * The ID of the form to be operated does not exist in the Form Manager Service.
10361847f8eSopenharmony_ci     *
10461847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
10561847f8eSopenharmony_ci     * @since 8
10661847f8eSopenharmony_ci     */
10761847f8eSopenharmony_ci    ERR_NOT_EXIST_ID = 9,
10861847f8eSopenharmony_ci
10961847f8eSopenharmony_ci    /**
11061847f8eSopenharmony_ci     * Failed to bind the Form Manager Service to the provider service.
11161847f8eSopenharmony_ci     *
11261847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
11361847f8eSopenharmony_ci     * @since 8
11461847f8eSopenharmony_ci     */
11561847f8eSopenharmony_ci    ERR_BIND_PROVIDER_FAILED = 10,
11661847f8eSopenharmony_ci
11761847f8eSopenharmony_ci    /**
11861847f8eSopenharmony_ci     * The total number of added forms exceeds the maximum allowed by the system.
11961847f8eSopenharmony_ci     *
12061847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
12161847f8eSopenharmony_ci     * @since 8
12261847f8eSopenharmony_ci     */
12361847f8eSopenharmony_ci    ERR_MAX_SYSTEM_FORMS = 11,
12461847f8eSopenharmony_ci
12561847f8eSopenharmony_ci    /**
12661847f8eSopenharmony_ci     * The number of form instances generated using the same form configuration
12761847f8eSopenharmony_ci     * exceeds the maximum allowed by the system.
12861847f8eSopenharmony_ci     *
12961847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
13061847f8eSopenharmony_ci     * @since 8
13161847f8eSopenharmony_ci     */
13261847f8eSopenharmony_ci    ERR_MAX_INSTANCES_PER_FORM = 12,
13361847f8eSopenharmony_ci
13461847f8eSopenharmony_ci    /**
13561847f8eSopenharmony_ci     * The form being requested was added by other applications and cannot be
13661847f8eSopenharmony_ci     * operated by the current application.
13761847f8eSopenharmony_ci     *
13861847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
13961847f8eSopenharmony_ci     * @since 8
14061847f8eSopenharmony_ci     */
14161847f8eSopenharmony_ci    ERR_OPERATION_FORM_NOT_SELF = 13,
14261847f8eSopenharmony_ci
14361847f8eSopenharmony_ci    /**
14461847f8eSopenharmony_ci     * The Form Manager Service failed to instruct the form provider to delete the form.
14561847f8eSopenharmony_ci     *
14661847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
14761847f8eSopenharmony_ci     * @since 8
14861847f8eSopenharmony_ci     */
14961847f8eSopenharmony_ci    ERR_PROVIDER_DEL_FAIL = 14,
15061847f8eSopenharmony_ci
15161847f8eSopenharmony_ci    /**
15261847f8eSopenharmony_ci     * The total number of added forms exceeds the maximum per client.
15361847f8eSopenharmony_ci     *
15461847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
15561847f8eSopenharmony_ci     * @since 8
15661847f8eSopenharmony_ci     */
15761847f8eSopenharmony_ci    ERR_MAX_FORMS_PER_CLIENT = 15,
15861847f8eSopenharmony_ci
15961847f8eSopenharmony_ci    /**
16061847f8eSopenharmony_ci     * The total number of added temp forms exceeds the maximum in system.
16161847f8eSopenharmony_ci     *
16261847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
16361847f8eSopenharmony_ci     * @since 8
16461847f8eSopenharmony_ci     */
16561847f8eSopenharmony_ci    ERR_MAX_SYSTEM_TEMP_FORMS = 16,
16661847f8eSopenharmony_ci
16761847f8eSopenharmony_ci    /**
16861847f8eSopenharmony_ci     * The module can not be find in system.
16961847f8eSopenharmony_ci     *
17061847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
17161847f8eSopenharmony_ci     * @since 8
17261847f8eSopenharmony_ci     */
17361847f8eSopenharmony_ci    ERR_FORM_NO_SUCH_MODULE = 17,
17461847f8eSopenharmony_ci
17561847f8eSopenharmony_ci    /**
17661847f8eSopenharmony_ci     * The ability can not be find in system.
17761847f8eSopenharmony_ci     *
17861847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
17961847f8eSopenharmony_ci     * @since 8
18061847f8eSopenharmony_ci     */
18161847f8eSopenharmony_ci    ERR_FORM_NO_SUCH_ABILITY = 18,
18261847f8eSopenharmony_ci
18361847f8eSopenharmony_ci    /**
18461847f8eSopenharmony_ci     * The dimension is not exist in the form.
18561847f8eSopenharmony_ci     *
18661847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
18761847f8eSopenharmony_ci     * @since 8
18861847f8eSopenharmony_ci     */
18961847f8eSopenharmony_ci    ERR_FORM_NO_SUCH_DIMENSION = 19,
19061847f8eSopenharmony_ci
19161847f8eSopenharmony_ci    /**
19261847f8eSopenharmony_ci     * The ability is not installed.
19361847f8eSopenharmony_ci     *
19461847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
19561847f8eSopenharmony_ci     * @since 8
19661847f8eSopenharmony_ci     */
19761847f8eSopenharmony_ci    ERR_FORM_FA_NOT_INSTALLED = 20,
19861847f8eSopenharmony_ci
19961847f8eSopenharmony_ci    /**
20061847f8eSopenharmony_ci     * Failed to obtain the RPC object of the Form Manager Service because
20161847f8eSopenharmony_ci     * the service is not started.Please try again after the service is started.
20261847f8eSopenharmony_ci     *
20361847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
20461847f8eSopenharmony_ci     * @since 8
20561847f8eSopenharmony_ci     */
20661847f8eSopenharmony_ci    ERR_SYSTEM_RESPONSES_FAILED = 30,
20761847f8eSopenharmony_ci
20861847f8eSopenharmony_ci    /**
20961847f8eSopenharmony_ci     * Failed to obtain the form requested by the client because another form
21061847f8eSopenharmony_ci     * with the same form ID is in use. Forms in use cannot have the same ID.
21161847f8eSopenharmony_ci     * To obtain and display a form that has the same configuration as an in-use
21261847f8eSopenharmony_ci     * form in the same application, you are advised to set the form ID to 0 in
21361847f8eSopenharmony_ci     * the request parameters.
21461847f8eSopenharmony_ci     *
21561847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
21661847f8eSopenharmony_ci     * @since 8
21761847f8eSopenharmony_ci     */
21861847f8eSopenharmony_ci    ERR_FORM_DUPLICATE_ADDED = 31,
21961847f8eSopenharmony_ci
22061847f8eSopenharmony_ci    /**
22161847f8eSopenharmony_ci     * The form is being restored. Perform operations on the form only after
22261847f8eSopenharmony_ci     * the restoration is complete.
22361847f8eSopenharmony_ci     *
22461847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
22561847f8eSopenharmony_ci     * @since 8
22661847f8eSopenharmony_ci     */
22761847f8eSopenharmony_ci    ERR_IN_RECOVERY = 36,
22861847f8eSopenharmony_ci
22961847f8eSopenharmony_ci    /**
23061847f8eSopenharmony_ci     * Distributed scheduling failed
23161847f8eSopenharmony_ci     *
23261847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.Form
23361847f8eSopenharmony_ci     * @systemapi
23461847f8eSopenharmony_ci     * @since 9
23561847f8eSopenharmony_ci     */
23661847f8eSopenharmony_ci    ERR_DISTRIBUTED_SCHEDULE_FAILED = 37
23761847f8eSopenharmony_ci  }
23861847f8eSopenharmony_ci}
23961847f8eSopenharmony_ciexport default formError;
240