From 16ed850badbd3398c93c39034b012e793041a81d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Tue, 8 Mar 2022 10:45:04 +0000 Subject: [PATCH 01/15] update api/@ohos.wallpaper.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.wallpaper.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.wallpaper.d.ts b/api/@ohos.wallpaper.d.ts index 9b1776d5c4..8f9f85ac8b 100644 --- a/api/@ohos.wallpaper.d.ts +++ b/api/@ohos.wallpaper.d.ts @@ -16,8 +16,8 @@ import {AsyncCallback} from './basic'; import image from './@ohos.multimedia.image' /** - * System wallpaper - * @syscap SystemCapability.Miscservices.WallpaperFramework + * ystem wallpaper + * @syscap SystemCapability.Miscservices.Wallpaper * @devices phone, tablet, tv, wearable, car * @import import wallpaper from '@ohos.wallpaper'; * @since 7 -- Gitee From d9eab3cd14e5985b4a2ff55248f9b193ccfaa523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Tue, 8 Mar 2022 10:47:08 +0000 Subject: [PATCH 02/15] update api/@ohos.pasteboard.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.pasteboard.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/@ohos.pasteboard.d.ts b/api/@ohos.pasteboard.d.ts index fd64ab9ab8..e1e14bcded 100644 --- a/api/@ohos.pasteboard.d.ts +++ b/api/@ohos.pasteboard.d.ts @@ -18,6 +18,7 @@ import { Want } from './ability/want'; /** * systemPasteboard * @syscap SystemCapability.Miscservices.Pasteboard + * @devices phone, tablet, tv, wearable, car * @import import pasteboard from '@ohos.pasteboard'; */ declare namespace pasteboard { -- Gitee From 0dee50cb663bea01fd7a7097596c18c7828cbe6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Tue, 8 Mar 2022 11:25:39 +0000 Subject: [PATCH 03/15] add api/@ohos.screenlock.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.screenlock.d.ts | 102 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 api/@ohos.screenlock.d.ts diff --git a/api/@ohos.screenlock.d.ts b/api/@ohos.screenlock.d.ts new file mode 100644 index 0000000000..2e041eec7a --- /dev/null +++ b/api/@ohos.screenlock.d.ts @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { AsyncCallback } from './basic'; +import { Callback } from './basic'; + +/** + * systemScreenLock + * @syscap SystemCapability.Miscservices.ScreenLock + * @devices phone, tablet, tv, wearable, car + * @since 7 + */ +declare namespace screenLock { + + /** + * Checks whether the screen is currently locked. + * + * @return Returns {@code true} if the screen is currently locked; returns {@code false} + * otherwise. + * @since 7 + */ + function isScreenLocked(callback: AsyncCallback): void; + function isScreenLocked(): Promise; + + /** + * Checks whether the screen lock of the current device is secure. + * + * @return Returns {@code true} if the screen lock of the current device is secure; returns {@code false} + * otherwise. + * @since 7 + */ + function isSecureMode(callback: AsyncCallback): void; + function isSecureMode(): Promise; + + /** + * Unlocks the screen. + * + * @since 7 + */ + function unlockScreen(callback: AsyncCallback): void; + function unlockScreen():Promise; + + /** + * Receives {beginWakeUp|endWakeUp|beginScreenOn|endScreenOn|beginScreenOff|endScreenOff|unlockScreen|beginExitAnimation} called. + * This callback is invoked when {beginWakeUp|endWakeUp|beginScreenOn|endScreenOn|beginScreenOff|endScreenOff|unlockScreen|beginExitAnimation} + * is called by runtime + * + * @systemapi Hide this for inner system use. + * @since 9 + */ + function on(type: 'beginWakeUp' | 'endWakeUp' | 'beginScreenOn' | 'endScreenOn' | 'beginScreenOff' | 'endScreenOff' | 'unlockScreen' | 'beginExitAnimation', callback: Callback): void; + + /** + * Receives {beginSleep | endSleep | changeUser} called. This callback is invoked when {beginSleep | endSleep | changeUser} is called by runtime + * + * @systemapi Hide this for inner system use. + * @since 9 + */ + function on(type: 'beginSleep' | 'endSleep' | 'changeUser', callback: Callback): void; + + /** + * Receives screenlockEnabled change. This callback is invoked when screenlockEnabled is called by runtime + * + * @systemapi Hide this for inner system use. + * @since 9 + */ + function on(type: 'screenlockEnabled', callback: Callback): void; + + /** + * Remove the receives of {beginWakeUp | endWakeUp | beginScreenOn | endScreenOn | beginScreenOff | endScreenOff | unlockScreen + * | beginExitAnimation | screenlockEnabled | beginSleep | endSleep | changeUser}. + * + * @systemapi Hide this for inner system use. + * @since 9 + */ + function off(type: 'beginWakeUp' | 'endWakeUp' | 'beginScreenOn' | 'endScreenOn' | 'beginScreenOff' | 'endScreenOff' + | 'unlockScreen' | 'beginExitAnimation' | 'screenlockEnabled' | 'beginSleep' | 'endSleep' | 'changeUser', callback: Callback): void; + + + /** + * screenlockAPP send event to screenlockSA + * + * @systemapi Hide this for inner system use. + * @since 9 + */ + function sendScreenLockEvent(event: String, parameter: number, callback: AsyncCallback): void; + function sendScreenLockEvent(event: String, parameter: number): Promise; + +} + +export default screenLock; \ No newline at end of file -- Gitee From fb050b3aa591ac52a955aa88a3c41a6a102e7441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Tue, 8 Mar 2022 11:27:51 +0000 Subject: [PATCH 04/15] add api/@ohos.request.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.request.d.ts | 595 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 595 insertions(+) create mode 100644 api/@ohos.request.d.ts diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts new file mode 100644 index 0000000000..f34286ff38 --- /dev/null +++ b/api/@ohos.request.d.ts @@ -0,0 +1,595 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { AsyncCallback } from './basic'; + +/** + * upload and download + * + * @since 7 + * @import request from '@ohos.request'; + * @syscap SystemCapability.Miscservices.Upload + * @syscap SystemCapability.Miscservices.Download + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ +declare namespace request { + + /** + * Bit flag indicating download is allowed when using the cellular network. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const NETWORK_MOBILE: number; + + /** + * Bit flag indicating download is allowed when using the WLAN. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const NETWORK_WIFI: number; + + /** + * Indicates that the download cannot be resumed for some temporary errors. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const ERROR_CANNOT_RESUME: number; + + /** + * Indicates that no storage device, such as an SD card, is found. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const ERROR_DEVICE_NOT_FOUND: number; + + /** + * Indicates that files to be downloaded already exist, and that the download session cannot overwrite the existing files. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const ERROR_FILE_ALREADY_EXISTS: number; + + /** + * Indicates that a file operation fails. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const ERROR_FILE_ERROR: number; + + /** + * Indicates that the HTTP transmission fails. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const ERROR_HTTP_DATA_ERROR: number; + + /** + * Indicates insufficient storage space. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const ERROR_INSUFFICIENT_SPACE: number; + + /** + * Indicates an error caused by too many network redirections. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const ERROR_TOO_MANY_REDIRECTS: number; + + /** + * Indicates an HTTP code that cannot be identified. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const ERROR_UNHANDLED_HTTP_CODE: number; + + /** + * Indicates an undefined error. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const ERROR_UNKNOWN: number; + + /** + * Indicates that the download is paused and waiting for a WLAN connection, because the file size exceeds the maximum allowed for a session using the cellular network. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const PAUSED_QUEUED_FOR_WIFI: number; + + /** + * Indicates that the download is paused for some reasons. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const PAUSED_UNKNOWN: number; + + /** + * Indicates that the download is paused due to a network problem, for example, network disconnection. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const PAUSED_WAITING_FOR_NETWORK: number; + + /** + * Indicates that a network error occurs, and the download session will be retried. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const PAUSED_WAITING_TO_RETRY: number; + + /** + * Indicates that the download session has failed and will not be retried. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const SESSION_FAILED: number; + + /** + * Indicates that the download session has been paused. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const SESSION_PAUSED: number; + + /** + * Indicates that the download session is being scheduled. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const SESSION_PENDING: number; + + /** + * Indicates that the download session is in progress. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const SESSION_RUNNING: number; + + /** + * Indicates that the download session is completed. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + */ + const SESSION_SUCCESSFUL: number; + + /** + * Starts a download session. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @param config download config + * @param callback Indicate the callback function to receive DownloadTask. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + function download(config: DownloadConfig, callback: AsyncCallback): void; + + /** + * Starts a download session. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @param config download config + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + function download(config: DownloadConfig): Promise; + + /** + * Starts a upload session. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @param config upload config + * @param callback Indicate the callback function to receive UploadTask. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + function upload(config: UploadConfig, callback: AsyncCallback): void; + + /** + * Starts a upload session. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @param config upload config + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + function upload(config: UploadConfig): Promise; + + interface DownloadConfig { + url: string; // Resource address. + header?: Object; // Adds an HTTP or HTTPS header to be included with the download request. + enableMetered?: boolean; // Allows download under a metered connection. + enableRoaming?: boolean; // Allows download in a roaming network. + description?: string; // Sets the description of a download session. + networkType?: number; // Sets the network type allowed for download. + filePath?: string; // Sets the path for downloads. + title?: string; // Sets a download session title. + } + + interface DownloadInfo { + description: string; // the description of a file to be downloaded. + downloadedBytes: number; // the real-time downloads size (in bytes). + downloadId: number; // the ID of a file to be downloaded. + failedReason: number; // a download failure cause, which can be any DownloadSession.ERROR_* constant. + fileName: string; // the name of a file to be downloaded. + filePath: string; // the URI of a stored file. + pausedReason: number; // the reason why a session is paused, which can be any DownloadSession.PAUSED_* constant. + status: number; // the download status code, which can be any DownloadSession.SESSION_* constant. + targetURI: string; // the URI of files to be downloaded. + downloadTitle: string; // the title of a file to be downloaded. + downloadTotalBytes: number; // the total size of files to be downloaded (in bytes). + } + + interface DownloadTask { + /** + * Called when the current download session is in process. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @param type progress Indicates the download task progress. + * @param callback The callback function for the download progress change event + * receivedSize the length of downloaded data, in bytes + * totalSize he length of data expected to be downloaded, in bytes. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + on(type: 'progress', callback: (receivedSize: number, totalSize: number) => void): void; + + /** + * Called when the current download session is in process. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @param type progress Indicates the download task progress. + * @param callback The callback function for the download progress change event + * receivedSize the length of downloaded data, in bytes + * totalSize he length of data expected to be downloaded, in bytes. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + off(type: 'progress', callback?: (receivedSize: number, totalSize: number) => void): void; + + /** + * Called when the current download session complete、pause or remove. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param type Indicates the download session event type + * complete: download task completed, + * pause: download task stopped, + * remove: download task deleted. + * @param callback The callback function for the download complete、pause or remove change event. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + on(type: 'complete' | 'pause' | 'remove', callback: () => void): void; + + /** + * Called when the current download session complete、pause or remove. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param type Indicates the download session event type + * complete: download task completed, + * pause: download task stopped, + * remove: download task deleted. + * @param callback The callback function for the download complete、pause or remove change event. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + off(type: 'complete' | 'pause' | 'remove', callback?: () => void): void; + + /** + * Called when the current download session fails. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param type Indicates the download session type, fail: download task has failed. + * @param callback The callback function for the download fail change event + * err The error code for download task. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + on(type: 'fail', callback: (err: number) => void): void; + + /** + * Called when the current download session fails. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param type Indicates the download session type, fail: download task has failed. + * @param callback Indicate the callback function to receive err. + * err The error code for download task. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + off(type: 'fail', callback?: (err: number) => void): void; + + /** + * Deletes a download session and the downloaded files. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @param callback Indicates asynchronous invoking Result. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + remove(callback: AsyncCallback): void; + + /** + * Deletes a download session and the downloaded files. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + remove(): Promise; + + /** + * Pause a download session. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param callback Indicates asynchronous invoking Result. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + pause(callback: AsyncCallback): void; + + /** + * Pause a download session. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + pause(): Promise; + + /** + * Resume a paused download session. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param callback Indicates asynchronous invoking Result. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + resume(callback: AsyncCallback): void; + + /** + * Resume a paused download session. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + resume(): Promise; + + /** + * Queries download information of a session, which is defined in DownloadSession.DownloadInfo. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param callback Indicate the callback function to receive download info. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + query(callback: AsyncCallback): void; + + /** + * Queries download information of a session, which is defined in DownloadSession.DownloadInfo. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + query(): Promise; + + /** + * Queries the MIME type of the download file. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param callback Indicate the callback function to receive download file MIME type. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + queryMimeType(callback: AsyncCallback): void; + + /** + * Queries the MIME type of the download file. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + queryMimeType(): Promise; + } + + interface File { + filename: string; // When multipart is submitted, the file name in the request header. + name: string; // When multipart is submitted, the name of the form item. The default is file. + uri: string; // The local storage path of the file (please refer to the storage directory definition for path usage). + type: string; // The content type of the file is obtained by default according to the suffix of the file name or path. + } + + interface RequestData { + name: string; // Represents the name of the form element. + value: string; // Represents the value of the form element. + } + + interface UploadConfig { + url: string; // Resource address. + header: Object; // Adds an HTTP or HTTPS header to be included with the upload request. + method: string; // Request method: POST, PUT. The default POST. + files: Array; // A list of files to be uploaded. Please use multipart/form-data to submit. + data: Array; // The requested form data. + } + + interface UploadTask { + /** + * Called when the current upload session is in process. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @param type progress Indicates the upload task progress. + * @param callback The callback function for the upload progress change event + * uploadedSize The length of uploaded data, in bytes + * totalSize The length of data expected to be uploaded, in bytes. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + on(type: 'progress', callback: (uploadedSize: number, totalSize: number) => void): void; + + /** + * Called when the current upload session is in process. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @param type progress Indicates the upload task progress. + * @param callback The callback function for the upload progress change event + * uploadedSize The length of uploaded data, in bytes + * totalSize The length of data expected to be uploaded, in bytes. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) => void): void; + + /** + * Called when the header of the current upload session has been received. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param type headerReceive Indicates the upload task headed receive. + * @param callback The callback function for the HTTP Response Header event + * header HTTP Response Header returned by the developer server. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + on(type: 'headerReceive', callback: (header: object) => void): void; + + /** + * Called when the header of the current upload session has been received. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param type headerReceive Indicates the upload task headed receive. + * @param callback The callback function for the HTTP Response Header event + * header HTTP Response Header returned by the developer server. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + off(type: 'headerReceive', callback?: (header: object) => void): void; + + /** + * Called when the current download session fails. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param type Indicates the download session type, fail: download task has failed. + * @param callback The callback function for the download fail change event + * err The error code for download task. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + on(type: 'fail', callback: (err: number) => void): void; + + /** + * Called when the current download session fails. + * + * @since 7 + * @devices phone, tablet, tv, wearable, car + * @param type Indicates the download session type, fail: download task has failed. + * @param callback Indicate the callback function to receive err. + * err The error code for download task. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + off(type: 'fail', callback?: (err: number) => void): void; + + /** + * Deletes a upload session. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @param callback Indicates asynchronous invoking Result. + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + remove(callback: AsyncCallback): void; + + /** + * Deletes a upload session. + * + * @since 6 + * @devices phone, tablet, tv, wearable, car + * @permission {@code ohos.permission.INTERNET} + * @return - + */ + remove(): Promise; + } +} + +export default request; \ No newline at end of file -- Gitee From 98824210cabccc1ee0a8fc383eb564d1ccc1d1f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Tue, 8 Mar 2022 11:36:14 +0000 Subject: [PATCH 05/15] update api/@ohos.wallpaper.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.wallpaper.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.wallpaper.d.ts b/api/@ohos.wallpaper.d.ts index 8f9f85ac8b..45eb26311e 100644 --- a/api/@ohos.wallpaper.d.ts +++ b/api/@ohos.wallpaper.d.ts @@ -16,7 +16,7 @@ import {AsyncCallback} from './basic'; import image from './@ohos.multimedia.image' /** - * ystem wallpaper + * system wallpaper * @syscap SystemCapability.Miscservices.Wallpaper * @devices phone, tablet, tv, wearable, car * @import import wallpaper from '@ohos.wallpaper'; -- Gitee From 14c8aad39d613367e5d3f520b9a0d4c7d5cb5a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Tue, 8 Mar 2022 11:37:01 +0000 Subject: [PATCH 06/15] rename api/@ohos.screenlock.d.ts to api/@ohos.screenLock.d.ts. Signed-off-by: miss-deep-sea-fish --- api/{@ohos.screenlock.d.ts => @ohos.screenLock.d.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename api/{@ohos.screenlock.d.ts => @ohos.screenLock.d.ts} (100%) diff --git a/api/@ohos.screenlock.d.ts b/api/@ohos.screenLock.d.ts similarity index 100% rename from api/@ohos.screenlock.d.ts rename to api/@ohos.screenLock.d.ts -- Gitee From 545aa6e0430cffc22a94a1b2edcdb23593ad18ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Tue, 8 Mar 2022 11:38:31 +0000 Subject: [PATCH 07/15] update api/@ohos.wallpaper.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.wallpaper.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.wallpaper.d.ts b/api/@ohos.wallpaper.d.ts index 45eb26311e..d142d06290 100644 --- a/api/@ohos.wallpaper.d.ts +++ b/api/@ohos.wallpaper.d.ts @@ -16,7 +16,7 @@ import {AsyncCallback} from './basic'; import image from './@ohos.multimedia.image' /** - * system wallpaper + * System wallpaper * @syscap SystemCapability.Miscservices.Wallpaper * @devices phone, tablet, tv, wearable, car * @import import wallpaper from '@ohos.wallpaper'; -- Gitee From fb574acc300f7e150b552317213e434fe769f49c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Tue, 8 Mar 2022 12:55:41 +0000 Subject: [PATCH 08/15] update api/@ohos.screenLock.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.screenLock.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@ohos.screenLock.d.ts b/api/@ohos.screenLock.d.ts index 2e041eec7a..44a1c82e28 100644 --- a/api/@ohos.screenLock.d.ts +++ b/api/@ohos.screenLock.d.ts @@ -45,11 +45,11 @@ declare namespace screenLock { /** * Unlocks the screen. - * + * return - * @since 7 */ - function unlockScreen(callback: AsyncCallback): void; - function unlockScreen():Promise; + function unlockScreen(callback: AsyncCallback): void; + function unlockScreen():Promise; /** * Receives {beginWakeUp|endWakeUp|beginScreenOn|endScreenOn|beginScreenOff|endScreenOff|unlockScreen|beginExitAnimation} called. -- Gitee From 253e17fd561fe6a3e9881326dfaf4f7d11de50ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Tue, 8 Mar 2022 13:00:03 +0000 Subject: [PATCH 09/15] update api/@ohos.request.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.request.d.ts | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index f34286ff38..6cade6a06c 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -543,32 +543,6 @@ declare namespace request { */ off(type: 'headerReceive', callback?: (header: object) => void): void; - /** - * Called when the current download session fails. - * - * @since 7 - * @devices phone, tablet, tv, wearable, car - * @param type Indicates the download session type, fail: download task has failed. - * @param callback The callback function for the download fail change event - * err The error code for download task. - * @permission {@code ohos.permission.INTERNET} - * @return - - */ - on(type: 'fail', callback: (err: number) => void): void; - - /** - * Called when the current download session fails. - * - * @since 7 - * @devices phone, tablet, tv, wearable, car - * @param type Indicates the download session type, fail: download task has failed. - * @param callback Indicate the callback function to receive err. - * err The error code for download task. - * @permission {@code ohos.permission.INTERNET} - * @return - - */ - off(type: 'fail', callback?: (err: number) => void): void; - /** * Deletes a upload session. * -- Gitee From f0473be719fab221a7b583343e7f62aecd934774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Wed, 9 Mar 2022 12:12:46 +0000 Subject: [PATCH 10/15] update api/@ohos.wallpaper.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.wallpaper.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.wallpaper.d.ts b/api/@ohos.wallpaper.d.ts index d142d06290..59ec8147d2 100644 --- a/api/@ohos.wallpaper.d.ts +++ b/api/@ohos.wallpaper.d.ts @@ -18,7 +18,6 @@ import image from './@ohos.multimedia.image' /** * System wallpaper * @syscap SystemCapability.Miscservices.Wallpaper - * @devices phone, tablet, tv, wearable, car * @import import wallpaper from '@ohos.wallpaper'; * @since 7 */ -- Gitee From 17e896f84471792eec7621e612146e7ad603a57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Wed, 9 Mar 2022 12:14:35 +0000 Subject: [PATCH 11/15] update api/@ohos.screenLock.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.screenLock.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.screenLock.d.ts b/api/@ohos.screenLock.d.ts index 44a1c82e28..ad709d2617 100644 --- a/api/@ohos.screenLock.d.ts +++ b/api/@ohos.screenLock.d.ts @@ -18,7 +18,6 @@ import { Callback } from './basic'; /** * systemScreenLock * @syscap SystemCapability.Miscservices.ScreenLock - * @devices phone, tablet, tv, wearable, car * @since 7 */ declare namespace screenLock { -- Gitee From dd0e062c68b1fa5efcc35d63d5ca3285966ffbd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Wed, 9 Mar 2022 12:16:08 +0000 Subject: [PATCH 12/15] update api/@ohos.request.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.request.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 6cade6a06c..e7917f7c73 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -21,7 +21,6 @@ import { AsyncCallback } from './basic'; * @import request from '@ohos.request'; * @syscap SystemCapability.Miscservices.Upload * @syscap SystemCapability.Miscservices.Download - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ declare namespace request { -- Gitee From a08705ff5ca4c9a91a0a8fee5ff214b159f247b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Wed, 9 Mar 2022 12:16:56 +0000 Subject: [PATCH 13/15] update api/@ohos.pasteboard.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.pasteboard.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.pasteboard.d.ts b/api/@ohos.pasteboard.d.ts index e1e14bcded..fd64ab9ab8 100644 --- a/api/@ohos.pasteboard.d.ts +++ b/api/@ohos.pasteboard.d.ts @@ -18,7 +18,6 @@ import { Want } from './ability/want'; /** * systemPasteboard * @syscap SystemCapability.Miscservices.Pasteboard - * @devices phone, tablet, tv, wearable, car * @import import pasteboard from '@ohos.pasteboard'; */ declare namespace pasteboard { -- Gitee From e4112778988c835d52f528b156ce14af517396a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Wed, 9 Mar 2022 14:05:37 +0000 Subject: [PATCH 14/15] update api/@ohos.request.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.request.d.ts | 54 +++++------------------------------------- 1 file changed, 6 insertions(+), 48 deletions(-) diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index e7917f7c73..fbe4440883 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -19,8 +19,6 @@ import { AsyncCallback } from './basic'; * * @since 7 * @import request from '@ohos.request'; - * @syscap SystemCapability.Miscservices.Upload - * @syscap SystemCapability.Miscservices.Download * @permission {@code ohos.permission.INTERNET} */ declare namespace request { @@ -29,7 +27,6 @@ declare namespace request { * Bit flag indicating download is allowed when using the cellular network. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const NETWORK_MOBILE: number; @@ -38,7 +35,6 @@ declare namespace request { * Bit flag indicating download is allowed when using the WLAN. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const NETWORK_WIFI: number; @@ -47,7 +43,6 @@ declare namespace request { * Indicates that the download cannot be resumed for some temporary errors. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const ERROR_CANNOT_RESUME: number; @@ -56,7 +51,6 @@ declare namespace request { * Indicates that no storage device, such as an SD card, is found. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const ERROR_DEVICE_NOT_FOUND: number; @@ -65,7 +59,6 @@ declare namespace request { * Indicates that files to be downloaded already exist, and that the download session cannot overwrite the existing files. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const ERROR_FILE_ALREADY_EXISTS: number; @@ -74,7 +67,6 @@ declare namespace request { * Indicates that a file operation fails. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const ERROR_FILE_ERROR: number; @@ -83,7 +75,6 @@ declare namespace request { * Indicates that the HTTP transmission fails. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const ERROR_HTTP_DATA_ERROR: number; @@ -92,7 +83,6 @@ declare namespace request { * Indicates insufficient storage space. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const ERROR_INSUFFICIENT_SPACE: number; @@ -101,7 +91,6 @@ declare namespace request { * Indicates an error caused by too many network redirections. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const ERROR_TOO_MANY_REDIRECTS: number; @@ -110,7 +99,6 @@ declare namespace request { * Indicates an HTTP code that cannot be identified. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const ERROR_UNHANDLED_HTTP_CODE: number; @@ -119,7 +107,6 @@ declare namespace request { * Indicates an undefined error. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const ERROR_UNKNOWN: number; @@ -128,7 +115,6 @@ declare namespace request { * Indicates that the download is paused and waiting for a WLAN connection, because the file size exceeds the maximum allowed for a session using the cellular network. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const PAUSED_QUEUED_FOR_WIFI: number; @@ -137,7 +123,6 @@ declare namespace request { * Indicates that the download is paused for some reasons. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const PAUSED_UNKNOWN: number; @@ -146,7 +131,6 @@ declare namespace request { * Indicates that the download is paused due to a network problem, for example, network disconnection. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const PAUSED_WAITING_FOR_NETWORK: number; @@ -155,7 +139,6 @@ declare namespace request { * Indicates that a network error occurs, and the download session will be retried. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const PAUSED_WAITING_TO_RETRY: number; @@ -164,7 +147,6 @@ declare namespace request { * Indicates that the download session has failed and will not be retried. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const SESSION_FAILED: number; @@ -173,7 +155,6 @@ declare namespace request { * Indicates that the download session has been paused. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const SESSION_PAUSED: number; @@ -182,7 +163,6 @@ declare namespace request { * Indicates that the download session is being scheduled. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const SESSION_PENDING: number; @@ -191,7 +171,6 @@ declare namespace request { * Indicates that the download session is in progress. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const SESSION_RUNNING: number; @@ -200,7 +179,6 @@ declare namespace request { * Indicates that the download session is completed. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} */ const SESSION_SUCCESSFUL: number; @@ -209,7 +187,6 @@ declare namespace request { * Starts a download session. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @param config download config * @param callback Indicate the callback function to receive DownloadTask. * @permission {@code ohos.permission.INTERNET} @@ -221,7 +198,6 @@ declare namespace request { * Starts a download session. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @param config download config * @permission {@code ohos.permission.INTERNET} * @return - @@ -232,7 +208,6 @@ declare namespace request { * Starts a upload session. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @param config upload config * @param callback Indicate the callback function to receive UploadTask. * @permission {@code ohos.permission.INTERNET} @@ -244,7 +219,6 @@ declare namespace request { * Starts a upload session. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @param config upload config * @permission {@code ohos.permission.INTERNET} * @return - @@ -276,12 +250,14 @@ declare namespace request { downloadTotalBytes: number; // the total size of files to be downloaded (in bytes). } +/** + * @syscap SystemCapability.Miscservices.Download + */ interface DownloadTask { /** * Called when the current download session is in process. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @param type progress Indicates the download task progress. * @param callback The callback function for the download progress change event * receivedSize the length of downloaded data, in bytes @@ -295,7 +271,6 @@ declare namespace request { * Called when the current download session is in process. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @param type progress Indicates the download task progress. * @param callback The callback function for the download progress change event * receivedSize the length of downloaded data, in bytes @@ -309,7 +284,6 @@ declare namespace request { * Called when the current download session complete、pause or remove. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param type Indicates the download session event type * complete: download task completed, * pause: download task stopped, @@ -324,7 +298,6 @@ declare namespace request { * Called when the current download session complete、pause or remove. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param type Indicates the download session event type * complete: download task completed, * pause: download task stopped, @@ -339,7 +312,6 @@ declare namespace request { * Called when the current download session fails. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param type Indicates the download session type, fail: download task has failed. * @param callback The callback function for the download fail change event * err The error code for download task. @@ -352,7 +324,6 @@ declare namespace request { * Called when the current download session fails. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param type Indicates the download session type, fail: download task has failed. * @param callback Indicate the callback function to receive err. * err The error code for download task. @@ -365,7 +336,6 @@ declare namespace request { * Deletes a download session and the downloaded files. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @param callback Indicates asynchronous invoking Result. * @permission {@code ohos.permission.INTERNET} * @return - @@ -376,7 +346,6 @@ declare namespace request { * Deletes a download session and the downloaded files. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} * @return - */ @@ -386,7 +355,6 @@ declare namespace request { * Pause a download session. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param callback Indicates asynchronous invoking Result. * @permission {@code ohos.permission.INTERNET} * @return - @@ -397,7 +365,6 @@ declare namespace request { * Pause a download session. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} * @return - */ @@ -407,7 +374,6 @@ declare namespace request { * Resume a paused download session. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param callback Indicates asynchronous invoking Result. * @permission {@code ohos.permission.INTERNET} * @return - @@ -418,7 +384,6 @@ declare namespace request { * Resume a paused download session. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} * @return - */ @@ -428,7 +393,6 @@ declare namespace request { * Queries download information of a session, which is defined in DownloadSession.DownloadInfo. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param callback Indicate the callback function to receive download info. * @permission {@code ohos.permission.INTERNET} * @return - @@ -439,7 +403,6 @@ declare namespace request { * Queries download information of a session, which is defined in DownloadSession.DownloadInfo. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} * @return - */ @@ -449,7 +412,6 @@ declare namespace request { * Queries the MIME type of the download file. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param callback Indicate the callback function to receive download file MIME type. * @permission {@code ohos.permission.INTERNET} * @return - @@ -460,7 +422,6 @@ declare namespace request { * Queries the MIME type of the download file. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} * @return - */ @@ -487,12 +448,14 @@ declare namespace request { data: Array; // The requested form data. } +/** + * @syscap SystemCapability.Miscservices.Upload + */ interface UploadTask { /** * Called when the current upload session is in process. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @param type progress Indicates the upload task progress. * @param callback The callback function for the upload progress change event * uploadedSize The length of uploaded data, in bytes @@ -506,7 +469,6 @@ declare namespace request { * Called when the current upload session is in process. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @param type progress Indicates the upload task progress. * @param callback The callback function for the upload progress change event * uploadedSize The length of uploaded data, in bytes @@ -520,7 +482,6 @@ declare namespace request { * Called when the header of the current upload session has been received. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param type headerReceive Indicates the upload task headed receive. * @param callback The callback function for the HTTP Response Header event * header HTTP Response Header returned by the developer server. @@ -533,7 +494,6 @@ declare namespace request { * Called when the header of the current upload session has been received. * * @since 7 - * @devices phone, tablet, tv, wearable, car * @param type headerReceive Indicates the upload task headed receive. * @param callback The callback function for the HTTP Response Header event * header HTTP Response Header returned by the developer server. @@ -546,7 +506,6 @@ declare namespace request { * Deletes a upload session. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @param callback Indicates asynchronous invoking Result. * @permission {@code ohos.permission.INTERNET} * @return - @@ -557,7 +516,6 @@ declare namespace request { * Deletes a upload session. * * @since 6 - * @devices phone, tablet, tv, wearable, car * @permission {@code ohos.permission.INTERNET} * @return - */ -- Gitee From c5e72c71b0afff240afab63777a07220dd4333fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miss=E6=B7=B1=E6=B5=B7=E9=B1=BC?= Date: Thu, 10 Mar 2022 03:13:33 +0000 Subject: [PATCH 15/15] update api/@ohos.request.d.ts. Signed-off-by: miss-deep-sea-fish --- api/@ohos.request.d.ts | 98 ++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 52 deletions(-) diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index fbe4440883..d50e6e72ac 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -25,7 +25,7 @@ declare namespace request { /** * Bit flag indicating download is allowed when using the cellular network. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -33,7 +33,7 @@ declare namespace request { /** * Bit flag indicating download is allowed when using the WLAN. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -41,7 +41,7 @@ declare namespace request { /** * Indicates that the download cannot be resumed for some temporary errors. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -49,7 +49,7 @@ declare namespace request { /** * Indicates that no storage device, such as an SD card, is found. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -57,7 +57,7 @@ declare namespace request { /** * Indicates that files to be downloaded already exist, and that the download session cannot overwrite the existing files. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -65,7 +65,7 @@ declare namespace request { /** * Indicates that a file operation fails. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -73,7 +73,7 @@ declare namespace request { /** * Indicates that the HTTP transmission fails. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -81,7 +81,7 @@ declare namespace request { /** * Indicates insufficient storage space. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -89,7 +89,7 @@ declare namespace request { /** * Indicates an error caused by too many network redirections. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -97,7 +97,7 @@ declare namespace request { /** * Indicates an HTTP code that cannot be identified. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -105,7 +105,7 @@ declare namespace request { /** * Indicates an undefined error. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -113,7 +113,7 @@ declare namespace request { /** * Indicates that the download is paused and waiting for a WLAN connection, because the file size exceeds the maximum allowed for a session using the cellular network. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -121,7 +121,7 @@ declare namespace request { /** * Indicates that the download is paused for some reasons. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -129,7 +129,7 @@ declare namespace request { /** * Indicates that the download is paused due to a network problem, for example, network disconnection. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -137,7 +137,7 @@ declare namespace request { /** * Indicates that a network error occurs, and the download session will be retried. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -145,7 +145,7 @@ declare namespace request { /** * Indicates that the download session has failed and will not be retried. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -153,7 +153,7 @@ declare namespace request { /** * Indicates that the download session has been paused. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -161,7 +161,7 @@ declare namespace request { /** * Indicates that the download session is being scheduled. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -169,7 +169,7 @@ declare namespace request { /** * Indicates that the download session is in progress. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -177,7 +177,7 @@ declare namespace request { /** * Indicates that the download session is completed. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} */ @@ -185,7 +185,7 @@ declare namespace request { /** * Starts a download session. - * + * @syscap SystemCapability.Miscservices.Download * @since 6 * @param config download config * @param callback Indicate the callback function to receive DownloadTask. @@ -196,7 +196,7 @@ declare namespace request { /** * Starts a download session. - * + * @syscap SystemCapability.Miscservices.Download * @since 6 * @param config download config * @permission {@code ohos.permission.INTERNET} @@ -206,7 +206,7 @@ declare namespace request { /** * Starts a upload session. - * + * @syscap SystemCapability.Miscservices.Upload * @since 6 * @param config upload config * @param callback Indicate the callback function to receive UploadTask. @@ -217,7 +217,7 @@ declare namespace request { /** * Starts a upload session. - * + * @syscap SystemCapability.Miscservices.Upload * @since 6 * @param config upload config * @permission {@code ohos.permission.INTERNET} @@ -250,13 +250,10 @@ declare namespace request { downloadTotalBytes: number; // the total size of files to be downloaded (in bytes). } -/** - * @syscap SystemCapability.Miscservices.Download - */ interface DownloadTask { /** * Called when the current download session is in process. - * + * @syscap SystemCapability.Miscservices.Download * @since 6 * @param type progress Indicates the download task progress. * @param callback The callback function for the download progress change event @@ -269,7 +266,7 @@ declare namespace request { /** * Called when the current download session is in process. - * + * @syscap SystemCapability.Miscservices.Download * @since 6 * @param type progress Indicates the download task progress. * @param callback The callback function for the download progress change event @@ -282,7 +279,7 @@ declare namespace request { /** * Called when the current download session complete、pause or remove. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @param type Indicates the download session event type * complete: download task completed, @@ -296,7 +293,7 @@ declare namespace request { /** * Called when the current download session complete、pause or remove. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @param type Indicates the download session event type * complete: download task completed, @@ -310,7 +307,7 @@ declare namespace request { /** * Called when the current download session fails. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @param type Indicates the download session type, fail: download task has failed. * @param callback The callback function for the download fail change event @@ -322,7 +319,7 @@ declare namespace request { /** * Called when the current download session fails. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @param type Indicates the download session type, fail: download task has failed. * @param callback Indicate the callback function to receive err. @@ -334,7 +331,7 @@ declare namespace request { /** * Deletes a download session and the downloaded files. - * + * @syscap SystemCapability.Miscservices.Download * @since 6 * @param callback Indicates asynchronous invoking Result. * @permission {@code ohos.permission.INTERNET} @@ -344,7 +341,7 @@ declare namespace request { /** * Deletes a download session and the downloaded files. - * + * @syscap SystemCapability.Miscservices.Download * @since 6 * @permission {@code ohos.permission.INTERNET} * @return - @@ -353,7 +350,7 @@ declare namespace request { /** * Pause a download session. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @param callback Indicates asynchronous invoking Result. * @permission {@code ohos.permission.INTERNET} @@ -363,7 +360,7 @@ declare namespace request { /** * Pause a download session. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} * @return - @@ -372,7 +369,7 @@ declare namespace request { /** * Resume a paused download session. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @param callback Indicates asynchronous invoking Result. * @permission {@code ohos.permission.INTERNET} @@ -382,7 +379,7 @@ declare namespace request { /** * Resume a paused download session. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} * @return - @@ -391,7 +388,7 @@ declare namespace request { /** * Queries download information of a session, which is defined in DownloadSession.DownloadInfo. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @param callback Indicate the callback function to receive download info. * @permission {@code ohos.permission.INTERNET} @@ -401,7 +398,7 @@ declare namespace request { /** * Queries download information of a session, which is defined in DownloadSession.DownloadInfo. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} * @return - @@ -410,7 +407,7 @@ declare namespace request { /** * Queries the MIME type of the download file. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @param callback Indicate the callback function to receive download file MIME type. * @permission {@code ohos.permission.INTERNET} @@ -420,7 +417,7 @@ declare namespace request { /** * Queries the MIME type of the download file. - * + * @syscap SystemCapability.Miscservices.Download * @since 7 * @permission {@code ohos.permission.INTERNET} * @return - @@ -448,13 +445,10 @@ declare namespace request { data: Array; // The requested form data. } -/** - * @syscap SystemCapability.Miscservices.Upload - */ interface UploadTask { /** * Called when the current upload session is in process. - * + * @syscap SystemCapability.Miscservices.Upload * @since 6 * @param type progress Indicates the upload task progress. * @param callback The callback function for the upload progress change event @@ -467,7 +461,7 @@ declare namespace request { /** * Called when the current upload session is in process. - * + * @syscap SystemCapability.Miscservices.Upload * @since 6 * @param type progress Indicates the upload task progress. * @param callback The callback function for the upload progress change event @@ -480,7 +474,7 @@ declare namespace request { /** * Called when the header of the current upload session has been received. - * + * @syscap SystemCapability.Miscservices.Upload * @since 7 * @param type headerReceive Indicates the upload task headed receive. * @param callback The callback function for the HTTP Response Header event @@ -492,7 +486,7 @@ declare namespace request { /** * Called when the header of the current upload session has been received. - * + * @syscap SystemCapability.Miscservices.Upload * @since 7 * @param type headerReceive Indicates the upload task headed receive. * @param callback The callback function for the HTTP Response Header event @@ -504,7 +498,7 @@ declare namespace request { /** * Deletes a upload session. - * + * @syscap SystemCapability.Miscservices.Upload * @since 6 * @param callback Indicates asynchronous invoking Result. * @permission {@code ohos.permission.INTERNET} @@ -514,7 +508,7 @@ declare namespace request { /** * Deletes a upload session. - * + * @syscap SystemCapability.Miscservices.Upload * @since 6 * @permission {@code ohos.permission.INTERNET} * @return - -- Gitee