• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2025 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
16package OHOS.FileManagement.Backup;
17import ServiceType;
18interface OHOS.FileManagement.Backup.IServiceReverse;
19sequenceable BackupFileInfo..OHOS.FileManagement.Backup.BFileInfo;
20sequenceable BackupIncrementalData..OHOS.FileManagement.Backup.BIncrementalData;
21interface OHOS.FileManagement.Backup.IService{
22    [ipccode 39] void InitRestoreSession([in] IServiceReverse reverseIpcRemoteObject);
23    [ipccode 1] void InitRestoreSessionWithErrMsg([in] IServiceReverse reverseIpcRemoteObject,
24                                                  [out] int errCodeForMsg, [out] String errMsg);
25    [ipccode 2] void InitBackupSession([in] IServiceReverse reverseIpcRemoteObject);
26    [ipccode 3] void InitBackupSessionWithErrMsg([in] IServiceReverse reverseIpcRemoteObject,
27                                                 [out] int errCodeForMsg, [out] String errMsg);
28    [ipccode 4] void Start();
29    [ipccode 5] void GetLocalCapabilities([out] FileDescriptor fd);
30    [ipccode 6] void GetLocalCapabilitiesForBundleInfos([out] FileDescriptor fd);
31    [ipccode 7] void PublishFile([in] BFileInfo fileInfo);
32    [oneway, ipccode 8] void GetFileHandle([in] String bundleName, [in] String fileName);
33    [ipccode 9] void AppendBundlesRestoreSessionDataByDetail([in] FileDescriptor fd,
34                                                 [in] String[] bundleNames,
35                                                 [in] String[]  detailInfos,
36                                                 [in] int restoreType,
37                                                 [in] int userId);
38    [ipccode 10] void AppendBundlesRestoreSessionData([in] FileDescriptor fd,
39                                                 [in] String[] bundleNames,
40                                                 [in] int restoreType,
41                                                 [in] int userId);
42    [ipccode 11] void AppendBundlesBackupSession([in] String[] bundleNames);
43    [ipccode 12] void AppendBundlesDetailsBackupSession([in] String[] bundleNames, [in] String[] bundleInfos);
44    [ipccode 13] void Finish();
45    [ipccode 14] void Release();
46    [ipccode 15] void CancelForResult([in] String bundleName, [out] int cancelResult);
47    [ipccode 16] void GetAppLocalListAndDoIncrementalBackup();
48    [ipccode 17] void GetIncrementalFileHandle([in] String bundleName, [in] String fileName);
49    [ipccode 18] void GetBackupInfo([in] String bundleName, [out] String getBackupInfoResult);
50    [ipccode 19] void UpdateTimer([in] String bundleName, [in] unsigned int timeout, [out] boolean updateTimerResult);
51    [ipccode 20] void UpdateSendRate([in] String bundleName, [in] int sendRate, [out] boolean updateSendRateResult);
52    [ipccode 21] void StartExtTimer([out] boolean isExtStart);
53    [ipccode 22] void StartFwkTimer([out] boolean isFwkStart);
54    [ipccode 23] void StopExtTimer([out] boolean isExtStop);
55    [ipccode 24] void GetLocalCapabilitiesIncremental([in] BIncrementalData[] bundleNames, [out] FileDescriptor fd);
56    [ipccode 25] void InitIncrementalBackupSession([in] IServiceReverse reverseIpcRemoteObject);
57    [ipccode 26] void InitIncrementalBackupSessionWithErrMsg([in] IServiceReverse reverseIpcRemoteObject,
58                                                             [out] int errCodeForMsg, [out] String errMsg);
59    [ipccode 27] void AppendBundlesIncrementalBackupSession([in] BIncrementalData[] bundlesToBackup);
60    [ipccode 28] void AppendBundlesIncrementalBackupSessionWithBundleInfos([in] BIncrementalData[] bundlesToBackup,
61        [in]String[] bundleInfos);
62    [ipccode 29] void PublishIncrementalFile([in] BFileInfo fileInfo);
63    [ipccode 30] void PublishSAIncrementalFile([in] BFileInfo fileInfo, [in] FileDescriptor fd);
64    [ipccode 31] void AppIncrementalFileReady([in] String fileName, [in] FileDescriptor fd, [in] FileDescriptor manifestFd,
65                                              [in] int appIncrementalFileReadyErrCode);
66    [ipccode 32] void AppIncrementalDone([in] int appIncrementalDoneErrCode);
67    [ipccode 33] void ReportAppProcessInfo([in] String processInfo, [in] BackupRestoreScenario scenario);
68    [ipccode 34] void RefreshDataSize([in] long totalDataSize);
69    [ipccode 35] void AppDone([in] int appDoneErrCode);
70    [ipccode 36] void AppFileReady([in]String fileName, [in] FileDescriptor fd, [in] int appFileReadyErrCode);
71    [ipccode 37] void ServiceResultReport([in]String restoreRetInfo, [in] BackupRestoreScenario sennario,
72        [in] int serviceResultReportErrCode);
73    [ipccode 38] void GetBackupDataSize([in] boolean isPreciseScan,[in] BIncrementalData[] bundleNameList);
74    [ipccode 40] void CleanBundleTempDir([in] String bundleName);
75    [ipccode 41] void HandleExtDisconnect([in] BackupRestoreScenario scenario, [in] boolean isAppResultReport,
76                                          [in] int appErrCode);
77    [ipccode 42] void GetExtOnRelease([out] boolean isExtOnRelease);
78    [ipccode 43] void AppFileReadyWithoutFd([in]String fileName, [in] int appFileReadyErrCode);
79    [ipccode 44] void AppIncrementalFileReadyWithoutFd([in] String fileName, [in] int appIncrementalFileReadyErrCode);
80    [ipccode 45] void GetCompatibilityInfo([in] String bundleName, [in] String extInfo, [out] String compatInfo);
81 }