• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License"),
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit CoreFileKit
19 */
20
21import type { AsyncCallback, Callback } from './@ohos.base';
22
23/**
24 * Provides the capabilities to manage the state and data of cloud file synchronization.
25 *
26 * @namespace cloudSyncManager
27 * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
28 * @since arkts{ '1.1':'10','1.2':'20'}
29 * @arkts 1.1&1.2
30 */
31declare namespace cloudSyncManager {
32  /**
33   * Modify switch state of the application's cloud synchronization capability.
34   *
35   * @param { string } accountId - Current account id
36   * @param { string } bundleName - Name of bundle whose switchStatus is changing
37   * @param { boolean } status - New switch status
38   * @returns { Promise<void> } - Return Promise
39   * @throws { BusinessError } 201 - Permission verification failed.
40   * @throws { BusinessError } 202 - The caller is not a system application.
41   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
42   * <br>2.Incorrect parameter types.
43   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
44   * @systemapi
45   * @since arkts{ '1.1':'10','1.2':'20'}
46   * @arkts 1.1&1.2
47   */
48  function changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean): Promise<void>;
49
50  /**
51   * Modify switch state of the application's cloud synchronization capability.
52   *
53   * @param { string } accountId - Current account id
54   * @param { string } bundleName - Name of bundle whose switchStatus is changing
55   * @param { boolean } status - New switch status
56   * @param { AsyncCallback<void> } [callback] - Callback function
57   * @throws { BusinessError } 201 - Permission verification failed.
58   * @throws { BusinessError } 202 - The caller is not a system application.
59   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
60   * <br>2.Incorrect parameter types.
61   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
62   * @systemapi
63   * @since arkts{ '1.1':'10','1.2':'20'}
64   * @arkts 1.1&1.2
65   */
66  function changeAppCloudSwitch(
67    accountId: string,
68    bundleName: string,
69    status: boolean,
70    callback: AsyncCallback<void>
71  ): void;
72
73  /**
74   * Notify the change of data in cloud.
75   *
76   * @param { string } accountId - Current account id
77   * @param { string } bundleName - Name of bundle whose switchStatus is changing
78   * @returns { Promise<void> } Return Promise
79   * @throws { BusinessError } 201 - Permission verification failed.
80   * @throws { BusinessError } 202 - The caller is not a system application.
81   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
82   * <br>2.Incorrect parameter types.
83   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
84   * @systemapi
85   * @since arkts{ '1.1':'10','1.2':'20'}
86   * @arkts 1.1&1.2
87   */
88  function notifyDataChange(accountId: string, bundleName: string): Promise<void>;
89
90  /**
91   * Notify the change of data in cloud.
92   *
93   * @param { string } accountId - Current account id
94   * @param { string } bundleName - Name of bundle whose switchStatus is changing
95   * @param { AsyncCallback<void> } [callback] - Callback function
96   * @throws { BusinessError } 201 - Permission verification failed.
97   * @throws { BusinessError } 202 - The caller is not a system application.
98   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
99   * <br>2.Incorrect parameter types.
100   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
101   * @systemapi
102   * @since arkts{ '1.1':'10','1.2':'20'}
103   * @arkts 1.1&1.2
104   */
105  function notifyDataChange(accountId: string, bundleName: string, callback: AsyncCallback<void>): void;
106
107  /**
108   * Enable the cloud file synchronization function.
109   *
110   * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
111   * @param { string } accountId - Current account id.
112   * @param { Record<string, boolean> } switches - Indicates switches information of all applications.
113   * @returns { Promise<void> } Return Promise
114   * @throws { BusinessError } 201 - Permission verification failed.
115   * @throws { BusinessError } 202 - The caller is not a system application.
116   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
117   * <br>2.Incorrect parameter types.
118   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
119   * @systemapi
120   * @since arkts{ '1.1':'10','1.2':'20'}
121   * @arkts 1.1&1.2
122   */
123  function enableCloud(accountId: string, switches: Record<string, boolean>): Promise<void>;
124
125  /**
126   * Enable the cloud file synchronization function.
127   *
128   * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
129   * @param { string } accountId - Current account id
130   * @param { Record<string, boolean> } switches - Indicates switches information of all applications.
131   * @param { AsyncCallback<void> } [callback] - Callback function
132   * @throws { BusinessError } 201 - Permission verification failed.
133   * @throws { BusinessError } 202 - The caller is not a system application.
134   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
135   * <br>2.Incorrect parameter types.
136   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
137   * @systemapi
138   * @since arkts{ '1.1':'10','1.2':'20'}
139   * @arkts 1.1&1.2
140   */
141  function enableCloud(accountId: string, switches: Record<string, boolean>, callback: AsyncCallback<void>): void;
142
143  /**
144   * Disable the cloud file synchronization function.
145   *
146   * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
147   * @param { string } accountId - Current account id.
148   * @returns { Promise<void> } Return Promise.
149   * @throws { BusinessError } 201 - Permission verification failed.
150   * @throws { BusinessError } 202 - The caller is not a system application.
151   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
152   * <br>2.Incorrect parameter types.
153   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
154   * @systemapi
155   * @since arkts{ '1.1':'10','1.2':'20'}
156   * @arkts 1.1&1.2
157   */
158  function disableCloud(accountId: string): Promise<void>;
159
160  /**
161   * Disable the cloud file synchronization function.
162   *
163   * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
164   * @param { string } accountId - Current account id.
165   * @param { AsyncCallback<void> } callback - Callback function
166   * @throws { BusinessError } 201 - Permission verification failed.
167   * @throws { BusinessError } 202 - The caller is not a system application.
168   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
169   * <br>2.Incorrect parameter types.
170   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
171   * @systemapi
172   * @since arkts{ '1.1':'10','1.2':'20'}
173   * @arkts 1.1&1.2
174   */
175  function disableCloud(accountId: string, callback: AsyncCallback<void>): void;
176
177  /**
178   * Describes the clear action type.
179   *
180   * @enum { number }
181   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
182   * @systemapi
183   * @since arkts{ '1.1':'10','1.2':'20'}
184   * @arkts 1.1&1.2
185   */
186  enum Action {
187    /**
188     * Indicates clearing cloud identification only, retaining local cached data.
189     *
190     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
191     * @systemapi
192     * @since arkts{ '1.1':'10','1.2':'20'}
193     * @arkts 1.1&1.2
194     */
195    RETAIN_DATA,
196
197    /**
198     * Indicates clearing all cloud-related file data, which synchronized with the cloud.
199     *
200     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
201     * @systemapi
202     * @since arkts{ '1.1':'10','1.2':'20'}
203     * @arkts 1.1&1.2
204     */
205    CLEAR_DATA
206  }
207
208  /**
209   * Clean up cloud-related file data based on specific action.
210   *
211   * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
212   * @param { string } accountId - Current account id.
213   * @param { Record<string, Action> } appActions - Indicates information about cloud file need to clear in which way.
214   * @returns { Promise<void> } Return Promise.
215   * @throws { BusinessError } 201 - Permission verification failed.
216   * @throws { BusinessError } 202 - The caller is not a system application.
217   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
218   * <br>2.Incorrect parameter types.
219   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
220   * @systemapi
221   * @since arkts{ '1.1':'10','1.2':'20'}
222   * @arkts 1.1&1.2
223   */
224  function clean(accountId: string, appActions: Record<string, Action>): Promise<void>;
225
226  /**
227   * Clean up cloud-related file data based on specific action.
228   *
229   * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
230   * @param { string } accountId - Current account id.
231   * @param { Record<string, Action> } appActions - Indicates information about cloud file need to clear in which way.
232   * @param { AsyncCallback<void> } callback - Callback function
233   * @throws { BusinessError } 201 - Permission verification failed.
234   * @throws { BusinessError } 202 - The caller is not a system application.
235   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
236   * <br>2.Incorrect parameter types.
237   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
238   * @systemapi
239   * @since arkts{ '1.1':'10','1.2':'20'}
240   * @arkts 1.1&1.2
241   */
242  function clean(accountId: string, appActions: Record<string, Action>, callback: AsyncCallback<void>): void;
243
244  /**
245   * Notify the change of data in cloud.
246   *
247   * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
248   * @param { number } userId - The Id of the user whose cloud data changed
249   * @param { ExtraData } extraData - The change info from push notification
250   * @returns { Promise<void> } Return Promise
251   * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
252   * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
253   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
254   * <br>2.Incorrect parameter types.
255   * @throws { BusinessError } 13600001 - IPC error.
256   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
257   * @systemapi
258   * @since arkts{ '1.1':'11','1.2':'20'}
259   * @arkts 1.1&1.2
260   */
261  function notifyDataChange(userId: number, extraData: ExtraData): Promise<void>;
262
263  /**
264   * Notify the change of data in cloud.
265   *
266   * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
267   * @param { number } userId - The Id of the user whose cloud data changed
268   * @param { ExtraData } extraData - The change info from push notification
269   * @param { AsyncCallback<void> } callback - Callback function
270   * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
271   * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
272   * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified;
273   * <br>2.Incorrect parameter types.
274   * @throws { BusinessError } 13600001 - IPC error.
275   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
276   * @systemapi
277   * @since arkts{ '1.1':'11','1.2':'20'}
278   * @arkts 1.1&1.2
279   */
280  function notifyDataChange(userId: number, extraData: ExtraData, callback: AsyncCallback<void>): void;
281
282  /**
283   * The change info from push notification.
284   *
285   * @interface ExtraData
286   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
287   * @systemapi
288   * @since arkts{ '1.1':'11','1.2':'20'}
289   * @arkts 1.1&1.2
290   */
291  interface ExtraData {
292    /**
293     * The eventId of the push info.
294     *
295     * @type { string }
296     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
297     * @systemapi
298     * @since arkts{ '1.1':'11','1.2':'20'}
299     * @arkts 1.1&1.2
300     */
301    eventId: string;
302    /**
303     * The change info.
304     *
305     * @type { string }
306     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
307     * @systemapi
308     * @since arkts{ '1.1':'11','1.2':'20'}
309     * @arkts 1.1&1.2
310     */
311    extraData: string;
312  }
313
314  /**
315   * Describes the reason why the download task stop.
316   * @enum { number } DownloadStopReason
317   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
318   * @since 20
319   */
320  enum DownloadStopReason {
321
322    /**
323     * download task is not stopped.
324     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
325     * @since 20
326     */
327    NO_STOP = 0,
328
329    /**
330     * Network is unavailable.
331     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
332     * @since 20
333     */
334    NETWORK_UNAVAILABLE = 1,
335
336    /**
337     * The local storage space is full.
338     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
339     * @since 20
340     */
341    LOCAL_STORAGE_FULL = 2,
342
343    /**
344     * Temperature control Limits.
345     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
346     * @since 20
347     */
348    TEMPERATURE_LIMIT = 3,
349
350    /**
351     * User stopped the download task.
352     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
353     * @since 20
354     */
355    USER_STOPPED = 4,
356
357    /**
358     * The local application has been unloaded.
359     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
360     * @since 20
361     */
362    APP_UNLOAD = 5,
363
364    /**
365     * Other reasons of some internal error.
366     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
367     * @since 20
368     */
369    OTHER_REASON = 6
370  }
371
372  /**
373   * Describes the state type of downgrade download.
374   * @enum { number } DownloadState
375   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
376   * @since 20
377   */
378  enum DownloadState {
379
380    /**
381     * Indicates that the download task in process now.
382     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
383     * @since 20
384     */
385    RUNNING = 0,
386
387    /**
388     * Indicates that the download task finished.
389     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
390     * @since 20
391     */
392    COMPLETED = 1,
393
394    /**
395     * Indicates that the download task stopped.
396     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
397     * @since 20
398     */
399    STOPPED = 2
400  }
401
402  /**
403   * Defines the CloudFileInfo data structure.
404   * @typedef CloudFileInfo
405   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
406   * @since 20
407   */
408  interface CloudFileInfo {
409
410    /**
411     * Total number of files located in the cloud.
412     * @type { number }
413     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
414     * @since 20
415     */
416    cloudFileCount: number;
417
418    /**
419     * Total size of files located in the cloud, in units of bytes.
420     * @type { number }
421     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
422     * @since 20
423     */
424    cloudFileTotalSize: number;
425
426    /**
427     * Total number of files located locally.
428     * @type { number }
429     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
430     * @since 20
431     */
432    localFileCount: number;
433
434    /**
435     * Total size of files located locally, in units of bytes.
436     * @type { number }
437     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
438     * @since 20
439     */
440    localFileTotalSize: number;
441
442    /**
443     * Total number of files located both locally and in the cloud.
444     * @type { number }
445     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
446     * @since 20
447     */
448    bothFileCount: number;
449
450    /**
451     * Total size of files located both locally and in the cloud, in units of bytes.
452     * @type { number }
453     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
454     * @since 20
455     */
456    bothFileTotalSize: number;
457  }
458
459  /**
460   * Defines DownloadProgress object.
461   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
462   * @since 20
463   */
464  class DownloadProgress {
465
466    /**
467     * The current download task state.
468     * @type { DownloadState }
469     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
470     * @since 20
471     */
472    state: DownloadState;
473
474    /**
475     * The number of files that downloaded successfully
476     * @type { number }
477     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
478     * @since 20
479     */
480    successfulCount: number;
481
482    /**
483     * The number of files that fail to be downloaded.
484     * @type { number }
485     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
486     * @since 20
487     */
488    failedCount: number;
489
490    /**
491     * Total number of all files to be downloaded.
492     * @type { number }
493     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
494     * @since 20
495     */
496    totalCount: number;
497
498    /**
499     * Total size of downloaded files.
500     * @type { number }
501     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
502     * @since 20
503     */
504    downloadedSize: number;
505
506    /**
507     * Total size of all files to be downloaded.
508     * @type { number }
509     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
510     * @since 20
511     */
512    totalSize: number;
513
514    /**
515     * The reason for stopping the download task.
516     * @type { DownloadStopReason }
517     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
518     * @since 20
519     */
520    stopReason: DownloadStopReason;
521  }
522
523  /**
524   * DowngradeDownload object.
525   *
526   * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
527   * @systemapi
528   * @since 20
529   */
530  class DowngradeDownload {
531
532    /**
533     * A constructor used to create a DowngradeDownload object.
534     *
535     * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
536     * @param { string } bundleName - Name of the bundle that need to synchronize and subscribe the sync progress event.
537     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
538     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
539     * @throws { BusinessError } 13900020 - Invalid argument. Possible causes:
540     *     <br>1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
541     * @throws { BusinessError } 22400005 - Inner error. Possible causes:
542     *     <br>1.Failed to access the database or execute the SQL statement.
543     *     <br>2.System error, such as a null pointer, insufficient memory or a JS engine exception.
544     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
545     * @systemapi
546     * @since 20
547     */
548    constructor(bundleName: string);
549
550    /**
551     * Get the total size and number of files in different locations.
552     *
553     * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
554     * @returns { Promise<CloudFileInfo> } - Return the file size and number info.
555     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
556     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
557     * @throws { BusinessError } 13600001 - IPC error. Possible causes:
558     *     <br>1.IPC failed or timed out. 2.Failed to load the service.
559     * @throws { BusinessError } 13900010 - Try again.
560     * @throws { BusinessError } 22400005 - Inner error. Possible causes:
561     *     <br>1.Failed to access the database or execute the SQL statement.
562     *     <br>2.System error, such as a null pointer, insufficient memory or a JS engine exception.
563     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
564     * @systemapi
565     * @since 20
566     */
567    getCloudFileInfo(): Promise<CloudFileInfo>;
568
569    /**
570     * Start to download all cloud files of the specified application to local.
571     *
572     * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
573     * @param { Callback<DownloadProgress> } callback - callback function with a `DownloadProgress` argument.
574     * @returns { Promise<void> } - Return Promise.
575     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
576     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
577     * @throws { BusinessError } 13600001 - IPC error. Possible causes:
578     *     <br>1.IPC failed or timed out. 2.Failed to load the service.
579     * @throws { BusinessError } 13900010 - Try again.
580     * @throws { BusinessError } 13900020 - Invalid argument. Possible causes:
581     *     <br>1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
582     * @throws { BusinessError } 22400005 - Inner error. Possible causes:
583     *     <br>1.Failed to access the database or execute the SQL statement.
584     *     <br>2.System error, such as a null pointer, insufficient memory or a JS engine exception.
585     * @throws { BusinessError } 22400006 - The same task is already in progress.
586     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
587     * @systemapi
588     * @since 20
589     */
590    startDownload(callback: Callback<DownloadProgress>): Promise<void>;
591
592    /**
593     * Stop the specified application's download task.
594     *
595     * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER
596     * @returns { Promise<void> } - Return Promise.
597     * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
598     * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
599     * @throws { BusinessError } 13600001 - IPC error. Possible causes:
600     *     <br>1.IPC failed or timed out. 2.Failed to load the service.
601     * @throws { BusinessError } 22400005 - Inner error. Possible causes:
602     *     <br>1.Failed to access the database or execute the SQL statement.
603     *     <br>2.System error, such as a null pointer, insufficient memory or a JS engine exception.
604     * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager
605     * @systemapi
606     * @since 20
607     */
608    stopDownload(): Promise<void>;
609  }
610}
611
612export default cloudSyncManager;
613