From 2438a11810086c800ebf6abf07a0c9e7c743c731 Mon Sep 17 00:00:00 2001 From: lovechinamo Date: Thu, 26 May 2022 16:25:49 +0800 Subject: [PATCH 1/4] Signed-off-by: lovechinamo Changes to be committed: --- api/@ohos.request.d.ts | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 38ddc06e5f..c3b829c1ba 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -192,6 +192,18 @@ declare namespace request { * @return - */ function download(config: DownloadConfig, callback: AsyncCallback): void; + + /** + * Starts a download session. + * @syscap SystemCapability.MiscServices.Download + * @since 8 + * @param context Indicates the application context. + * @param config download config + * @param callback Indicate the callback function to receive DownloadTask. + * @permission ohos.permission.INTERNET + * @return - + */ + function download(context: Context, config: DownloadConfig, callback: AsyncCallback): void; /** * Starts a download session. @@ -203,6 +215,17 @@ declare namespace request { */ function download(config: DownloadConfig): Promise; + /** + * Starts a download session. + * @syscap SystemCapability.MiscServices.Download + * @since 8 + * @param context Indicates the application context. + * @param config download config + * @permission ohos.permission.INTERNET + * @return - + */ + function download(context: Context, config: DownloadConfig): Promise; + /** * Starts a upload session. * @syscap SystemCapability.MiscServices.Upload @@ -214,6 +237,18 @@ declare namespace request { */ function upload(config: UploadConfig, callback: AsyncCallback): void; + /** + * Starts a upload session. + * @syscap SystemCapability.MiscServices.Upload + * @since 8 + * @param context Indicates the application context. + * @param config upload config + * @param callback Indicate the callback function to receive UploadTask. + * @permission ohos.permission.INTERNET + * @return - + */ + function upload(context: Context, config: UploadConfig, callback: AsyncCallback): void; + /** * Starts a upload session. * @syscap SystemCapability.MiscServices.Upload @@ -224,6 +259,17 @@ declare namespace request { */ function upload(config: UploadConfig): Promise; + /** + * Starts a upload session. + * @syscap SystemCapability.MiscServices.Upload + * @since 8 + * @param context Indicates the application context. + * @param config upload config + * @permission ohos.permission.INTERNET + * @return - + */ + function upload(context: Context, config: UploadConfig): Promise; + /** * DownloadConfig data Structure * -- Gitee From 577b1fe3f20eef41a4e9189c8bbef11bd193160c Mon Sep 17 00:00:00 2001 From: lovechinamo Date: Thu, 26 May 2022 16:28:22 +0800 Subject: [PATCH 2/4] Signed-off-by: lovechinamo Changes to be committed: --- api/@ohos.request.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index c3b829c1ba..5216448247 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -192,7 +192,7 @@ declare namespace request { * @return - */ function download(config: DownloadConfig, callback: AsyncCallback): void; - + /** * Starts a download session. * @syscap SystemCapability.MiscServices.Download -- Gitee From 3e778c39fcee8230ce6b6db013949719f6317e72 Mon Sep 17 00:00:00 2001 From: lovechinamo Date: Thu, 26 May 2022 19:39:28 +0800 Subject: [PATCH 3/4] Signed-off-by: lovechinamo Changes to be committed: --- api/.idea/.deveco/project.cache.json | 6 ++++++ api/.idea/.gitignore | 3 +++ api/.idea/api.iml | 8 ++++++++ api/.idea/modules.xml | 8 ++++++++ api/.idea/vcs.xml | 6 ++++++ api/@ohos.request.d.ts | 13 +++++++++---- api/local.properties | 10 ++++++++++ api/package-lock.json | 3 +++ 8 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 api/.idea/.deveco/project.cache.json create mode 100644 api/.idea/.gitignore create mode 100644 api/.idea/api.iml create mode 100644 api/.idea/modules.xml create mode 100644 api/.idea/vcs.xml create mode 100644 api/local.properties create mode 100644 api/package-lock.json diff --git a/api/.idea/.deveco/project.cache.json b/api/.idea/.deveco/project.cache.json new file mode 100644 index 0000000000..9f11beeece --- /dev/null +++ b/api/.idea/.deveco/project.cache.json @@ -0,0 +1,6 @@ +{ + "BuildOptions":{}, + "CommonInfo":{ + "project.ide.version":"3.0.0.900" + } +} \ No newline at end of file diff --git a/api/.idea/.gitignore b/api/.idea/.gitignore new file mode 100644 index 0000000000..26d33521af --- /dev/null +++ b/api/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/api/.idea/api.iml b/api/.idea/api.iml new file mode 100644 index 0000000000..6102194044 --- /dev/null +++ b/api/.idea/api.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/api/.idea/modules.xml b/api/.idea/modules.xml new file mode 100644 index 0000000000..d50cf45fff --- /dev/null +++ b/api/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/api/.idea/vcs.xml b/api/.idea/vcs.xml new file mode 100644 index 0000000000..6c0b863585 --- /dev/null +++ b/api/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 5216448247..3935722821 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -13,6 +13,7 @@ * limitations under the License. */ import { AsyncCallback } from './basic'; +import Context from './application/Context'; /** * upload and download @@ -190,13 +191,14 @@ declare namespace request { * @param callback Indicate the callback function to receive DownloadTask. * @permission ohos.permission.INTERNET * @return - + * @FAModelOnly */ function download(config: DownloadConfig, callback: AsyncCallback): void; /** * Starts a download session. * @syscap SystemCapability.MiscServices.Download - * @since 8 + * @since 9 * @param context Indicates the application context. * @param config download config * @param callback Indicate the callback function to receive DownloadTask. @@ -212,13 +214,14 @@ declare namespace request { * @param config download config * @permission ohos.permission.INTERNET * @return - + * @FAModelOnly */ function download(config: DownloadConfig): Promise; /** * Starts a download session. * @syscap SystemCapability.MiscServices.Download - * @since 8 + * @since 9 * @param context Indicates the application context. * @param config download config * @permission ohos.permission.INTERNET @@ -234,13 +237,14 @@ declare namespace request { * @param callback Indicate the callback function to receive UploadTask. * @permission ohos.permission.INTERNET * @return - + * @FAModelOnly */ function upload(config: UploadConfig, callback: AsyncCallback): void; /** * Starts a upload session. * @syscap SystemCapability.MiscServices.Upload - * @since 8 + * @since 9 * @param context Indicates the application context. * @param config upload config * @param callback Indicate the callback function to receive UploadTask. @@ -256,13 +260,14 @@ declare namespace request { * @param config upload config * @permission ohos.permission.INTERNET * @return - + * @FAModelOnly */ function upload(config: UploadConfig): Promise; /** * Starts a upload session. * @syscap SystemCapability.MiscServices.Upload - * @since 8 + * @since 9 * @param context Indicates the application context. * @param config upload config * @permission ohos.permission.INTERNET diff --git a/api/local.properties b/api/local.properties new file mode 100644 index 0000000000..45c433e5bf --- /dev/null +++ b/api/local.properties @@ -0,0 +1,10 @@ +# This file is automatically generated by DevEco Studio. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file should *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# For customization when using a Version Control System, please read the header note. +sdk.dir=D:/SDk +nodejs.dir=D:/deveco-studio/DevEco Studio 3.0.0.900/tools/nodejs +npm.dir=D:/deveco-studio/DevEco Studio 3.0.0.900/tools/nodejs \ No newline at end of file diff --git a/api/package-lock.json b/api/package-lock.json new file mode 100644 index 0000000000..48e341a095 --- /dev/null +++ b/api/package-lock.json @@ -0,0 +1,3 @@ +{ + "lockfileVersion": 1 +} -- Gitee From e0ae7aad7136e2c03606ce0870ed645ca344dbce Mon Sep 17 00:00:00 2001 From: lovechinamo Date: Thu, 26 May 2022 19:43:39 +0800 Subject: [PATCH 4/4] Signed-off-by: lovechinamo Changes to be committed: --- api/.idea/.deveco/project.cache.json | 6 ------ api/.idea/.gitignore | 3 --- api/.idea/api.iml | 8 -------- api/.idea/modules.xml | 8 -------- api/.idea/vcs.xml | 6 ------ api/local.properties | 10 ---------- api/package-lock.json | 3 --- 7 files changed, 44 deletions(-) delete mode 100644 api/.idea/.deveco/project.cache.json delete mode 100644 api/.idea/.gitignore delete mode 100644 api/.idea/api.iml delete mode 100644 api/.idea/modules.xml delete mode 100644 api/.idea/vcs.xml delete mode 100644 api/local.properties delete mode 100644 api/package-lock.json diff --git a/api/.idea/.deveco/project.cache.json b/api/.idea/.deveco/project.cache.json deleted file mode 100644 index 9f11beeece..0000000000 --- a/api/.idea/.deveco/project.cache.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "BuildOptions":{}, - "CommonInfo":{ - "project.ide.version":"3.0.0.900" - } -} \ No newline at end of file diff --git a/api/.idea/.gitignore b/api/.idea/.gitignore deleted file mode 100644 index 26d33521af..0000000000 --- a/api/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/api/.idea/api.iml b/api/.idea/api.iml deleted file mode 100644 index 6102194044..0000000000 --- a/api/.idea/api.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/api/.idea/modules.xml b/api/.idea/modules.xml deleted file mode 100644 index d50cf45fff..0000000000 --- a/api/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/api/.idea/vcs.xml b/api/.idea/vcs.xml deleted file mode 100644 index 6c0b863585..0000000000 --- a/api/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/api/local.properties b/api/local.properties deleted file mode 100644 index 45c433e5bf..0000000000 --- a/api/local.properties +++ /dev/null @@ -1,10 +0,0 @@ -# This file is automatically generated by DevEco Studio. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file should *NOT* be checked into Version Control Systems, -# as it contains information specific to your local configuration. -# -# For customization when using a Version Control System, please read the header note. -sdk.dir=D:/SDk -nodejs.dir=D:/deveco-studio/DevEco Studio 3.0.0.900/tools/nodejs -npm.dir=D:/deveco-studio/DevEco Studio 3.0.0.900/tools/nodejs \ No newline at end of file diff --git a/api/package-lock.json b/api/package-lock.json deleted file mode 100644 index 48e341a095..0000000000 --- a/api/package-lock.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "lockfileVersion": 1 -} -- Gitee