From fe3d6936abb005d270e10b31d8bf46fbb8f1322d Mon Sep 17 00:00:00 2001 From: h00586870 Date: Tue, 11 Mar 2025 20:55:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=B8=8B=E8=BD=BD=206.0=20-?= =?UTF-8?q?=20=E6=94=AF=E6=8C=81=E4=BB=BB=E5=8A=A1=E6=9C=80=E4=BD=8E?= =?UTF-8?q?=E9=99=90=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: h00586870 --- api/@ohos.request.d.ts | 49 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 765fb4a1ef..c8c6a7accf 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -2807,6 +2807,38 @@ declare namespace request { text?: string; } + /** + * Options of the minimum speed of the task. + * + * @typedef MinSpeed + * @syscap SystemCapability.Request.FileTransferAgent + * @since 20 + */ + interface MinSpeed { + /** + * The minimum speed of the task, in bytes per second. + * If the speed of the task is lower than this value for a period of time, the task fails. + * If the value is set to 0, no minimum speed limit will be activated. + * If not specified, this value is set to 0. + * + * @type { ?number } + * @syscap SystemCapability.Request.FileTransferAgent + * @since 20 + */ + speed?: number; + /** + * Duration of the speed which is allowed to be below the minimum speed, in seconds. + * If the speed of the task is lower than this value for a period of time, the task fails. + * If the value is set to 0, no minimum speed limit will be activated. + * If not specified, this value is set to 0. + * + * @type { ?number } + * @syscap SystemCapability.Request.FileTransferAgent + * @since 20 + */ + duration?: number; + } + /** * The configurations for a task. * Using a flexible configuration for clear upload and download functions. @@ -3370,6 +3402,14 @@ declare namespace request { * @since 15 */ notification?: Notification; + /** + * Customizes the minimum speed of the task. + * + * @type { ?MinSpeed } + * @syscap SystemCapability.Request.FileTransferAgent + * @since 20 + */ + minSpeed?: MinSpeed; } /** @@ -3799,7 +3839,14 @@ declare namespace request { * @atomicservice * @since 12 */ - REDIRECT = 0x80 + REDIRECT = 0x80, + /** + * Indicates the speed of the task is too slow. + * + * @syscap SystemCapability.Request.FileTransferAgent + * @since 20 + */ + LOW_SPEED = 0x90 } /** -- Gitee