!9332 增加设置卡片加桌结果接口

Merge pull request !9332 from 孙海洋/5.0_publishResult
This commit is contained in:
openharmony_ci 2024-04-30 14:26:38 +00:00 committed by Gitee
commit ac3f570f05
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 104 additions and 0 deletions

View File

@ -1021,6 +1021,26 @@ declare namespace formHost {
*/
function clearRouterProxy(formIds: Array<string>): Promise<void>;
/**
* Set result of publish form.
*
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId - Indicates the form id.
* @param { formInfo.PublishFormResult } result - The result of publish form.
* @throws { BusinessError } 201 - Permissions denied.
* @throws { BusinessError } 202 - caller is not system app.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
* @throws { BusinessError } 16500060 - A service connection error happened, please try again later.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 12
*/
function setPublishFormResult(formId: string, result: formInfo.PublishFormResult): void;
/**
* Set permanent dynamic ArkTS forms recyclable, they will be recycled when memory is low.
*

View File

@ -1324,6 +1324,90 @@ declare namespace formInfo {
FORM_SHARE
}
/**
* The result of publish form.
*
* @typedef PublishFormResult
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 12
*/
interface PublishFormResult {
/**
* The error code.
*
* @type { PublishFormErrorCode }
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 12
*/
code: PublishFormErrorCode;
/**
* The message.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 12
*/
message: string;
}
/**
* The error code of publish form.
*
* @enum { number }
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 12
*/
enum PublishFormErrorCode {
/**
* Publish form success.
*
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 12
*/
SUCCESS,
/**
* Host has no space to publish form.
*
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 12
*/
NO_SPACE,
/**
* Check param failed.
*
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 12
*/
PARAM_ERROR,
/**
* Internal error occurs during form processing.
*
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 12
*/
INTERNAL_ERROR,
}
/**
* Information about a running form.
*